Bunch more error fixes.
This commit is contained in:
@@ -20,13 +20,13 @@ namespace Content.Shared.Alert
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Player clicking the alert
|
/// Player clicking the alert
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly IEntity Player;
|
public readonly EntityUid Player;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Alert that was clicked
|
/// Alert that was clicked
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly AlertPrototype Alert;
|
public readonly AlertPrototype Alert;
|
||||||
|
|
||||||
public ClickAlertEventArgs(IEntity player, AlertPrototype alert)
|
public ClickAlertEventArgs(EntityUid player, AlertPrototype alert)
|
||||||
{
|
{
|
||||||
Player = player;
|
Player = player;
|
||||||
Alert = alert;
|
Alert = alert;
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ namespace Content.Shared.Body.Components
|
|||||||
var i = 0;
|
var i = 0;
|
||||||
foreach (var mechanism in _mechanisms)
|
foreach (var mechanism in _mechanisms)
|
||||||
{
|
{
|
||||||
mechanismIds[i] = mechanism.OwnerUid;
|
mechanismIds[i] = mechanism.Owner;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ namespace Content.Shared.Body.Components
|
|||||||
return SurgeryDataComponent?.CheckSurgery(surgery) ?? false;
|
return SurgeryDataComponent?.CheckSurgery(surgery) ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool AttemptSurgery(SurgeryType toolType, IBodyPartContainer target, ISurgeon surgeon, IEntity performer)
|
public bool AttemptSurgery(SurgeryType toolType, IBodyPartContainer target, ISurgeon surgeon, EntityUid performer)
|
||||||
{
|
{
|
||||||
DebugTools.AssertNotNull(toolType);
|
DebugTools.AssertNotNull(toolType);
|
||||||
DebugTools.AssertNotNull(target);
|
DebugTools.AssertNotNull(target);
|
||||||
@@ -370,7 +370,7 @@ namespace Content.Shared.Body.Components
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out SharedMechanismComponent? mechanism))
|
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(entity.Value, out SharedMechanismComponent? mechanism))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace Content.Shared.Body.Components
|
|||||||
protected readonly Dictionary<int, object> OptionsCache = new();
|
protected readonly Dictionary<int, object> OptionsCache = new();
|
||||||
protected SharedBodyComponent? BodyCache;
|
protected SharedBodyComponent? BodyCache;
|
||||||
protected int IdHash;
|
protected int IdHash;
|
||||||
protected IEntity? PerformerCache;
|
protected EntityUid? PerformerCache;
|
||||||
private SharedBodyPartComponent? _part;
|
private SharedBodyPartComponent? _part;
|
||||||
|
|
||||||
public SharedBodyComponent? Body => Part?.Body;
|
public SharedBodyComponent? Body => Part?.Body;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace Content.Shared.Body.Surgery
|
|||||||
SharedMechanismComponent target,
|
SharedMechanismComponent target,
|
||||||
IBodyPartContainer container,
|
IBodyPartContainer container,
|
||||||
ISurgeon surgeon,
|
ISurgeon surgeon,
|
||||||
IEntity performer);
|
EntityUid performer);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// How long it takes to perform a single surgery step in seconds.
|
/// How long it takes to perform a single surgery step in seconds.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace Content.Shared.Body.Surgery
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ISurgeryData : IComponent
|
public interface ISurgeryData : IComponent
|
||||||
{
|
{
|
||||||
public delegate void SurgeryAction(IBodyPartContainer container, ISurgeon surgeon, IEntity performer);
|
public delegate void SurgeryAction(IBodyPartContainer container, ISurgeon surgeon, EntityUid performer);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <see cref="SharedBodyPartComponent"/> this
|
/// The <see cref="SharedBodyPartComponent"/> this
|
||||||
@@ -78,6 +78,6 @@ namespace Content.Shared.Body.Surgery
|
|||||||
/// <param name="performer">The entity performing the surgery.</param>
|
/// <param name="performer">The entity performing the surgery.</param>
|
||||||
/// <returns>True if successful, false otherwise.</returns>
|
/// <returns>True if successful, false otherwise.</returns>
|
||||||
public bool PerformSurgery(SurgeryType surgeryType, IBodyPartContainer container, ISurgeon surgeon,
|
public bool PerformSurgery(SurgeryType surgeryType, IBodyPartContainer container, ISurgeon surgeon,
|
||||||
IEntity performer);
|
EntityUid performer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace Content.Shared.Construction.Conditions
|
|||||||
[DataField("tileNotBlocked")]
|
[DataField("tileNotBlocked")]
|
||||||
private readonly TileNotBlocked _tileNotBlocked = new();
|
private readonly TileNotBlocked _tileNotBlocked = new();
|
||||||
|
|
||||||
public bool Condition(IEntity user, EntityCoordinates location, Direction direction)
|
public bool Condition(EntityUid user, EntityCoordinates location, Direction direction)
|
||||||
{
|
{
|
||||||
var result = false;
|
var result = false;
|
||||||
|
|
||||||
|
|||||||
@@ -171,9 +171,6 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
|
|
||||||
// Convenience properties
|
// Convenience properties
|
||||||
public bool HasItem => ContainerSlot.ContainedEntity != null;
|
public bool HasItem => ContainerSlot.ContainedEntity != null;
|
||||||
public IEntity? Item => ContainerSlot.ContainedEntity;
|
public EntityUid? Item => ContainerSlot.ContainedEntity;
|
||||||
|
|
||||||
// and to make it easier for whenever IEntity is removed
|
|
||||||
public EntityUid? ItemUid => ContainerSlot.ContainedEntity;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
TryEjectToHands(uid, slot, args.UserUid);
|
TryEjectToHands(uid, slot, args.User);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,12 +139,12 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
if (args.Handled)
|
if (args.Handled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!EntityManager.TryGetComponent(args.UserUid, out SharedHandsComponent? hands))
|
if (!EntityManager.TryGetComponent(args.User, out SharedHandsComponent? hands))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
foreach (var slot in itemSlots.Slots.Values)
|
foreach (var slot in itemSlots.Slots.Values)
|
||||||
{
|
{
|
||||||
if (!CanInsert(uid, args.UsedUid, slot, swap: slot.Swap, popup: args.UserUid))
|
if (!CanInsert(uid, args.Used, slot, swap: slot.Swap, popup: args.User))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Drop the held item onto the floor. Return if the user cannot drop.
|
// Drop the held item onto the floor. Return if the user cannot drop.
|
||||||
@@ -152,7 +152,7 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (slot.Item != null)
|
if (slot.Item != null)
|
||||||
hands.TryPutInAnyHand(slot.Item);
|
hands.TryPutInAnyHand(slot.Item.Value);
|
||||||
|
|
||||||
Insert(uid, slot, args.Used);
|
Insert(uid, slot, args.Used);
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
@@ -166,7 +166,7 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
/// Insert an item into a slot. This does not perform checks, so make sure to also use <see
|
/// Insert an item into a slot. This does not perform checks, so make sure to also use <see
|
||||||
/// cref="CanInsert"/> or just use <see cref="TryInsert"/> instead.
|
/// cref="CanInsert"/> or just use <see cref="TryInsert"/> instead.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void Insert(EntityUid uid, ItemSlot slot, IEntity item)
|
private void Insert(EntityUid uid, ItemSlot slot, EntityUid item)
|
||||||
{
|
{
|
||||||
slot.ContainerSlot.Insert(item);
|
slot.ContainerSlot.Insert(item);
|
||||||
// ContainerSlot automatically raises a directed EntInsertedIntoContainerMessage
|
// ContainerSlot automatically raises a directed EntInsertedIntoContainerMessage
|
||||||
@@ -208,7 +208,7 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
/// Tries to insert item into a specific slot.
|
/// Tries to insert item into a specific slot.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>False if failed to insert item</returns>
|
/// <returns>False if failed to insert item</returns>
|
||||||
public bool TryInsert(EntityUid uid, string id, IEntity item, ItemSlotsComponent? itemSlots = null)
|
public bool TryInsert(EntityUid uid, string id, EntityUid item, ItemSlotsComponent? itemSlots = null)
|
||||||
{
|
{
|
||||||
if (!Resolve(uid, ref itemSlots))
|
if (!Resolve(uid, ref itemSlots))
|
||||||
return false;
|
return false;
|
||||||
@@ -223,7 +223,7 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
/// Tries to insert item into a specific slot.
|
/// Tries to insert item into a specific slot.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>False if failed to insert item</returns>
|
/// <returns>False if failed to insert item</returns>
|
||||||
public bool TryInsert(EntityUid uid, ItemSlot slot, IEntity item)
|
public bool TryInsert(EntityUid uid, ItemSlot slot, EntityUid item)
|
||||||
{
|
{
|
||||||
if (!CanInsert(uid, item, slot))
|
if (!CanInsert(uid, item, slot))
|
||||||
return false;
|
return false;
|
||||||
@@ -244,14 +244,14 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
if (!hands.TryGetActiveHeldEntity(out var item))
|
if (!hands.TryGetActiveHeldEntity(out var item))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!CanInsert(uid, item, slot))
|
if (!CanInsert(uid, item.Value, slot))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// hands.Drop(item) checks CanDrop action blocker
|
// hands.Drop(item) checks CanDrop action blocker
|
||||||
if (!_actionBlockerSystem.CanInteract(user) && hands.Drop(item))
|
if (!_actionBlockerSystem.CanInteract(user) && hands.Drop(item.Value))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Insert(uid, slot, item);
|
Insert(uid, slot, item.Value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@@ -261,7 +261,7 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
/// Eject an item into a slot. This does not perform checks (e.g., is the slot locked?), so you should
|
/// Eject an item into a slot. This does not perform checks (e.g., is the slot locked?), so you should
|
||||||
/// probably just use <see cref="TryEject"/> instead.
|
/// probably just use <see cref="TryEject"/> instead.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void Eject(EntityUid uid, ItemSlot slot, IEntity item)
|
private void Eject(EntityUid uid, ItemSlot slot, EntityUid item)
|
||||||
{
|
{
|
||||||
slot.ContainerSlot.Remove(item);
|
slot.ContainerSlot.Remove(item);
|
||||||
// ContainerSlot automatically raises a directed EntRemovedFromContainerMessage
|
// ContainerSlot automatically raises a directed EntRemovedFromContainerMessage
|
||||||
@@ -274,7 +274,7 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
/// Try to eject an item from a slot.
|
/// Try to eject an item from a slot.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>False if item slot is locked or has no item inserted</returns>
|
/// <returns>False if item slot is locked or has no item inserted</returns>
|
||||||
public bool TryEject(EntityUid uid, ItemSlot slot, [NotNullWhen(true)] out IEntity? item)
|
public bool TryEject(EntityUid uid, ItemSlot slot, [NotNullWhen(true)] out EntityUid? item)
|
||||||
{
|
{
|
||||||
item = null;
|
item = null;
|
||||||
|
|
||||||
@@ -282,7 +282,7 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
item = slot.Item;
|
item = slot.Item;
|
||||||
Eject(uid, slot, item);
|
Eject(uid, slot, item.Value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,7 +290,7 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
/// Try to eject item from a slot.
|
/// Try to eject item from a slot.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>False if the id is not valid, the item slot is locked, or it has no item inserted</returns>
|
/// <returns>False if the id is not valid, the item slot is locked, or it has no item inserted</returns>
|
||||||
public bool TryEject(EntityUid uid, string id, [NotNullWhen(true)] out IEntity? item, ItemSlotsComponent? itemSlots = null)
|
public bool TryEject(EntityUid uid, string id, [NotNullWhen(true)] out EntityUid? item, ItemSlotsComponent? itemSlots = null)
|
||||||
{
|
{
|
||||||
item = null;
|
item = null;
|
||||||
|
|
||||||
@@ -317,7 +317,7 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (user != null && EntityManager.TryGetComponent(user.Value, out SharedHandsComponent? hands))
|
if (user != null && EntityManager.TryGetComponent(user.Value, out SharedHandsComponent? hands))
|
||||||
hands.TryPutInAnyHand(item);
|
hands.TryPutInAnyHand(item.Value);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -344,7 +344,7 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
|
|
||||||
var verbSubject = slot.Name != string.Empty
|
var verbSubject = slot.Name != string.Empty
|
||||||
? Loc.GetString(slot.Name)
|
? Loc.GetString(slot.Name)
|
||||||
: IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(slot.Item!).EntityName ?? string.Empty;
|
: IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(slot.Item!.Value).EntityName ?? string.Empty;
|
||||||
|
|
||||||
Verb verb = new();
|
Verb verb = new();
|
||||||
verb.Act = () => TryEjectToHands(uid, slot, args.User);
|
verb.Act = () => TryEjectToHands(uid, slot, args.User);
|
||||||
@@ -379,7 +379,7 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
|
|
||||||
var verbSubject = slot.Name != string.Empty
|
var verbSubject = slot.Name != string.Empty
|
||||||
? Loc.GetString(slot.Name)
|
? Loc.GetString(slot.Name)
|
||||||
: IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(slot.Item!).EntityName ?? string.Empty;
|
: IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(slot.Item!.Value).EntityName ?? string.Empty;
|
||||||
|
|
||||||
Verb takeVerb = new();
|
Verb takeVerb = new();
|
||||||
takeVerb.Act = () => TryEjectToHands(uid, slot, args.User);
|
takeVerb.Act = () => TryEjectToHands(uid, slot, args.User);
|
||||||
@@ -400,15 +400,15 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
|
|
||||||
foreach (var slot in itemSlots.Slots.Values)
|
foreach (var slot in itemSlots.Slots.Values)
|
||||||
{
|
{
|
||||||
if (!CanInsert(uid, args.Using, slot))
|
if (!CanInsert(uid, args.Using.Value, slot))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var verbSubject = slot.Name != string.Empty
|
var verbSubject = slot.Name != string.Empty
|
||||||
? Loc.GetString(slot.Name)
|
? Loc.GetString(slot.Name)
|
||||||
: IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(args.Using).EntityName ?? string.Empty;
|
: IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(args.Using.Value).EntityName ?? string.Empty;
|
||||||
|
|
||||||
Verb insertVerb = new();
|
Verb insertVerb = new();
|
||||||
insertVerb.Act = () => Insert(uid, slot, args.Using);
|
insertVerb.Act = () => Insert(uid, slot, args.Using.Value);
|
||||||
|
|
||||||
if (slot.InsertVerbText != null)
|
if (slot.InsertVerbText != null)
|
||||||
{
|
{
|
||||||
@@ -448,7 +448,7 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the contents of some item slot.
|
/// Get the contents of some item slot.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity? GetItem(EntityUid uid, string id, ItemSlotsComponent? itemSlots = null)
|
public EntityUid? GetItem(EntityUid uid, string id, ItemSlotsComponent? itemSlots = null)
|
||||||
{
|
{
|
||||||
if (!Resolve(uid, ref itemSlots))
|
if (!Resolve(uid, ref itemSlots))
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -16,26 +16,6 @@ namespace Content.Shared.Coordinates
|
|||||||
return new(id, x, y);
|
return new(id, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static EntityCoordinates ToCoordinates(this EntityUid id)
|
|
||||||
{
|
|
||||||
return ToCoordinates(id, Vector2.Zero);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static EntityCoordinates ToCoordinates(this IEntity entity, Vector2 offset)
|
|
||||||
{
|
|
||||||
return ToCoordinates((EntityUid) entity, offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static EntityCoordinates ToCoordinates(this IEntity entity, float x, float y)
|
|
||||||
{
|
|
||||||
return new(entity, x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static EntityCoordinates ToCoordinates(this IEntity entity)
|
|
||||||
{
|
|
||||||
return ToCoordinates((EntityUid) entity, Vector2.Zero);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static EntityCoordinates ToCoordinates(this IMapGrid grid, Vector2 offset)
|
public static EntityCoordinates ToCoordinates(this IMapGrid grid, Vector2 offset)
|
||||||
{
|
{
|
||||||
return ToCoordinates(grid.GridEntityId, offset);
|
return ToCoordinates(grid.GridEntityId, offset);
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ namespace Content.Shared.Disposal
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool CanInsert(SharedDisposalUnitComponent component, IEntity entity)
|
public virtual bool CanInsert(SharedDisposalUnitComponent component, EntityUid entity)
|
||||||
{
|
{
|
||||||
if (!IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(component.Owner).Anchored)
|
if (!IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(component.Owner).Anchored)
|
||||||
return false;
|
return false;
|
||||||
@@ -71,11 +71,5 @@ namespace Content.Shared.Disposal
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanInsert(SharedDisposalUnitComponent component, EntityUid entityId)
|
|
||||||
{
|
|
||||||
var entity = EntityManager.GetEntity(entityId);
|
|
||||||
return CanInsert(component, entity);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ namespace Content.Shared.Doors
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected List<EntityUid> CurrentlyCrushing = new();
|
protected List<EntityUid> CurrentlyCrushing = new();
|
||||||
|
|
||||||
public bool IsCrushing(IEntity entity)
|
public bool IsCrushing(EntityUid entity)
|
||||||
{
|
{
|
||||||
return CurrentlyCrushing.Contains(entity);
|
return CurrentlyCrushing.Contains(entity);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,15 +23,15 @@ namespace Content.Shared.Interaction
|
|||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public class RangedInteractEventArgs : EventArgs
|
public class RangedInteractEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
public RangedInteractEventArgs(IEntity user, IEntity @using, EntityCoordinates clickLocation)
|
public RangedInteractEventArgs(EntityUid user, EntityUid @using, EntityCoordinates clickLocation)
|
||||||
{
|
{
|
||||||
User = user;
|
User = user;
|
||||||
Using = @using;
|
Using = @using;
|
||||||
ClickLocation = clickLocation;
|
ClickLocation = clickLocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEntity User { get; }
|
public EntityUid User { get; }
|
||||||
public IEntity Using { get; }
|
public EntityUid Using { get; }
|
||||||
public EntityCoordinates ClickLocation { get; }
|
public EntityCoordinates ClickLocation { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace Content.Shared.Interaction
|
|||||||
public class RotateToFaceSystem : EntitySystem
|
public class RotateToFaceSystem : EntitySystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!;
|
[Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!;
|
||||||
public bool TryFaceCoordinates(IEntity user, Vector2 coordinates)
|
public bool TryFaceCoordinates(EntityUid user, Vector2 coordinates)
|
||||||
{
|
{
|
||||||
var diff = coordinates - IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(user).MapPosition.Position;
|
var diff = coordinates - IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(user).MapPosition.Position;
|
||||||
if (diff.LengthSquared <= 0.01f)
|
if (diff.LengthSquared <= 0.01f)
|
||||||
@@ -43,7 +43,7 @@ namespace Content.Shared.Interaction
|
|||||||
return TryFaceAngle(user, diffAngle);
|
return TryFaceAngle(user, diffAngle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TryFaceAngle(IEntity user, Angle diffAngle)
|
public bool TryFaceAngle(EntityUid user, Angle diffAngle)
|
||||||
{
|
{
|
||||||
if (_actionBlockerSystem.CanChangeDirection(user))
|
if (_actionBlockerSystem.CanChangeDirection(user))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace Content.Shared.Inventory
|
|||||||
|
|
||||||
/// <returns>true if the item is equipped to an equip slot (NOT inside an equipped container
|
/// <returns>true if the item is equipped to an equip slot (NOT inside an equipped container
|
||||||
/// like inside a backpack)</returns>
|
/// like inside a backpack)</returns>
|
||||||
public abstract bool IsEquipped(IEntity item);
|
public abstract bool IsEquipped(EntityUid item);
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
protected class InventoryComponentState : ComponentState
|
protected class InventoryComponentState : ComponentState
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace Content.Shared.Item
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// If a player can pick up this item.
|
/// If a player can pick up this item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool CanPickup(IEntity user, bool popup = true)
|
public bool CanPickup(EntityUid user, bool popup = true)
|
||||||
{
|
{
|
||||||
if (!EntitySystem.Get<ActionBlockerSystem>().CanPickup(user))
|
if (!EntitySystem.Get<ActionBlockerSystem>().CanPickup(user))
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace Content.Shared.MobState
|
|||||||
CurrentMobState = currentMobState;
|
CurrentMobState = currentMobState;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEntity Entity => Component.Owner;
|
public EntityUid Entity => Component.Owner;
|
||||||
|
|
||||||
public MobStateComponent Component { get; }
|
public MobStateComponent Component { get; }
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace Content.Shared.Movement.Components
|
|||||||
|
|
||||||
public static class GravityExtensions
|
public static class GravityExtensions
|
||||||
{
|
{
|
||||||
public static bool IsWeightless(this IEntity entity, PhysicsComponent? body = null, EntityCoordinates? coords = null, IMapManager? mapManager = null, IEntityManager? entityManager = null)
|
public static bool IsWeightless(this EntityUid entity, PhysicsComponent? body = null, EntityCoordinates? coords = null, IMapManager? mapManager = null, IEntityManager? entityManager = null)
|
||||||
{
|
{
|
||||||
if (body == null)
|
if (body == null)
|
||||||
IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out body);
|
IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out body);
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ namespace Content.Shared.Movement
|
|||||||
{
|
{
|
||||||
public sealed class RelayMovementEntityEvent : EntityEventArgs
|
public sealed class RelayMovementEntityEvent : EntityEventArgs
|
||||||
{
|
{
|
||||||
public IEntity Entity { get; }
|
public EntityUid Entity { get; }
|
||||||
|
|
||||||
public RelayMovementEntityEvent(IEntity entity)
|
public RelayMovementEntityEvent(EntityUid entity)
|
||||||
{
|
{
|
||||||
Entity = entity;
|
Entity = entity;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace Content.Shared.Popups
|
|||||||
/// <param name="source">The entity above which the message will appear.</param>
|
/// <param name="source">The entity above which the message will appear.</param>
|
||||||
/// <param name="viewer">The entity that will see the message.</param>
|
/// <param name="viewer">The entity that will see the message.</param>
|
||||||
/// <param name="message">The message to show.</param>
|
/// <param name="message">The message to show.</param>
|
||||||
public static void PopupMessage(this IEntity source, IEntity viewer, string message)
|
public static void PopupMessage(this EntityUid source, EntityUid viewer, string message)
|
||||||
{
|
{
|
||||||
var popupSystem = EntitySystem.Get<SharedPopupSystem>();
|
var popupSystem = EntitySystem.Get<SharedPopupSystem>();
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ namespace Content.Shared.Popups
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="viewer">The entity that will see the message.</param>
|
/// <param name="viewer">The entity that will see the message.</param>
|
||||||
/// <param name="message">The message to be seen.</param>
|
/// <param name="message">The message to be seen.</param>
|
||||||
public static void PopupMessage(this IEntity viewer, string message)
|
public static void PopupMessage(this EntityUid viewer, string message)
|
||||||
{
|
{
|
||||||
viewer.PopupMessage(viewer, message);
|
viewer.PopupMessage(viewer, message);
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@ namespace Content.Shared.Popups
|
|||||||
/// <param name="coordinates">Location on a grid that the message floats up from.</param>
|
/// <param name="coordinates">Location on a grid that the message floats up from.</param>
|
||||||
/// <param name="viewer">The client attached entity that the message is being sent to.</param>
|
/// <param name="viewer">The client attached entity that the message is being sent to.</param>
|
||||||
/// <param name="message">Text contents of the message.</param>
|
/// <param name="message">Text contents of the message.</param>
|
||||||
public static void PopupMessage(this EntityCoordinates coordinates, IEntity viewer, string message)
|
public static void PopupMessage(this EntityCoordinates coordinates, EntityUid viewer, string message)
|
||||||
{
|
{
|
||||||
var popupSystem = EntitySystem.Get<SharedPopupSystem>();
|
var popupSystem = EntitySystem.Get<SharedPopupSystem>();
|
||||||
popupSystem.PopupCoordinates(message, coordinates, Filter.Entities(viewer));
|
popupSystem.PopupCoordinates(message, coordinates, Filter.Entities(viewer));
|
||||||
@@ -49,7 +49,7 @@ namespace Content.Shared.Popups
|
|||||||
/// The client attached entity that the message is being sent to.
|
/// The client attached entity that the message is being sent to.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <param name="message">Text contents of the message.</param>
|
/// <param name="message">Text contents of the message.</param>
|
||||||
public static void PopupMessageCursor(this IEntity viewer, string message)
|
public static void PopupMessageCursor(this EntityUid viewer, string message)
|
||||||
{
|
{
|
||||||
var popupSystem = EntitySystem.Get<SharedPopupSystem>();
|
var popupSystem = EntitySystem.Get<SharedPopupSystem>();
|
||||||
popupSystem.PopupCursor(message, Filter.Entities(viewer));
|
popupSystem.PopupCursor(message, Filter.Entities(viewer));
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace Content.Shared.Pulling
|
|||||||
{
|
{
|
||||||
[Dependency] private readonly ActionBlockerSystem _blocker = default!;
|
[Dependency] private readonly ActionBlockerSystem _blocker = default!;
|
||||||
|
|
||||||
public bool CanPull(IEntity puller, IEntity pulled)
|
public bool CanPull(EntityUid puller, EntityUid pulled)
|
||||||
{
|
{
|
||||||
if (!IoCManager.Resolve<IEntityManager>().HasComponent<SharedPullerComponent>(puller))
|
if (!IoCManager.Resolve<IEntityManager>().HasComponent<SharedPullerComponent>(puller))
|
||||||
{
|
{
|
||||||
@@ -73,7 +73,7 @@ namespace Content.Shared.Pulling
|
|||||||
return !startPull.Cancelled;
|
return !startPull.Cancelled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TogglePull(IEntity puller, SharedPullableComponent pullable)
|
public bool TogglePull(EntityUid puller, SharedPullableComponent pullable)
|
||||||
{
|
{
|
||||||
if (pullable.Puller == puller)
|
if (pullable.Puller == puller)
|
||||||
{
|
{
|
||||||
@@ -84,7 +84,7 @@ namespace Content.Shared.Pulling
|
|||||||
|
|
||||||
// -- Core attempted actions --
|
// -- Core attempted actions --
|
||||||
|
|
||||||
public bool TryStopPull(SharedPullableComponent pullable, IEntity? user = null)
|
public bool TryStopPull(SharedPullableComponent pullable, EntityUid? user = null)
|
||||||
{
|
{
|
||||||
if (!pullable.BeingPulled)
|
if (!pullable.BeingPulled)
|
||||||
{
|
{
|
||||||
@@ -100,13 +100,13 @@ namespace Content.Shared.Pulling
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TryStartPull(IEntity puller, IEntity pullable)
|
public bool TryStartPull(EntityUid puller, EntityUid pullable)
|
||||||
{
|
{
|
||||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent<SharedPullerComponent?>(puller, out var pullerComp))
|
if (!EntityManager.TryGetComponent<SharedPullerComponent?>(puller, out var pullerComp))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent<SharedPullableComponent?>(pullable, out var pullableComp))
|
if (!EntityManager.TryGetComponent<SharedPullableComponent?>(pullable, out var pullableComp))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -121,17 +121,17 @@ namespace Content.Shared.Pulling
|
|||||||
|
|
||||||
// Pulling a new object : Perform sanity checks.
|
// Pulling a new object : Perform sanity checks.
|
||||||
|
|
||||||
if (!EntitySystem.Get<SharedPullingSystem>().CanPull(puller.Owner, pullable.Owner))
|
if (!CanPull(puller.Owner, pullable.Owner))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent<PhysicsComponent?>(puller.Owner, out var pullerPhysics))
|
if (!EntityManager.TryGetComponent<PhysicsComponent?>(puller.Owner, out var pullerPhysics))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent<PhysicsComponent?>(pullable.Owner, out var pullablePhysics))
|
if (!EntityManager.TryGetComponent<PhysicsComponent?>(pullable.Owner, out var pullablePhysics))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -143,7 +143,7 @@ namespace Content.Shared.Pulling
|
|||||||
var oldPullable = puller.Pulling;
|
var oldPullable = puller.Pulling;
|
||||||
if (oldPullable != null)
|
if (oldPullable != null)
|
||||||
{
|
{
|
||||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent<SharedPullableComponent?>(oldPullable, out var oldPullableComp))
|
if (EntityManager.TryGetComponent<SharedPullableComponent?>(oldPullable.Value, out var oldPullableComp))
|
||||||
{
|
{
|
||||||
if (!TryStopPull(oldPullableComp))
|
if (!TryStopPull(oldPullableComp))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace Content.Shared.Pulling
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// A mapping of pullers to the entity that they are pulling.
|
/// A mapping of pullers to the entity that they are pulling.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly Dictionary<IEntity, IEntity> _pullers =
|
private readonly Dictionary<EntityUid, EntityUid> _pullers =
|
||||||
new();
|
new();
|
||||||
|
|
||||||
private readonly HashSet<SharedPullableComponent> _moving = new();
|
private readonly HashSet<SharedPullableComponent> _moving = new();
|
||||||
@@ -100,21 +100,21 @@ namespace Content.Shared.Pulling
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Raise a "you are being pulled" alert if the pulled entity has alerts.
|
// Raise a "you are being pulled" alert if the pulled entity has alerts.
|
||||||
private static void PullableHandlePullStarted(EntityUid uid, SharedPullableComponent component, PullStartedMessage args)
|
private void PullableHandlePullStarted(EntityUid uid, SharedPullableComponent component, PullStartedMessage args)
|
||||||
{
|
{
|
||||||
if (args.Pulled.Owner != uid)
|
if (args.Pulled.Owner != uid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(component.Owner, out SharedAlertsComponent? alerts))
|
if (EntityManager.TryGetComponent(component.Owner, out SharedAlertsComponent? alerts))
|
||||||
alerts.ShowAlert(AlertType.Pulled);
|
alerts.ShowAlert(AlertType.Pulled);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void PullableHandlePullStopped(EntityUid uid, SharedPullableComponent component, PullStoppedMessage args)
|
private void PullableHandlePullStopped(EntityUid uid, SharedPullableComponent component, PullStoppedMessage args)
|
||||||
{
|
{
|
||||||
if (args.Pulled.Owner != uid)
|
if (args.Pulled.Owner != uid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(component.Owner, out SharedAlertsComponent? alerts))
|
if (EntityManager.TryGetComponent(component.Owner, out SharedAlertsComponent? alerts))
|
||||||
alerts.ClearAlert(AlertType.Pulled);
|
alerts.ClearAlert(AlertType.Pulled);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,17 +165,17 @@ namespace Content.Shared.Pulling
|
|||||||
// The pulled object may have already been deleted.
|
// The pulled object may have already been deleted.
|
||||||
// TODO: Work out why. Monkey + meat spike is a good test for this,
|
// TODO: Work out why. Monkey + meat spike is a good test for this,
|
||||||
// assuming you're still pulling the monkey when it gets gibbed.
|
// assuming you're still pulling the monkey when it gets gibbed.
|
||||||
if ((!IoCManager.Resolve<IEntityManager>().EntityExists(pulled) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(pulled).EntityLifeStage) >= EntityLifeStage.Deleted)
|
if ((!EntityManager.EntityExists(pulled.Value) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(pulled.Value).EntityLifeStage) >= EntityLifeStage.Deleted)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(pulled, out IPhysBody? physics))
|
if (!EntityManager.TryGetComponent(pulled.Value, out IPhysBody? physics))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdatePulledRotation(puller, pulled);
|
UpdatePulledRotation(puller, pulled.Value);
|
||||||
|
|
||||||
physics.WakeBody();
|
physics.WakeBody();
|
||||||
}
|
}
|
||||||
@@ -183,16 +183,16 @@ namespace Content.Shared.Pulling
|
|||||||
// TODO: When Joint networking is less shitcodey fix this to use a dedicated joints message.
|
// TODO: When Joint networking is less shitcodey fix this to use a dedicated joints message.
|
||||||
private void HandleContainerInsert(EntInsertedIntoContainerMessage message)
|
private void HandleContainerInsert(EntInsertedIntoContainerMessage message)
|
||||||
{
|
{
|
||||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(message.Entity, out SharedPullableComponent? pullable))
|
if (EntityManager.TryGetComponent(message.Entity, out SharedPullableComponent? pullable))
|
||||||
{
|
{
|
||||||
TryStopPull(pullable);
|
TryStopPull(pullable);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(message.Entity, out SharedPullerComponent? puller))
|
if (EntityManager.TryGetComponent(message.Entity, out SharedPullerComponent? puller))
|
||||||
{
|
{
|
||||||
if (puller.Pulling == null) return;
|
if (puller.Pulling == null) return;
|
||||||
|
|
||||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(puller.Pulling, out SharedPullableComponent? pulling))
|
if (!EntityManager.TryGetComponent(puller.Pulling.Value, out SharedPullableComponent? pulling))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -203,19 +203,17 @@ namespace Content.Shared.Pulling
|
|||||||
|
|
||||||
private bool HandleMovePulledObject(ICommonSession? session, EntityCoordinates coords, EntityUid uid)
|
private bool HandleMovePulledObject(ICommonSession? session, EntityCoordinates coords, EntityUid uid)
|
||||||
{
|
{
|
||||||
var player = session?.AttachedEntity;
|
if (session?.AttachedEntityUid == null)
|
||||||
|
|
||||||
if (player == null)
|
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
var player = session.AttachedEntityUid.Value;
|
||||||
|
|
||||||
if (!TryGetPulled(player, out var pulled))
|
if (!TryGetPulled(player, out var pulled))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(pulled, out SharedPullableComponent? pullable))
|
if (!EntityManager.TryGetComponent(pulled.Value, out SharedPullableComponent? pullable))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -225,32 +223,32 @@ namespace Content.Shared.Pulling
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetPuller(IEntity puller, IEntity pulled)
|
private void SetPuller(EntityUid puller, EntityUid pulled)
|
||||||
{
|
{
|
||||||
_pullers[puller] = pulled;
|
_pullers[puller] = pulled;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool RemovePuller(IEntity puller)
|
private bool RemovePuller(EntityUid puller)
|
||||||
{
|
{
|
||||||
return _pullers.Remove(puller);
|
return _pullers.Remove(puller);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEntity? GetPulled(IEntity by)
|
public EntityUid? GetPulled(EntityUid by)
|
||||||
{
|
{
|
||||||
return _pullers.GetValueOrDefault(by);
|
return _pullers.GetValueOrDefault(by);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TryGetPulled(IEntity by, [NotNullWhen(true)] out IEntity? pulled)
|
public bool TryGetPulled(EntityUid by, [NotNullWhen(true)] out EntityUid? pulled)
|
||||||
{
|
{
|
||||||
return (pulled = GetPulled(by)) != null;
|
return (pulled = GetPulled(by)) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsPulling(IEntity puller)
|
public bool IsPulling(EntityUid puller)
|
||||||
{
|
{
|
||||||
return _pullers.ContainsKey(puller);
|
return _pullers.ContainsKey(puller);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdatePulledRotation(IEntity puller, IEntity pulled)
|
private void UpdatePulledRotation(EntityUid puller, EntityUid pulled)
|
||||||
{
|
{
|
||||||
// TODO: update once ComponentReference works with directed event bus.
|
// TODO: update once ComponentReference works with directed event bus.
|
||||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(pulled, out RotatableComponent? rotatable))
|
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(pulled, out RotatableComponent? rotatable))
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace Content.Shared.Random.Helpers
|
|||||||
{
|
{
|
||||||
public static class SharedEntityExtensions
|
public static class SharedEntityExtensions
|
||||||
{
|
{
|
||||||
public static void RandomOffset(this IEntity entity, float minX, float maxX, float minY, float maxY)
|
public static void RandomOffset(this EntityUid entity, float minX, float maxX, float minY, float maxY)
|
||||||
{
|
{
|
||||||
DebugTools.AssertNotNull(entity);
|
DebugTools.AssertNotNull(entity);
|
||||||
DebugTools.Assert(minX <= maxX, $"Minimum X value ({minX}) must be smaller than or equal to the maximum X value ({maxX})");
|
DebugTools.Assert(minX <= maxX, $"Minimum X value ({minX}) must be smaller than or equal to the maximum X value ({maxX})");
|
||||||
@@ -23,7 +23,7 @@ namespace Content.Shared.Random.Helpers
|
|||||||
IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(entity).LocalPosition += offset;
|
IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(entity).LocalPosition += offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void RandomOffset(this IEntity entity, float min, float max)
|
public static void RandomOffset(this EntityUid entity, float min, float max)
|
||||||
{
|
{
|
||||||
DebugTools.AssertNotNull(entity);
|
DebugTools.AssertNotNull(entity);
|
||||||
DebugTools.Assert(min <= max, $"Minimum value ({min}) must be smaller than or equal to the maximum value ({max})");
|
DebugTools.Assert(min <= max, $"Minimum value ({min}) must be smaller than or equal to the maximum value ({max})");
|
||||||
@@ -31,7 +31,7 @@ namespace Content.Shared.Random.Helpers
|
|||||||
entity.RandomOffset(min, max, min, max);
|
entity.RandomOffset(min, max, min, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void RandomOffset(this IEntity entity, float value)
|
public static void RandomOffset(this EntityUid entity, float value)
|
||||||
{
|
{
|
||||||
value = Math.Abs(value);
|
value = Math.Abs(value);
|
||||||
entity.RandomOffset(-value, value);
|
entity.RandomOffset(-value, value);
|
||||||
|
|||||||
@@ -9,6 +9,6 @@ namespace Content.Shared.Roles
|
|||||||
[ImplicitDataDefinitionForInheritors]
|
[ImplicitDataDefinitionForInheritors]
|
||||||
public abstract class JobSpecial
|
public abstract class JobSpecial
|
||||||
{
|
{
|
||||||
public abstract void AfterEquip(IEntity mob);
|
public abstract void AfterEquip(EntityUid mob);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ namespace Content.Shared.Storage
|
|||||||
{
|
{
|
||||||
public override string Name => "Storage";
|
public override string Name => "Storage";
|
||||||
|
|
||||||
public abstract IReadOnlyList<IEntity>? StoredEntities { get; }
|
public abstract IReadOnlyList<EntityUid>? StoredEntities { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Removes from the storage container and updates the stored value
|
/// Removes from the storage container and updates the stored value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="entity">The entity to remove</param>
|
/// <param name="entity">The entity to remove</param>
|
||||||
/// <returns>True if no longer in storage, false otherwise</returns>
|
/// <returns>True if no longer in storage, false otherwise</returns>
|
||||||
public abstract bool Remove(IEntity entity);
|
public abstract bool Remove(EntityUid entity);
|
||||||
|
|
||||||
bool IDraggable.CanDrop(CanDropEvent args)
|
bool IDraggable.CanDrop(CanDropEvent args)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace Content.Shared.Strip.Components
|
|||||||
{
|
{
|
||||||
public override string Name => "Strippable";
|
public override string Name => "Strippable";
|
||||||
|
|
||||||
public bool CanBeStripped(IEntity by)
|
public bool CanBeStripped(EntityUid by)
|
||||||
{
|
{
|
||||||
return by != Owner
|
return by != Owner
|
||||||
&& IoCManager.Resolve<IEntityManager>().HasComponent<SharedHandsComponent>(@by)
|
&& IoCManager.Resolve<IEntityManager>().HasComponent<SharedHandsComponent>(@by)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace Content.Shared.Tag
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
|
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public static bool AddTag(this IEntity entity, string id)
|
public static bool AddTag(this EntityUid entity, string id)
|
||||||
{
|
{
|
||||||
return entity.EnsureComponent(out TagComponent tagComponent) &&
|
return entity.EnsureComponent(out TagComponent tagComponent) &&
|
||||||
tagComponent.AddTag(id);
|
tagComponent.AddTag(id);
|
||||||
@@ -35,7 +35,7 @@ namespace Content.Shared.Tag
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public static bool AddTags(this IEntity entity, params string[] ids)
|
public static bool AddTags(this EntityUid entity, params string[] ids)
|
||||||
{
|
{
|
||||||
return entity.EnsureComponent(out TagComponent tagComponent) &&
|
return entity.EnsureComponent(out TagComponent tagComponent) &&
|
||||||
tagComponent.AddTags(ids);
|
tagComponent.AddTags(ids);
|
||||||
@@ -52,7 +52,7 @@ namespace Content.Shared.Tag
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public static bool AddTags(this IEntity entity, IEnumerable<string> ids)
|
public static bool AddTags(this EntityUid entity, IEnumerable<string> ids)
|
||||||
{
|
{
|
||||||
return entity.EnsureComponent(out TagComponent tagComponent) &&
|
return entity.EnsureComponent(out TagComponent tagComponent) &&
|
||||||
tagComponent.AddTags(ids);
|
tagComponent.AddTags(ids);
|
||||||
@@ -70,7 +70,7 @@ namespace Content.Shared.Tag
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
|
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public static bool TryAddTag(this IEntity entity, string id)
|
public static bool TryAddTag(this EntityUid entity, string id)
|
||||||
{
|
{
|
||||||
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
||||||
tagComponent.AddTag(id);
|
tagComponent.AddTag(id);
|
||||||
@@ -88,7 +88,7 @@ namespace Content.Shared.Tag
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public static bool TryAddTags(this IEntity entity, params string[] ids)
|
public static bool TryAddTags(this EntityUid entity, params string[] ids)
|
||||||
{
|
{
|
||||||
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
||||||
tagComponent.AddTags(ids);
|
tagComponent.AddTags(ids);
|
||||||
@@ -106,7 +106,7 @@ namespace Content.Shared.Tag
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public static bool TryAddTags(this IEntity entity, IEnumerable<string> ids)
|
public static bool TryAddTags(this EntityUid entity, IEnumerable<string> ids)
|
||||||
{
|
{
|
||||||
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
||||||
tagComponent.AddTags(ids);
|
tagComponent.AddTags(ids);
|
||||||
@@ -121,7 +121,7 @@ namespace Content.Shared.Tag
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
|
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public static bool HasTag(this IEntity entity, string id)
|
public static bool HasTag(this EntityUid entity, string id)
|
||||||
{
|
{
|
||||||
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
||||||
tagComponent.HasTag(id);
|
tagComponent.HasTag(id);
|
||||||
@@ -136,7 +136,7 @@ namespace Content.Shared.Tag
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public static bool HasAllTags(this IEntity entity, params string[] ids)
|
public static bool HasAllTags(this EntityUid entity, params string[] ids)
|
||||||
{
|
{
|
||||||
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
||||||
tagComponent.HasAllTags(ids);
|
tagComponent.HasAllTags(ids);
|
||||||
@@ -151,7 +151,7 @@ namespace Content.Shared.Tag
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public static bool HasAllTags(this IEntity entity, IEnumerable<string> ids)
|
public static bool HasAllTags(this EntityUid entity, IEnumerable<string> ids)
|
||||||
{
|
{
|
||||||
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
||||||
tagComponent.HasAllTags(ids);
|
tagComponent.HasAllTags(ids);
|
||||||
@@ -166,7 +166,7 @@ namespace Content.Shared.Tag
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public static bool HasAnyTag(this IEntity entity, params string[] ids)
|
public static bool HasAnyTag(this EntityUid entity, params string[] ids)
|
||||||
{
|
{
|
||||||
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
||||||
tagComponent.HasAnyTag(ids);
|
tagComponent.HasAnyTag(ids);
|
||||||
@@ -181,7 +181,7 @@ namespace Content.Shared.Tag
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public static bool HasAnyTag(this IEntity entity, IEnumerable<string> ids)
|
public static bool HasAnyTag(this EntityUid entity, IEnumerable<string> ids)
|
||||||
{
|
{
|
||||||
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
||||||
tagComponent.HasAnyTag(ids);
|
tagComponent.HasAnyTag(ids);
|
||||||
@@ -198,7 +198,7 @@ namespace Content.Shared.Tag
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
|
/// Thrown if no <see cref="TagPrototype"/> exists with the given id.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public static bool RemoveTag(this IEntity entity, string id)
|
public static bool RemoveTag(this EntityUid entity, string id)
|
||||||
{
|
{
|
||||||
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
||||||
tagComponent.RemoveTag(id);
|
tagComponent.RemoveTag(id);
|
||||||
@@ -215,7 +215,7 @@ namespace Content.Shared.Tag
|
|||||||
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public static bool RemoveTags(this IEntity entity, params string[] ids)
|
public static bool RemoveTags(this EntityUid entity, params string[] ids)
|
||||||
{
|
{
|
||||||
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
||||||
tagComponent.RemoveTags(ids);
|
tagComponent.RemoveTags(ids);
|
||||||
@@ -232,7 +232,7 @@ namespace Content.Shared.Tag
|
|||||||
/// <exception cref="UnknownPrototypeException">
|
/// <exception cref="UnknownPrototypeException">
|
||||||
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
/// Thrown if one of the ids represents an unregistered <see cref="TagPrototype"/>.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
public static bool RemoveTags(this IEntity entity, IEnumerable<string> ids)
|
public static bool RemoveTags(this EntityUid entity, IEnumerable<string> ids)
|
||||||
{
|
{
|
||||||
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out TagComponent? tagComponent) &&
|
||||||
tagComponent.RemoveTags(ids);
|
tagComponent.RemoveTags(ids);
|
||||||
|
|||||||
@@ -13,19 +13,19 @@ namespace Content.Shared.Throwing
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The entity that threw <see cref="Thrown"/>.
|
/// The entity that threw <see cref="Thrown"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity? User { get; }
|
public EntityUid? User { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The entity thrown by <see cref="User"/> that hit <see cref="Target"/>
|
/// The entity thrown by <see cref="User"/> that hit <see cref="Target"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity Thrown { get; }
|
public EntityUid Thrown { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The entity hit with <see cref="Thrown"/> by <see cref="User"/>
|
/// The entity hit with <see cref="Thrown"/> by <see cref="User"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity Target { get; }
|
public EntityUid Target { get; }
|
||||||
|
|
||||||
public ThrowEvent(IEntity? user, IEntity thrown, IEntity target)
|
public ThrowEvent(EntityUid? user, EntityUid thrown, EntityUid target)
|
||||||
{
|
{
|
||||||
User = user;
|
User = user;
|
||||||
Thrown = thrown;
|
Thrown = thrown;
|
||||||
@@ -38,7 +38,7 @@ namespace Content.Shared.Throwing
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class ThrowHitByEvent : ThrowEvent
|
public class ThrowHitByEvent : ThrowEvent
|
||||||
{
|
{
|
||||||
public ThrowHitByEvent(IEntity? user, IEntity thrown, IEntity target) : base(user, thrown, target)
|
public ThrowHitByEvent(EntityUid? user, EntityUid thrown, EntityUid target) : base(user, thrown, target)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,7 +48,7 @@ namespace Content.Shared.Throwing
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class ThrowDoHitEvent : ThrowEvent
|
public class ThrowDoHitEvent : ThrowEvent
|
||||||
{
|
{
|
||||||
public ThrowDoHitEvent(IEntity? user, IEntity thrown, IEntity target) : base(user, thrown, target)
|
public ThrowDoHitEvent(EntityUid? user, EntityUid thrown, EntityUid target) : base(user, thrown, target)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace Content.Shared.Throwing
|
|||||||
{
|
{
|
||||||
public override string Name => "ThrownItem";
|
public override string Name => "ThrownItem";
|
||||||
|
|
||||||
public IEntity? Thrower { get; set; }
|
public EntityUid? Thrower { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ namespace Content.Shared.Throwing
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Raises collision events on the thrown and target entities.
|
/// Raises collision events on the thrown and target entities.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ThrowCollideInteraction(IEntity? user, IPhysBody thrown, IPhysBody target)
|
public void ThrowCollideInteraction(EntityUid? user, IPhysBody thrown, IPhysBody target)
|
||||||
{
|
{
|
||||||
if (user is not null)
|
if (user is not null)
|
||||||
_adminLogSystem.Add(LogType.ThrowHit, LogImpact.Low,
|
_adminLogSystem.Add(LogType.ThrowHit, LogImpact.Low,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace Content.Shared.Transform
|
|||||||
transform.AttachParent(grandParent);
|
transform.AttachParent(grandParent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void AttachToGrandparent(this IEntity entity)
|
public static void AttachToGrandparent(this EntityUid entity)
|
||||||
{
|
{
|
||||||
AttachToGrandparent(IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(entity));
|
AttachToGrandparent(IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(entity));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ namespace Content.Shared.Weapons.Melee
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity used to attack, for broadcast purposes.
|
/// Entity used to attack, for broadcast purposes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity Used { get; }
|
public EntityUid Used { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity that triggered the attack.
|
/// Entity that triggered the attack.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity User { get; }
|
public EntityUid User { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The original location that was clicked by the user.
|
/// The original location that was clicked by the user.
|
||||||
@@ -32,9 +32,9 @@ namespace Content.Shared.Weapons.Melee
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity that was attacked.
|
/// Entity that was attacked.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity? TargetEntity { get; }
|
public EntityUid? TargetEntity { get; }
|
||||||
|
|
||||||
public ClickAttackEvent(IEntity used, IEntity user, EntityCoordinates clickLocation, EntityUid target = default)
|
public ClickAttackEvent(EntityUid used, EntityUid user, EntityCoordinates clickLocation, EntityUid target = default)
|
||||||
{
|
{
|
||||||
Used = used;
|
Used = used;
|
||||||
User = user;
|
User = user;
|
||||||
@@ -54,19 +54,19 @@ namespace Content.Shared.Weapons.Melee
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity used to attack, for broadcast purposes.
|
/// Entity used to attack, for broadcast purposes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity Used { get; }
|
public EntityUid Used { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity that triggered the attack.
|
/// Entity that triggered the attack.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity User { get; }
|
public EntityUid User { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The original location that was clicked by the user.
|
/// The original location that was clicked by the user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public EntityCoordinates ClickLocation { get; }
|
public EntityCoordinates ClickLocation { get; }
|
||||||
|
|
||||||
public WideAttackEvent(IEntity used, IEntity user, EntityCoordinates clickLocation)
|
public WideAttackEvent(EntityUid used, EntityUid user, EntityCoordinates clickLocation)
|
||||||
{
|
{
|
||||||
Used = used;
|
Used = used;
|
||||||
User = user;
|
User = user;
|
||||||
@@ -82,19 +82,19 @@ namespace Content.Shared.Weapons.Melee
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity used to attack, for broadcast purposes.
|
/// Entity used to attack, for broadcast purposes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity Used { get; }
|
public EntityUid Used { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Entity that triggered the attack.
|
/// Entity that triggered the attack.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEntity User { get; }
|
public EntityUid User { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The original location that was clicked by the user.
|
/// The original location that was clicked by the user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public EntityCoordinates ClickLocation { get; }
|
public EntityCoordinates ClickLocation { get; }
|
||||||
|
|
||||||
public AttackedEvent(IEntity used, IEntity user, EntityCoordinates clickLocation)
|
public AttackedEvent(EntityUid used, EntityUid user, EntityCoordinates clickLocation)
|
||||||
{
|
{
|
||||||
Used = used;
|
Used = used;
|
||||||
User = user;
|
User = user;
|
||||||
|
|||||||
Reference in New Issue
Block a user