diff --git a/Content.Shared/Actions/SharedActionsSystem.cs b/Content.Shared/Actions/SharedActionsSystem.cs index e4aa44cf54..174f2c7881 100644 --- a/Content.Shared/Actions/SharedActionsSystem.cs +++ b/Content.Shared/Actions/SharedActionsSystem.cs @@ -517,13 +517,12 @@ public abstract class SharedActionsSystem : EntitySystem // even if we don't check for obstructions, we may still need to check the range. var xform = Transform(user); - if (xform.MapID != coords.GetMapId(EntityManager)) + if (xform.MapID != _transformSystem.GetMapId(coords)) return false; if (range <= 0) return true; - - return coords.InRange(EntityManager, _transformSystem, Transform(user).Coordinates, range); + return _transformSystem.InRange(coords, xform.Coordinates, range); } return _interactionSystem.InRangeUnobstructed(user, coords, range: range); diff --git a/Content.Shared/Ensnaring/SharedEnsnareableSystem.cs b/Content.Shared/Ensnaring/SharedEnsnareableSystem.cs index dacb773470..d15e80a0e3 100644 --- a/Content.Shared/Ensnaring/SharedEnsnareableSystem.cs +++ b/Content.Shared/Ensnaring/SharedEnsnareableSystem.cs @@ -1,7 +1,4 @@ -using System.Linq; using Content.Shared.Alert; -using Content.Shared.Body.Part; -using Content.Shared.Body.Systems; using Content.Shared.CombatMode.Pacification; using Content.Shared.Damage.Components; using Content.Shared.Damage.Systems; @@ -31,7 +28,6 @@ public abstract class SharedEnsnareableSystem : EntitySystem [Dependency] private readonly MovementSpeedModifierSystem _speedModifier = default!; [Dependency] protected readonly SharedAppearanceSystem Appearance = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; - [Dependency] private readonly SharedBodySystem _body = default!; [Dependency] protected readonly SharedContainerSystem Container = default!; [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; [Dependency] private readonly SharedHandsSystem _hands = default!; diff --git a/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs b/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs index a3f62fefe8..f7884e97c4 100644 --- a/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs +++ b/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs @@ -38,6 +38,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem [Dependency] private readonly IPrototypeManager _proto = default!; [Dependency] private readonly ISerializationManager _serManager = default!; [Dependency] private readonly MarkingManager _markingManager = default!; + [Dependency] private readonly GrammarSystem _grammarSystem = default!; [ValidatePrototypeId] public const string DefaultSpecies = "Human"; @@ -156,8 +157,9 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem targetHumanoid.MarkingSet = new(sourceHumanoid.MarkingSet); targetHumanoid.Gender = sourceHumanoid.Gender; + if (TryComp(target, out var grammar)) - grammar.Gender = sourceHumanoid.Gender; + _grammarSystem.SetGender((target, grammar), sourceHumanoid.Gender); Dirty(target, targetHumanoid); } @@ -438,7 +440,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem humanoid.Gender = profile.Gender; if (TryComp(uid, out var grammar)) { - grammar.Gender = profile.Gender; + _grammarSystem.SetGender((uid, grammar), profile.Gender); } humanoid.Age = profile.Age; diff --git a/Content.Shared/Interaction/SharedInteractionSystem.cs b/Content.Shared/Interaction/SharedInteractionSystem.cs index 494fbdf032..f2ae9fd68e 100644 --- a/Content.Shared/Interaction/SharedInteractionSystem.cs +++ b/Content.Shared/Interaction/SharedInteractionSystem.cs @@ -1319,7 +1319,7 @@ namespace Content.Shared.Interaction if (Deleted(target)) return false; - if (!_containerSystem.TryGetContainingContainer((target, null, null), out var container)) + if (!_containerSystem.TryGetContainingContainer(target, out var container)) return false; var wearer = container.Owner; diff --git a/Content.Shared/Magic/SharedMagicSystem.cs b/Content.Shared/Magic/SharedMagicSystem.cs index 9a44407e91..5bf1fee090 100644 --- a/Content.Shared/Magic/SharedMagicSystem.cs +++ b/Content.Shared/Magic/SharedMagicSystem.cs @@ -279,14 +279,14 @@ public abstract class SharedMagicSystem : EntitySystem var userVelocity = _physics.GetMapLinearVelocity(ev.Performer); // If applicable, this ensures the projectile is parented to grid on spawn, instead of the map. - var fromMap = fromCoords.ToMap(EntityManager, _transform); + var fromMap = _transform.ToMapCoordinates(fromCoords); var spawnCoords = _mapManager.TryFindGridAt(fromMap, out var gridUid, out _) - ? fromCoords.WithEntityId(gridUid, EntityManager) + ? _transform.WithEntityId(fromCoords, gridUid) : new(_mapManager.GetMapEntityId(fromMap.MapId), fromMap.Position); var ent = Spawn(ev.Prototype, spawnCoords); - var direction = toCoords.ToMapPos(EntityManager, _transform) - - spawnCoords.ToMapPos(EntityManager, _transform); + var direction = _transform.ToMapCoordinates(toCoords).Position - + _transform.ToMapCoordinates(spawnCoords).Position; _gunSystem.ShootProjectile(ent, direction, userVelocity, ev.Performer, ev.Performer); } // End Projectile Spells diff --git a/Content.Shared/Shuttles/Systems/SharedShuttleSystem.cs b/Content.Shared/Shuttles/Systems/SharedShuttleSystem.cs index b4034686d9..b9fc68330e 100644 --- a/Content.Shared/Shuttles/Systems/SharedShuttleSystem.cs +++ b/Content.Shared/Shuttles/Systems/SharedShuttleSystem.cs @@ -181,7 +181,7 @@ public abstract partial class SharedShuttleSystem : EntitySystem // Just checks if any grids inside of a buffer range at the target position. _grids.Clear(); - var mapCoordinates = coordinates.ToMap(EntityManager, XformSystem); + var mapCoordinates = XformSystem.ToMapCoordinates(coordinates); var ourPos = Maps.GetGridPosition((shuttleUid, shuttlePhysics, shuttleXform)); diff --git a/Content.Shared/Tabletop/SharedTabletopSystem.cs b/Content.Shared/Tabletop/SharedTabletopSystem.cs index afa77a643a..7a2540b11d 100644 --- a/Content.Shared/Tabletop/SharedTabletopSystem.cs +++ b/Content.Shared/Tabletop/SharedTabletopSystem.cs @@ -42,7 +42,7 @@ namespace Content.Shared.Tabletop // Move the entity and dirty it (we use the map ID from the entity so noone can try to be funny and move the item to another map) var transform = EntityManager.GetComponent(moved); Transforms.SetParent(moved, transform, _mapMan.GetMapEntityId(transform.MapID)); - Transforms.SetLocalPositionNoLerp(transform, msg.Coordinates.Position); + Transforms.SetLocalPositionNoLerp(moved, msg.Coordinates.Position, transform); } private void OnDraggingPlayerChanged(TabletopDraggingPlayerChangedEvent msg, EntitySessionEventArgs args) diff --git a/Content.Shared/Teleportation/Systems/SharedPortalSystem.cs b/Content.Shared/Teleportation/Systems/SharedPortalSystem.cs index 262753307f..5ef7619ceb 100644 --- a/Content.Shared/Teleportation/Systems/SharedPortalSystem.cs +++ b/Content.Shared/Teleportation/Systems/SharedPortalSystem.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; using Content.Shared.Ghost; using Content.Shared.Movement.Pulling.Components; using Content.Shared.Movement.Pulling.Systems;