diff --git a/Content.Shared/Actions/Behaviors/IActionBehavior.cs b/Content.Shared/Actions/Behaviors/IActionBehavior.cs
index 2a3db91969..304db1620e 100644
--- a/Content.Shared/Actions/Behaviors/IActionBehavior.cs
+++ b/Content.Shared/Actions/Behaviors/IActionBehavior.cs
@@ -21,7 +21,7 @@ namespace Content.Shared.Actions.Behaviors
///
/// Entity performing the action.
///
- public readonly IEntity Performer;
+ public readonly EntityUid Performer;
///
/// Action being performed
///
@@ -31,7 +31,7 @@ namespace Content.Shared.Actions.Behaviors
///
public readonly SharedActionsComponent? PerformerActions;
- public ActionEventArgs(IEntity performer, ActionType actionType)
+ public ActionEventArgs(EntityUid performer, ActionType actionType)
{
Performer = performer;
ActionType = actionType;
diff --git a/Content.Shared/Actions/Behaviors/IInstantAction.cs b/Content.Shared/Actions/Behaviors/IInstantAction.cs
index 9d3c07bed7..910f226bb2 100644
--- a/Content.Shared/Actions/Behaviors/IInstantAction.cs
+++ b/Content.Shared/Actions/Behaviors/IInstantAction.cs
@@ -18,7 +18,7 @@ namespace Content.Shared.Actions.Behaviors
public class InstantActionEventArgs : ActionEventArgs
{
- public InstantActionEventArgs(IEntity performer, ActionType actionType) : base(performer, actionType)
+ public InstantActionEventArgs(EntityUid performer, ActionType actionType) : base(performer, actionType)
{
}
}
diff --git a/Content.Shared/Actions/Behaviors/ITargetEntityAction.cs b/Content.Shared/Actions/Behaviors/ITargetEntityAction.cs
index 9e8e8b8579..4288585371 100644
--- a/Content.Shared/Actions/Behaviors/ITargetEntityAction.cs
+++ b/Content.Shared/Actions/Behaviors/ITargetEntityAction.cs
@@ -19,9 +19,9 @@ namespace Content.Shared.Actions.Behaviors
///
/// Entity being targeted
///
- public readonly IEntity Target;
+ public readonly EntityUid Target;
- public TargetEntityActionEventArgs(IEntity performer, ActionType actionType, IEntity target) :
+ public TargetEntityActionEventArgs(EntityUid performer, ActionType actionType, EntityUid target) :
base(performer, actionType)
{
Target = target;
diff --git a/Content.Shared/Actions/Behaviors/ITargetEntityItemAction.cs b/Content.Shared/Actions/Behaviors/ITargetEntityItemAction.cs
index 26d5c3eb62..d761251a26 100644
--- a/Content.Shared/Actions/Behaviors/ITargetEntityItemAction.cs
+++ b/Content.Shared/Actions/Behaviors/ITargetEntityItemAction.cs
@@ -20,9 +20,9 @@ namespace Content.Shared.Actions.Behaviors
///
/// Entity being targeted
///
- public readonly IEntity Target;
+ public readonly EntityUid Target;
- public TargetEntityItemActionEventArgs(IEntity performer, IEntity target, IEntity item,
+ public TargetEntityItemActionEventArgs(EntityUid performer, EntityUid target, EntityUid item,
ItemActionType actionType) : base(performer, item, actionType)
{
Target = target;
diff --git a/Content.Shared/Actions/Behaviors/ITargetPointAction.cs b/Content.Shared/Actions/Behaviors/ITargetPointAction.cs
index 6e03e7ef3e..724a4acd17 100644
--- a/Content.Shared/Actions/Behaviors/ITargetPointAction.cs
+++ b/Content.Shared/Actions/Behaviors/ITargetPointAction.cs
@@ -23,7 +23,7 @@ namespace Content.Shared.Actions.Behaviors
///
public readonly EntityCoordinates Target;
- public TargetPointActionEventArgs(IEntity performer, EntityCoordinates target, ActionType actionType)
+ public TargetPointActionEventArgs(EntityUid performer, EntityCoordinates target, ActionType actionType)
: base(performer, actionType)
{
Target = target;
diff --git a/Content.Shared/Actions/Behaviors/ITargetPointItemAction.cs b/Content.Shared/Actions/Behaviors/ITargetPointItemAction.cs
index 9619f092c4..a2725ff7e0 100644
--- a/Content.Shared/Actions/Behaviors/ITargetPointItemAction.cs
+++ b/Content.Shared/Actions/Behaviors/ITargetPointItemAction.cs
@@ -24,7 +24,7 @@ namespace Content.Shared.Actions.Behaviors
///
public readonly EntityCoordinates Target;
- public TargetPointItemActionEventArgs(IEntity performer, EntityCoordinates target, IEntity item,
+ public TargetPointItemActionEventArgs(EntityUid performer, EntityCoordinates target, EntityUid item,
ItemActionType actionType) : base(performer, item, actionType)
{
Target = target;
diff --git a/Content.Shared/Actions/Behaviors/IToggleAction.cs b/Content.Shared/Actions/Behaviors/IToggleAction.cs
index 2c56ec3a97..3fecdc734a 100644
--- a/Content.Shared/Actions/Behaviors/IToggleAction.cs
+++ b/Content.Shared/Actions/Behaviors/IToggleAction.cs
@@ -33,7 +33,7 @@ namespace Content.Shared.Actions.Behaviors
///
public bool ToggledOff => !ToggledOn;
- public ToggleActionEventArgs(IEntity performer, ActionType actionType, bool toggledOn) : base(performer, actionType)
+ public ToggleActionEventArgs(EntityUid performer, ActionType actionType, bool toggledOn) : base(performer, actionType)
{
ToggledOn = toggledOn;
}
diff --git a/Content.Shared/Actions/Behaviors/Item/IInstantItemAction.cs b/Content.Shared/Actions/Behaviors/Item/IInstantItemAction.cs
index 4ac8656719..918997dc2f 100644
--- a/Content.Shared/Actions/Behaviors/Item/IInstantItemAction.cs
+++ b/Content.Shared/Actions/Behaviors/Item/IInstantItemAction.cs
@@ -18,7 +18,7 @@ namespace Content.Shared.Actions.Behaviors.Item
public class InstantItemActionEventArgs : ItemActionEventArgs
{
- public InstantItemActionEventArgs(IEntity performer, IEntity item, ItemActionType actionType) :
+ public InstantItemActionEventArgs(EntityUid performer, EntityUid item, ItemActionType actionType) :
base(performer, item, actionType)
{
}
diff --git a/Content.Shared/Actions/Behaviors/Item/IItemActionBehavior.cs b/Content.Shared/Actions/Behaviors/Item/IItemActionBehavior.cs
index 8bad8d5227..864310906c 100644
--- a/Content.Shared/Actions/Behaviors/Item/IItemActionBehavior.cs
+++ b/Content.Shared/Actions/Behaviors/Item/IItemActionBehavior.cs
@@ -22,11 +22,11 @@ namespace Content.Shared.Actions.Behaviors.Item
///
/// Entity performing the action.
///
- public readonly IEntity Performer;
+ public readonly EntityUid Performer;
///
/// Item being used to perform the action
///
- public readonly IEntity Item;
+ public readonly EntityUid Item;
///
/// Action being performed
///
@@ -36,7 +36,7 @@ namespace Content.Shared.Actions.Behaviors.Item
///
public readonly ItemActionsComponent? ItemActions;
- public ItemActionEventArgs(IEntity performer, IEntity item, ItemActionType actionType)
+ public ItemActionEventArgs(EntityUid performer, EntityUid item, ItemActionType actionType)
{
Performer = performer;
ActionType = actionType;
diff --git a/Content.Shared/Actions/Behaviors/Item/IToggleItemAction.cs b/Content.Shared/Actions/Behaviors/Item/IToggleItemAction.cs
index d21ebf7cf5..4d0a0cdaf4 100644
--- a/Content.Shared/Actions/Behaviors/Item/IToggleItemAction.cs
+++ b/Content.Shared/Actions/Behaviors/Item/IToggleItemAction.cs
@@ -33,7 +33,7 @@ namespace Content.Shared.Actions.Behaviors.Item
///
public bool ToggledOff => !ToggledOn;
- public ToggleItemActionEventArgs(IEntity performer, bool toggledOn, IEntity item,
+ public ToggleItemActionEventArgs(EntityUid performer, bool toggledOn, EntityUid item,
ItemActionType actionType) : base(performer, item, actionType)
{
ToggledOn = toggledOn;
diff --git a/Content.Shared/Actions/Components/ItemActionsComponent.cs b/Content.Shared/Actions/Components/ItemActionsComponent.cs
index acbd4b2fa3..d01738fe06 100644
--- a/Content.Shared/Actions/Components/ItemActionsComponent.cs
+++ b/Content.Shared/Actions/Components/ItemActionsComponent.cs
@@ -47,7 +47,7 @@ namespace Content.Shared.Actions.Components
///
/// Entity currently holding this in hand or equip slot. Null if not held.
///
- public IEntity? Holder { get; private set; }
+ public EntityUid? Holder { get; private set; }
// cached actions component of the holder, since we'll need to access it frequently
private SharedActionsComponent? _holderActionsComponent;
diff --git a/Content.Shared/Actions/Components/SharedActionsComponent.cs b/Content.Shared/Actions/Components/SharedActionsComponent.cs
index 8d4a3b121b..40d0a5df8e 100644
--- a/Content.Shared/Actions/Components/SharedActionsComponent.cs
+++ b/Content.Shared/Actions/Components/SharedActionsComponent.cs
@@ -119,13 +119,6 @@ namespace Content.Shared.Actions.Components
return false;
}
- ///
- public bool TryGetItemActionStates(IEntity item,
- [NotNullWhen((true))] out IReadOnlyDictionary? itemActionStates)
- {
- return TryGetItemActionStates((EntityUid) item, out itemActionStates);
- }
-
///
/// Gets the item action state associated with the specified item action type for the specified item, if it has any.
///
@@ -170,12 +163,6 @@ namespace Content.Shared.Actions.Components
.Any(state => state.Key == actionType && state.Value.Enabled);
}
- ///
- public bool TryGetItemActionState(ItemActionType actionType, IEntity item, out ActionState actionState)
- {
- return TryGetItemActionState(actionType, (EntityUid) item, out actionState);
- }
-
///
/// Gets all action types that have non-initial state (granted, have a cooldown, or toggled on).
///
diff --git a/Content.Shared/Actions/IActionAttempt.cs b/Content.Shared/Actions/IActionAttempt.cs
index ac8af06bc2..5aa6eb90bd 100644
--- a/Content.Shared/Actions/IActionAttempt.cs
+++ b/Content.Shared/Actions/IActionAttempt.cs
@@ -39,24 +39,24 @@ namespace Content.Shared.Actions
///
/// Perform the server-side logic of the action
///
- void DoInstantAction(IEntity player);
+ void DoInstantAction(EntityUid player);
///
/// Perform the server-side logic of the toggle action
///
/// true if the attempt to toggle was successful, meaning the state should be toggled to the
/// indicated value
- bool DoToggleAction(IEntity player, bool on);
+ bool DoToggleAction(EntityUid player, bool on);
///
/// Perform the server-side logic of the target point action
///
- void DoTargetPointAction(IEntity player, EntityCoordinates target);
+ void DoTargetPointAction(EntityUid player, EntityCoordinates target);
///
/// Perform the server-side logic of the target entity action
///
- void DoTargetEntityAction(IEntity player, IEntity target);
+ void DoTargetEntityAction(EntityUid player, EntityUid target);
}
public class ActionAttempt : IActionAttempt
@@ -80,22 +80,22 @@ namespace Content.Shared.Actions
actionsComponent.ToggleAction(_action.ActionType, toggleOn);
}
- public void DoInstantAction(IEntity player)
+ public void DoInstantAction(EntityUid player)
{
_action.InstantAction.DoInstantAction(new InstantActionEventArgs(player, _action.ActionType));
}
- public bool DoToggleAction(IEntity player, bool on)
+ public bool DoToggleAction(EntityUid player, bool on)
{
return _action.ToggleAction.DoToggleAction(new ToggleActionEventArgs(player, _action.ActionType, on));
}
- public void DoTargetPointAction(IEntity player, EntityCoordinates target)
+ public void DoTargetPointAction(EntityUid player, EntityCoordinates target)
{
_action.TargetPointAction.DoTargetPointAction(new TargetPointActionEventArgs(player, target, _action.ActionType));
}
- public void DoTargetEntityAction(IEntity player, IEntity target)
+ public void DoTargetEntityAction(EntityUid player, EntityUid target)
{
_action.TargetEntityAction.DoTargetEntityAction(new TargetEntityActionEventArgs(player, _action.ActionType,
target));
@@ -142,35 +142,35 @@ namespace Content.Shared.Actions
public class ItemActionAttempt : IActionAttempt
{
private readonly ItemActionPrototype _action;
- private readonly IEntity _item;
+ private readonly EntityUid _item;
private readonly ItemActionsComponent _itemActions;
public BaseActionPrototype Action => _action;
- public ItemActionAttempt(ItemActionPrototype action, IEntity item, ItemActionsComponent itemActions)
+ public ItemActionAttempt(ItemActionPrototype action, EntityUid item, ItemActionsComponent itemActions)
{
_action = action;
_item = item;
_itemActions = itemActions;
}
- public void DoInstantAction(IEntity player)
+ public void DoInstantAction(EntityUid player)
{
_action.InstantAction.DoInstantAction(new InstantItemActionEventArgs(player, _item, _action.ActionType));
}
- public bool DoToggleAction(IEntity player, bool on)
+ public bool DoToggleAction(EntityUid player, bool on)
{
return _action.ToggleAction.DoToggleAction(new ToggleItemActionEventArgs(player, on, _item, _action.ActionType));
}
- public void DoTargetPointAction(IEntity player, EntityCoordinates target)
+ public void DoTargetPointAction(EntityUid player, EntityCoordinates target)
{
_action.TargetPointAction.DoTargetPointAction(new TargetPointItemActionEventArgs(player, target, _item,
_action.ActionType));
}
- public void DoTargetEntityAction(IEntity player, IEntity target)
+ public void DoTargetEntityAction(EntityUid player, EntityUid target)
{
_action.TargetEntityAction.DoTargetEntityAction(new TargetEntityItemActionEventArgs(player, target,
_item, _action.ActionType));
diff --git a/Content.Shared/Buckle/Components/SharedStrapComponent.cs b/Content.Shared/Buckle/Components/SharedStrapComponent.cs
index 6fbd7922b6..d396eacf32 100644
--- a/Content.Shared/Buckle/Components/SharedStrapComponent.cs
+++ b/Content.Shared/Buckle/Components/SharedStrapComponent.cs
@@ -34,7 +34,7 @@ namespace Content.Shared.Buckle.Components
bool IDragDropOn.CanDragDropOn(DragDropEvent eventArgs)
{
if (!IoCManager.Resolve().TryGetComponent(eventArgs.Dragged, out SharedBuckleComponent? buckleComponent)) return false;
- bool Ignored(IEntity entity) => entity == eventArgs.User || entity == eventArgs.Dragged || entity == eventArgs.Target;
+ bool Ignored(EntityUid entity) => entity == eventArgs.User || entity == eventArgs.Dragged || entity == eventArgs.Target;
return eventArgs.Target.InRangeUnobstructed(eventArgs.Dragged, buckleComponent.Range, predicate: Ignored);
}
@@ -73,7 +73,7 @@ namespace Content.Shared.Buckle.Components
/// The entity that had its buckling status changed
/// The strap that the entity was buckled to or unbuckled from
/// True if the entity was buckled, false otherwise
- protected StrapChangeMessage(IEntity entity, IEntity strap, bool buckled)
+ protected StrapChangeMessage(EntityUid entity, EntityUid strap, bool buckled)
{
Entity = entity;
Strap = strap;
@@ -83,12 +83,12 @@ namespace Content.Shared.Buckle.Components
///
/// The entity that had its buckling status changed
///
- public IEntity Entity { get; }
+ public EntityUid Entity { get; }
///
/// The strap that the entity was buckled to or unbuckled from
///
- public IEntity Strap { get; }
+ public EntityUid Strap { get; }
///
/// True if the entity was buckled, false otherwise.
@@ -104,7 +104,7 @@ namespace Content.Shared.Buckle.Components
///
/// The entity that had its buckling status changed
/// The strap that the entity was buckled to or unbuckled from
- public StrapMessage(IEntity entity, IEntity strap) : base(entity, strap, true)
+ public StrapMessage(EntityUid entity, EntityUid strap) : base(entity, strap, true)
{
}
}
@@ -117,7 +117,7 @@ namespace Content.Shared.Buckle.Components
///
/// The entity that had its buckling status changed
/// The strap that the entity was buckled to or unbuckled from
- public UnStrapMessage(IEntity entity, IEntity strap) : base(entity, strap, false)
+ public UnStrapMessage(EntityUid entity, EntityUid strap) : base(entity, strap, false)
{
}
}
diff --git a/Content.Shared/Construction/Conditions/IConstructionCondition.cs b/Content.Shared/Construction/Conditions/IConstructionCondition.cs
index 44f9084587..ab5ecc8592 100644
--- a/Content.Shared/Construction/Conditions/IConstructionCondition.cs
+++ b/Content.Shared/Construction/Conditions/IConstructionCondition.cs
@@ -7,6 +7,6 @@ namespace Content.Shared.Construction.Conditions
public interface IConstructionCondition
{
ConstructionGuideEntry? GenerateGuideEntry();
- bool Condition(IEntity user, EntityCoordinates location, Direction direction);
+ bool Condition(EntityUid user, EntityCoordinates location, Direction direction);
}
}
diff --git a/Content.Shared/Construction/Conditions/NoWindowsInTile.cs b/Content.Shared/Construction/Conditions/NoWindowsInTile.cs
index cc3a840a5e..a5f37f5aff 100644
--- a/Content.Shared/Construction/Conditions/NoWindowsInTile.cs
+++ b/Content.Shared/Construction/Conditions/NoWindowsInTile.cs
@@ -13,7 +13,7 @@ namespace Content.Shared.Construction.Conditions
[DataDefinition]
public class NoWindowsInTile : IConstructionCondition
{
- public bool Condition(IEntity user, EntityCoordinates location, Direction direction)
+ public bool Condition(EntityUid user, EntityCoordinates location, Direction direction)
{
foreach (var entity in location.GetEntitiesInTile(LookupFlags.Approximate | LookupFlags.IncludeAnchored))
{
diff --git a/Content.Shared/Construction/Conditions/TileNotBlocked.cs b/Content.Shared/Construction/Conditions/TileNotBlocked.cs
index 190c6c7731..98ded48d46 100644
--- a/Content.Shared/Construction/Conditions/TileNotBlocked.cs
+++ b/Content.Shared/Construction/Conditions/TileNotBlocked.cs
@@ -14,7 +14,7 @@ namespace Content.Shared.Construction.Conditions
[DataField("filterMobs")] private bool _filterMobs = false;
[DataField("failIfSpace")] private bool _failIfSpace = true;
- public bool Condition(IEntity user, EntityCoordinates location, Direction direction)
+ public bool Condition(EntityUid user, EntityCoordinates location, Direction direction)
{
var tileRef = location.GetTileRef();
diff --git a/Content.Shared/Construction/Conditions/TileType.cs b/Content.Shared/Construction/Conditions/TileType.cs
index 41b5621ce7..e24d74db76 100644
--- a/Content.Shared/Construction/Conditions/TileType.cs
+++ b/Content.Shared/Construction/Conditions/TileType.cs
@@ -22,7 +22,7 @@ namespace Content.Shared.Construction.Conditions
[DataField("guideIcon")]
public SpriteSpecifier? GuideIcon = null;
- public bool Condition(IEntity user, EntityCoordinates location, Direction direction)
+ public bool Condition(EntityUid user, EntityCoordinates location, Direction direction)
{
if (TargetTiles == null) return true;
diff --git a/Content.Shared/Construction/Conditions/WallmountCondition.cs b/Content.Shared/Construction/Conditions/WallmountCondition.cs
index 966dd82383..e9b4866c62 100644
--- a/Content.Shared/Construction/Conditions/WallmountCondition.cs
+++ b/Content.Shared/Construction/Conditions/WallmountCondition.cs
@@ -16,7 +16,7 @@ namespace Content.Shared.Construction.Conditions
[DataDefinition]
public class WallmountCondition : IConstructionCondition
{
- public bool Condition(IEntity user, EntityCoordinates location, Direction direction)
+ public bool Condition(EntityUid user, EntityCoordinates location, Direction direction)
{
var entManager = IoCManager.Resolve();
diff --git a/Content.Shared/Construction/Steps/MaterialConstructionGraphStep.cs b/Content.Shared/Construction/Steps/MaterialConstructionGraphStep.cs
index 02834e9a2f..8ab0ead8bb 100644
--- a/Content.Shared/Construction/Steps/MaterialConstructionGraphStep.cs
+++ b/Content.Shared/Construction/Steps/MaterialConstructionGraphStep.cs
@@ -32,7 +32,7 @@ namespace Content.Shared.Construction.Steps
return entityManager.TryGetComponent(uid, out SharedStackComponent? stack) && stack.StackTypeId.Equals(MaterialPrototypeId) && stack.Count >= Amount;
}
- public bool EntityValid(IEntity entity, [NotNullWhen(true)] out SharedStackComponent? stack)
+ public bool EntityValid(EntityUid entity, [NotNullWhen(true)] out SharedStackComponent? stack)
{
if (IoCManager.Resolve().TryGetComponent(entity, out SharedStackComponent? otherStack) && otherStack.StackTypeId.Equals(MaterialPrototypeId) && otherStack.Count >= Amount)
stack = otherStack;
diff --git a/Content.Shared/Examine/ExamineSystemShared.cs b/Content.Shared/Examine/ExamineSystemShared.cs
index b68f975bac..76aed20529 100644
--- a/Content.Shared/Examine/ExamineSystemShared.cs
+++ b/Content.Shared/Examine/ExamineSystemShared.cs
@@ -48,7 +48,7 @@ namespace Content.Shared.Examine
public const float ExamineRange = 16f;
protected const float ExamineDetailsRange = 3f;
- private bool IsInDetailsRange(IEntity examiner, IEntity entity)
+ private bool IsInDetailsRange(EntityUid examiner, EntityUid entity)
{
// check if the mob is in ciritcal or dead
if (EntityManager.TryGetComponent(examiner, out MobStateComponent mobState) && mobState.IsIncapacitated())
@@ -62,14 +62,14 @@ namespace Content.Shared.Examine
}
[Pure]
- public bool CanExamine(IEntity examiner, IEntity examined)
+ public bool CanExamine(EntityUid examiner, EntityUid examined)
{
return CanExamine(examiner, IoCManager.Resolve().GetComponent(examined).MapPosition,
entity => entity == examiner || entity == examined);
}
[Pure]
- public virtual bool CanExamine(IEntity examiner, MapCoordinates target, Ignored? predicate = null)
+ public virtual bool CanExamine(EntityUid examiner, MapCoordinates target, Ignored? predicate = null)
{
if (!IoCManager.Resolve().TryGetComponent(examiner, out ExaminerComponent? examinerComponent))
return false;
@@ -146,7 +146,7 @@ namespace Content.Shared.Examine
return true;
}
- public static bool InRangeUnOccluded(IEntity origin, IEntity other, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
+ public static bool InRangeUnOccluded(EntityUid origin, EntityUid other, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
{
var originPos = IoCManager.Resolve().GetComponent(origin).MapPosition;
var otherPos = IoCManager.Resolve().GetComponent(other).MapPosition;
@@ -154,7 +154,7 @@ namespace Content.Shared.Examine
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
}
- public static bool InRangeUnOccluded(IEntity origin, IComponent other, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
+ public static bool InRangeUnOccluded(EntityUid origin, IComponent other, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
{
var originPos = IoCManager.Resolve().GetComponent(origin).MapPosition;
var otherPos = IoCManager.Resolve().GetComponent(other.Owner).MapPosition;
@@ -162,7 +162,7 @@ namespace Content.Shared.Examine
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
}
- public static bool InRangeUnOccluded(IEntity origin, EntityCoordinates other, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
+ public static bool InRangeUnOccluded(EntityUid origin, EntityCoordinates other, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
{
var originPos = IoCManager.Resolve().GetComponent(origin).MapPosition;
var otherPos = other.ToMap(IoCManager.Resolve());
@@ -170,7 +170,7 @@ namespace Content.Shared.Examine
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
}
- public static bool InRangeUnOccluded(IEntity origin, MapCoordinates other, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
+ public static bool InRangeUnOccluded(EntityUid origin, MapCoordinates other, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
{
var originPos = IoCManager.Resolve().GetComponent(origin).MapPosition;
@@ -196,13 +196,13 @@ namespace Content.Shared.Examine
public static bool InRangeUnOccluded(AfterInteractEventArgs args, float range, Ignored? predicate, bool ignoreInsideBlocker = true)
{
var originPos = IoCManager.Resolve().GetComponent(args.User).MapPosition;
- IEntity? tempQualifier = args.Target;
+ EntityUid? tempQualifier = args.Target;
var otherPos = (tempQualifier != null ? IoCManager.Resolve().GetComponent(tempQualifier) : null).MapPosition ?? args.ClickLocation.ToMap(IoCManager.Resolve());
return InRangeUnOccluded(originPos, otherPos, range, predicate, ignoreInsideBlocker);
}
- public FormattedMessage GetExamineText(IEntity entity, IEntity? examiner)
+ public FormattedMessage GetExamineText(EntityUid entity, EntityUid? examiner)
{
var message = new FormattedMessage();
@@ -223,8 +223,8 @@ namespace Content.Shared.Examine
message.PushColor(Color.DarkGray);
// Raise the event and let things that subscribe to it change the message...
- var isInDetailsRange = IsInDetailsRange(examiner, entity);
- var examinedEvent = new ExaminedEvent(message, entity, examiner, isInDetailsRange, doNewline);
+ var isInDetailsRange = IsInDetailsRange(examiner.Value, entity);
+ var examinedEvent = new ExaminedEvent(message, entity, examiner.Value, isInDetailsRange, doNewline);
RaiseLocalEvent(entity, examinedEvent);
//Add component statuses from components that report one
@@ -266,12 +266,12 @@ namespace Content.Shared.Examine
///
/// The entity performing the examining.
///
- public IEntity Examiner { get; }
+ public EntityUid Examiner { get; }
///
/// Entity being examined, for broadcast event purposes.
///
- public IEntity Examined { get; }
+ public EntityUid Examined { get; }
///
/// Whether the examiner is in range of the entity to get some extra details.
@@ -280,7 +280,7 @@ namespace Content.Shared.Examine
private bool _doNewLine;
- public ExaminedEvent(FormattedMessage message, IEntity examined, IEntity examiner, bool isInDetailsRange, bool doNewLine)
+ public ExaminedEvent(FormattedMessage message, EntityUid examined, EntityUid examiner, bool isInDetailsRange, bool doNewLine)
{
Message = message;
Examined = examined;
diff --git a/Content.Shared/Interaction/Helpers/SharedUnobstructedExtensions.cs b/Content.Shared/Interaction/Helpers/SharedUnobstructedExtensions.cs
index f608a86e95..f465280a7b 100644
--- a/Content.Shared/Interaction/Helpers/SharedUnobstructedExtensions.cs
+++ b/Content.Shared/Interaction/Helpers/SharedUnobstructedExtensions.cs
@@ -15,8 +15,8 @@ namespace Content.Shared.Interaction.Helpers
#region Entities
public static bool InRangeUnobstructed(
- this IEntity origin,
- IEntity other,
+ this EntityUid origin,
+ EntityUid other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
Ignored? predicate = null,
@@ -44,7 +44,7 @@ namespace Content.Shared.Interaction.Helpers
}
public static bool InRangeUnobstructed(
- this IEntity origin,
+ this EntityUid origin,
IComponent other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
@@ -57,7 +57,7 @@ namespace Content.Shared.Interaction.Helpers
}
public static bool InRangeUnobstructed(
- this IEntity origin,
+ this EntityUid origin,
IContainer other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
@@ -72,7 +72,7 @@ namespace Content.Shared.Interaction.Helpers
}
public static bool InRangeUnobstructed(
- this IEntity origin,
+ this EntityUid origin,
EntityCoordinates other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
@@ -85,7 +85,7 @@ namespace Content.Shared.Interaction.Helpers
}
public static bool InRangeUnobstructed(
- this IEntity origin,
+ this EntityUid origin,
MapCoordinates other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
@@ -101,7 +101,7 @@ namespace Content.Shared.Interaction.Helpers
#region Components
public static bool InRangeUnobstructed(
this IComponent origin,
- IEntity other,
+ EntityUid other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
Ignored? predicate = null,
@@ -179,7 +179,7 @@ namespace Content.Shared.Interaction.Helpers
#region Containers
public static bool InRangeUnobstructed(
this IContainer origin,
- IEntity other,
+ EntityUid other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
Ignored? predicate = null,
@@ -256,7 +256,7 @@ namespace Content.Shared.Interaction.Helpers
#region EntityCoordinates
public static bool InRangeUnobstructed(
this EntityCoordinates origin,
- IEntity other,
+ EntityUid other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
Ignored? predicate = null,
@@ -338,7 +338,7 @@ namespace Content.Shared.Interaction.Helpers
#region MapCoordinates
public static bool InRangeUnobstructed(
this MapCoordinates origin,
- IEntity other,
+ EntityUid other,
float range = InteractionRange,
CollisionGroup collisionMask = CollisionGroup.Impassable,
Ignored? predicate = null,
@@ -434,7 +434,7 @@ namespace Content.Shared.Interaction.Helpers
if (target == null)
return SharedInteractionSystem.InRangeUnobstructed(user, args.ClickLocation, range, collisionMask, predicate, ignoreInsideBlocker, popup);
else
- return SharedInteractionSystem.InRangeUnobstructed(user, target, range, collisionMask, predicate, ignoreInsideBlocker, popup);
+ return SharedInteractionSystem.InRangeUnobstructed(user, target.Value, range, collisionMask, predicate, ignoreInsideBlocker, popup);
}
#endregion
@@ -475,7 +475,7 @@ namespace Content.Shared.Interaction.Helpers
if (target == null)
return SharedInteractionSystem.InRangeUnobstructed(user, args.ClickLocation, range, collisionMask, predicate, ignoreInsideBlocker, popup);
else
- return SharedInteractionSystem.InRangeUnobstructed(user, target, range, collisionMask, predicate, ignoreInsideBlocker, popup);
+ return SharedInteractionSystem.InRangeUnobstructed(user, target.Value, range, collisionMask, predicate, ignoreInsideBlocker, popup);
}
#endregion
}
diff --git a/Content.Shared/Interaction/Helpers/SharedUnoccludedExtensions.cs b/Content.Shared/Interaction/Helpers/SharedUnoccludedExtensions.cs
index e11b1ed881..57817841fb 100644
--- a/Content.Shared/Interaction/Helpers/SharedUnoccludedExtensions.cs
+++ b/Content.Shared/Interaction/Helpers/SharedUnoccludedExtensions.cs
@@ -13,8 +13,8 @@ namespace Content.Shared.Interaction.Helpers
{
#region Entities
public static bool InRangeUnOccluded(
- this IEntity origin,
- IEntity other,
+ this EntityUid origin,
+ EntityUid other,
float range = ExamineRange,
Ignored? predicate = null,
bool ignoreInsideBlocker = true)
@@ -23,7 +23,7 @@ namespace Content.Shared.Interaction.Helpers
}
public static bool InRangeUnOccluded(
- this IEntity origin,
+ this EntityUid origin,
IComponent other,
float range = InteractionRange,
Ignored? predicate = null,
@@ -33,7 +33,7 @@ namespace Content.Shared.Interaction.Helpers
}
public static bool InRangeUnOccluded(
- this IEntity origin,
+ this EntityUid origin,
IContainer other,
float range = InteractionRange,
Ignored? predicate = null,
@@ -45,7 +45,7 @@ namespace Content.Shared.Interaction.Helpers
}
public static bool InRangeUnOccluded(
- this IEntity origin,
+ this EntityUid origin,
EntityCoordinates other,
float range = InteractionRange,
Ignored? predicate = null,
@@ -55,7 +55,7 @@ namespace Content.Shared.Interaction.Helpers
}
public static bool InRangeUnOccluded(
- this IEntity origin,
+ this EntityUid origin,
MapCoordinates other,
float range = InteractionRange,
Ignored? predicate = null,
@@ -68,7 +68,7 @@ namespace Content.Shared.Interaction.Helpers
#region Components
public static bool InRangeUnOccluded(
this IComponent origin,
- IEntity other,
+ EntityUid other,
float range = InteractionRange,
Ignored? predicate = null,
bool ignoreInsideBlocker = true)
@@ -133,7 +133,7 @@ namespace Content.Shared.Interaction.Helpers
#region Containers
public static bool InRangeUnOccluded(
this IContainer origin,
- IEntity other,
+ EntityUid other,
float range = InteractionRange,
Ignored? predicate = null,
bool ignoreInsideBlocker = true)
@@ -198,7 +198,7 @@ namespace Content.Shared.Interaction.Helpers
#region EntityCoordinates
public static bool InRangeUnOccluded(
this EntityCoordinates origin,
- IEntity other,
+ EntityUid other,
float range = InteractionRange,
Ignored? predicate = null,
bool ignoreInsideBlocker = true)
@@ -275,7 +275,7 @@ namespace Content.Shared.Interaction.Helpers
#region MapCoordinates
public static bool InRangeUnOccluded(
this MapCoordinates origin,
- IEntity other,
+ EntityUid other,
float range = InteractionRange,
Ignored? predicate = null,
bool ignoreInsideBlocker = true)
diff --git a/Content.Shared/Interaction/IInteractHand.cs b/Content.Shared/Interaction/IInteractHand.cs
index 558c55d93d..723c7e09e6 100644
--- a/Content.Shared/Interaction/IInteractHand.cs
+++ b/Content.Shared/Interaction/IInteractHand.cs
@@ -21,14 +21,14 @@ namespace Content.Shared.Interaction
public class InteractHandEventArgs : EventArgs, ITargetedInteractEventArgs
{
- public InteractHandEventArgs(IEntity user, IEntity target)
+ public InteractHandEventArgs(EntityUid user, EntityUid target)
{
User = user;
Target = target;
}
- public IEntity User { get; }
- public IEntity Target { get; }
+ public EntityUid User { get; }
+ public EntityUid Target { get; }
}
///
@@ -40,24 +40,14 @@ namespace Content.Shared.Interaction
///
/// Entity that triggered the interaction.
///
- public IEntity User { get; }
-
- ///
- /// Entity that triggered the interaction.
- ///
- public EntityUid UserUid => User;
+ public EntityUid User { get; }
///
/// Entity that was interacted on.
///
- public IEntity Target { get; }
+ public EntityUid Target { get; }
- ///
- /// Entity that was interacted on.
- ///
- public EntityUid TargetUid => Target;
-
- public InteractHandEvent(IEntity user, IEntity target)
+ public InteractHandEvent(EntityUid user, EntityUid target)
{
User = user;
Target = target;
diff --git a/Content.Shared/Maps/TurfHelpers.cs b/Content.Shared/Maps/TurfHelpers.cs
index eb780641c3..36ac9ea839 100644
--- a/Content.Shared/Maps/TurfHelpers.cs
+++ b/Content.Shared/Maps/TurfHelpers.cs
@@ -157,12 +157,12 @@ namespace Content.Shared.Maps
/// Helper that returns all entities in a turf.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static IEnumerable GetEntitiesInTile(this TileRef turf, LookupFlags flags = LookupFlags.IncludeAnchored, IEntityLookup? lookupSystem = null)
+ public static IEnumerable GetEntitiesInTile(this TileRef turf, LookupFlags flags = LookupFlags.IncludeAnchored, IEntityLookup? lookupSystem = null)
{
lookupSystem ??= IoCManager.Resolve();
if (!GetWorldTileBox(turf, out var worldBox))
- return Enumerable.Empty();
+ return Enumerable.Empty();
return lookupSystem.GetEntitiesIntersecting(turf.MapIndex, worldBox, flags);
}
@@ -170,12 +170,12 @@ namespace Content.Shared.Maps
///
/// Helper that returns all entities in a turf.
///
- public static IEnumerable GetEntitiesInTile(this EntityCoordinates coordinates, LookupFlags flags = LookupFlags.IncludeAnchored, IEntityLookup? lookupSystem = null)
+ public static IEnumerable GetEntitiesInTile(this EntityCoordinates coordinates, LookupFlags flags = LookupFlags.IncludeAnchored, IEntityLookup? lookupSystem = null)
{
var turf = coordinates.GetTileRef();
if (turf == null)
- return Enumerable.Empty();
+ return Enumerable.Empty();
return GetEntitiesInTile(turf.Value, flags, lookupSystem);
}
@@ -183,7 +183,7 @@ namespace Content.Shared.Maps
///
/// Helper that returns all entities in a turf.
///
- public static IEnumerable GetEntitiesInTile(this Vector2i indices, GridId gridId, LookupFlags flags = LookupFlags.IncludeAnchored, IEntityLookup? lookupSystem = null)
+ public static IEnumerable GetEntitiesInTile(this Vector2i indices, GridId gridId, LookupFlags flags = LookupFlags.IncludeAnchored, IEntityLookup? lookupSystem = null)
{
return GetEntitiesInTile(indices.GetTileRef(gridId), flags, lookupSystem);
}
diff --git a/Content.Shared/MedicalScanner/SharedMedicalScannerComponent.cs b/Content.Shared/MedicalScanner/SharedMedicalScannerComponent.cs
index 04ae56127b..ac80a583a4 100644
--- a/Content.Shared/MedicalScanner/SharedMedicalScannerComponent.cs
+++ b/Content.Shared/MedicalScanner/SharedMedicalScannerComponent.cs
@@ -79,7 +79,7 @@ namespace Content.Shared.MedicalScanner
}
}
- public bool CanInsert(IEntity entity)
+ public bool CanInsert(EntityUid entity)
{
return IoCManager.Resolve().HasComponent(entity);
}
diff --git a/Content.Shared/Pulling/Components/PullableComponent.cs b/Content.Shared/Pulling/Components/PullableComponent.cs
index 0a42911ed3..0bdee013fd 100644
--- a/Content.Shared/Pulling/Components/PullableComponent.cs
+++ b/Content.Shared/Pulling/Components/PullableComponent.cs
@@ -28,7 +28,7 @@ namespace Content.Shared.Pulling.Components
/// The current entity pulling this component.
/// SharedPullingStateManagementSystem should be writing this. This means definitely not you.
///
- public IEntity? Puller { get; set; }
+ public EntityUid? Puller { get; set; }
///
/// The pull joint.
/// SharedPullingStateManagementSystem should be writing this. This means probably not you.
@@ -71,7 +71,7 @@ namespace Content.Shared.Pulling.Components
return;
}
- if (!IoCManager.Resolve().TryGetComponent(entity, out var comp))
+ if (!IoCManager.Resolve().TryGetComponent(entity.Value, out var comp))
{
Logger.Error($"Entity {state.Puller.Value} for pulling had no Puller component");
// ensure it disconnects from any different puller, still
diff --git a/Content.Shared/Pulling/Components/SharedPullerComponent.cs b/Content.Shared/Pulling/Components/SharedPullerComponent.cs
index ca89c3d6da..0a5f3cae10 100644
--- a/Content.Shared/Pulling/Components/SharedPullerComponent.cs
+++ b/Content.Shared/Pulling/Components/SharedPullerComponent.cs
@@ -20,7 +20,7 @@ namespace Content.Shared.Pulling.Components
public float SprintSpeedModifier => Pulling == null ? 1.0f : 0.75f;
[ViewVariables]
- public IEntity? Pulling { get; set; }
+ public EntityUid? Pulling { get; set; }
protected override void Shutdown()
{
diff --git a/Content.Shared/Pulling/Events/StartPullAttemptEvent.cs b/Content.Shared/Pulling/Events/StartPullAttemptEvent.cs
index a45e289b7a..d8f2665319 100644
--- a/Content.Shared/Pulling/Events/StartPullAttemptEvent.cs
+++ b/Content.Shared/Pulling/Events/StartPullAttemptEvent.cs
@@ -7,13 +7,13 @@ namespace Content.Shared.Pulling.Events
///
public class StartPullAttemptEvent : CancellableEntityEventArgs
{
- public StartPullAttemptEvent(IEntity puller, IEntity pulled)
+ public StartPullAttemptEvent(EntityUid puller, EntityUid pulled)
{
Puller = puller;
Pulled = pulled;
}
- public IEntity Puller { get; }
- public IEntity Pulled { get; }
+ public EntityUid Puller { get; }
+ public EntityUid Pulled { get; }
}
}
diff --git a/Content.Shared/Shuttles/Components/PilotComponent.cs b/Content.Shared/Shuttles/Components/PilotComponent.cs
index db8a62cbc8..ef6091f8a0 100644
--- a/Content.Shared/Shuttles/Components/PilotComponent.cs
+++ b/Content.Shared/Shuttles/Components/PilotComponent.cs
@@ -50,10 +50,7 @@ namespace Content.Shared.Shuttles.Components
public override ComponentState GetComponentState()
{
- if(Console == null)
- return new
-
- return new PilotComponentState(((IComponent) Console).Owner);
+ return Console == null ? new PilotComponentState(null) : new PilotComponentState(Console.Owner);
}
[Serializable, NetSerializable]