]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Various system spring cleaning (#36206)
authorJ <billsmith116@gmail.com>
Wed, 16 Apr 2025 11:08:22 +0000 (11:08 +0000)
committerGitHub <noreply@github.com>
Wed, 16 Apr 2025 11:08:22 +0000 (13:08 +0200)
* Various systems warnings cleanup

* Last changes before submitting PR

* Add guard for transform component, fix failing test

* Small corrections

* Audio params to specifiers datafields

* Using audio params on components and configs

27 files changed:
Content.Client/Trigger/TimerTriggerVisualizerSystem.cs
Content.Server/CartridgeLoader/Cartridges/LogProbeCartridgeComponent.cs
Content.Server/CartridgeLoader/Cartridges/LogProbeCartridgeSystem.cs
Content.Server/Containers/EmptyOnMachineDeconstructSystem.cs
Content.Server/Decals/DecalSystem.cs
Content.Server/Disposal/Unit/EntitySystems/DisposableSystem.cs
Content.Server/Engineering/EntitySystems/SpawnAfterInteractSystem.cs
Content.Server/Fluids/EntitySystems/PuddleSystem.cs
Content.Server/IdentityManagement/IdentitySystem.cs
Content.Server/Implants/SubdermalImplantSystem.cs
Content.Server/Instruments/InstrumentSystem.cs
Content.Server/Medical/HealingSystem.cs
Content.Server/Mind/MindSystem.cs
Content.Server/Parallax/BiomeSystem.cs
Content.Server/Points/PointSystem.cs
Content.Server/Power/EntitySystems/CableSystem.cs
Content.Server/Singularity/EntitySystems/EventHorizonSystem.cs
Content.Server/Singularity/EntitySystems/SingularityAttractorSystem.cs
Content.Shared/Clothing/EntitySystems/ClothingSystem.cs
Content.Shared/Ninja/Systems/DashAbilitySystem.cs
Content.Shared/Ninja/Systems/EmagProviderSystem.cs
Content.Shared/RCD/Systems/RCDSystem.cs
Content.Shared/Random/RandomHelperSystem.cs
Content.Shared/Spawning/EntitySystemExtensions.cs
Content.Shared/Tiles/FloorTileSystem.cs
Resources/Prototypes/Entities/Objects/Materials/materials.yml
Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml

index 4bea26b47b59d533e21197357d423eebc67e1211..ed163f07320cb677ae881d4c82d01d4591878526 100644 (file)
@@ -52,7 +52,7 @@ public sealed class TimerTriggerVisualizerSystem : VisualizerSystem<TimerTrigger
         {
             case TriggerVisualState.Primed:
                 if (!AnimationSystem.HasRunningAnimation(uid, animPlayer, TimerTriggerVisualsComponent.AnimationKey))
-                    AnimationSystem.Play(uid, animPlayer, comp.PrimingAnimation, TimerTriggerVisualsComponent.AnimationKey);
+                    AnimationSystem.Play((uid, animPlayer), comp.PrimingAnimation, TimerTriggerVisualsComponent.AnimationKey);
                 break;
             case TriggerVisualState.Unprimed:
                 args.Sprite.LayerSetState(TriggerVisualLayers.Base, comp.UnprimedSprite);
index 659433de3649402027c41842436de4e36d4f50c1..d3f1d250e14e567838a80b51ffa6532ebb9318d3 100644 (file)
@@ -1,4 +1,4 @@
-using Content.Shared.CartridgeLoader.Cartridges;
+using Content.Shared.CartridgeLoader.Cartridges;
 using Content.Shared.Paper;
 using Robust.Shared.Audio;
 using Robust.Shared.Prototypes;
@@ -26,7 +26,7 @@ public sealed partial class LogProbeCartridgeComponent : Component
     /// The sound to make when we scan something with access
     /// </summary>
     [DataField, ViewVariables(VVAccess.ReadWrite)]
-    public SoundSpecifier SoundScan = new SoundPathSpecifier("/Audio/Machines/scan_finish.ogg");
+    public SoundSpecifier SoundScan = new SoundPathSpecifier("/Audio/Machines/scan_finish.ogg", AudioParams.Default.WithVariation(0.25f));
 
     /// <summary>
     /// Paper to spawn when printing logs.
index 75b6b446367496d3a52f8f13370d8f786a20b2a3..025bb87e173012828c94f1455c2e18de63d9581c 100644 (file)
@@ -1,6 +1,5 @@
 using Content.Shared.Access.Components;
 using Content.Shared.Administration.Logs;
-using Content.Shared.Audio;
 using Content.Shared.CartridgeLoader;
 using Content.Shared.CartridgeLoader.Cartridges;
 using Content.Shared.Database;
@@ -8,6 +7,7 @@ using Content.Shared.Hands.EntitySystems;
 using Content.Shared.Labels.EntitySystems;
 using Content.Shared.Paper;
 using Content.Shared.Popups;
+using Robust.Shared.Audio;
 using Robust.Shared.Audio.Systems;
 using Robust.Shared.Random;
 using Robust.Shared.Timing;
@@ -52,7 +52,7 @@ public sealed class LogProbeCartridgeSystem : EntitySystem
             return;
 
         //Play scanning sound with slightly randomized pitch
-        _audio.PlayEntity(ent.Comp.SoundScan, args.InteractEvent.User, target, AudioHelpers.WithVariation(0.25f, _random));
+        _audio.PlayEntity(ent.Comp.SoundScan, args.InteractEvent.User, target);
         _popup.PopupCursor(Loc.GetString("log-probe-scan", ("device", target)), args.InteractEvent.User);
 
         ent.Comp.EntityName = Name(target);
index ae3ca47dd7821b9e3c6fb7f303e71523ffe11ba6..ed0350af573a6aec5937c88c582c04a200969e2a 100644 (file)
@@ -33,12 +33,14 @@ namespace Content.Server.Containers
 
         private void OnDeconstruct(EntityUid uid, EmptyOnMachineDeconstructComponent component, MachineDeconstructedEvent ev)
         {
-            if (!EntityManager.TryGetComponent<ContainerManagerComponent>(uid, out var mComp))
+            if (!TryComp<ContainerManagerComponent>(uid, out var mComp))
                 return;
-            var baseCoords = EntityManager.GetComponent<TransformComponent>(uid).Coordinates;
+
+            var baseCoords = Transform(uid).Coordinates;
+
             foreach (var v in component.Containers)
             {
-                if (mComp.TryGetContainer(v, out var container))
+                if (_container.TryGetContainer(uid, v, out var container, mComp))
                 {
                     _container.EmptyContainer(container, true, baseCoords);
                 }
index 02d3ebd0a15a31528443a31dd71a275b19e473fb..2e1ed2c68daf9b25fdd9bbc42afd97095aa86c7a 100644 (file)
@@ -36,6 +36,7 @@ namespace Content.Server.Decals
         [Dependency] private readonly IGameTiming _timing = default!;
         [Dependency] private readonly IAdminLogManager _adminLogger = default!;
         [Dependency] private readonly SharedMapSystem _mapSystem = default!;
+        [Dependency] private readonly SharedTransformSystem _transform = default!;
 
         private readonly Dictionary<NetEntity, HashSet<Vector2i>> _dirtyChunks = new();
         private readonly Dictionary<ICommonSession, Dictionary<NetEntity, HashSet<Vector2i>>> _previousSentChunks = new();
@@ -249,7 +250,7 @@ namespace Content.Server.Decals
             if (!coordinates.IsValid(EntityManager))
                 return;
 
-            var gridId = coordinates.GetGridUid(EntityManager);
+            var gridId = _transform.GetGrid(coordinates);
 
             if (gridId == null)
                 return;
@@ -296,7 +297,7 @@ namespace Content.Server.Decals
             if (!PrototypeManager.HasIndex<DecalPrototype>(decal.Id))
                 return false;
 
-            var gridId = coordinates.GetGridUid(EntityManager);
+            var gridId = _transform.GetGrid(coordinates);
             if (!TryComp(gridId, out MapGridComponent? grid))
                 return false;
 
index 064f9300b3c6f383e1c98e9e457fe84acb043fd4..0e624ca6f5a6f7b82897dad089930b0819928e10 100644 (file)
@@ -259,7 +259,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
                     var newPosition = destination * progress;
 
                     // This is some supreme shit code.
-                    _xformSystem.SetCoordinates(uid, origin.Offset(newPosition).WithEntityId(currentTube));
+                    _xformSystem.SetCoordinates(uid, _xformSystem.WithEntityId(origin.Offset(newPosition), currentTube));
                     continue;
                 }
 
index 407f877515aaf0fdccc5fb2b9d60f11ce0a9a666..2e4cbee10c172db88bf362e7748b82b9f2b4afbd 100644 (file)
@@ -17,6 +17,7 @@ namespace Content.Server.Engineering.EntitySystems
         [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
         [Dependency] private readonly StackSystem _stackSystem = default!;
         [Dependency] private readonly TurfSystem _turfSystem = default!;
+        [Dependency] private readonly SharedTransformSystem _transform = default!;
 
         public override void Initialize()
         {
@@ -31,7 +32,7 @@ namespace Content.Server.Engineering.EntitySystems
                 return;
             if (string.IsNullOrEmpty(component.Prototype))
                 return;
-            if (!TryComp<MapGridComponent>(args.ClickLocation.GetGridUid(EntityManager), out var grid))
+            if (!TryComp<MapGridComponent>(_transform.GetGrid(args.ClickLocation), out var grid))
                 return;
             if (!grid.TryGetTileRef(args.ClickLocation, out var tileRef))
                 return;
index 8267b8e971793bdccffc85e585a75552ccd9ee11..9cf3a1252f4e3954a5948b1d291999b129fa36a2 100644 (file)
@@ -56,6 +56,7 @@ public sealed partial class PuddleSystem : SharedPuddleSystem
     [Dependency] private readonly StepTriggerSystem _stepTrigger = default!;
     [Dependency] private readonly SpeedModifierContactsSystem _speedModContacts = default!;
     [Dependency] private readonly TileFrictionController _tile = default!;
+    [Dependency] private readonly SharedTransformSystem _transform = default!;
 
     [ValidatePrototypeId<ReagentPrototype>]
     private const string Blood = "Blood";
@@ -626,7 +627,8 @@ public sealed partial class PuddleSystem : SharedPuddleSystem
             return false;
         }
 
-        var gridUid = coordinates.GetGridUid(EntityManager);
+        var gridUid = _transform.GetGrid(coordinates);
+
         if (!TryComp<MapGridComponent>(gridUid, out var mapGrid))
         {
             puddleUid = EntityUid.Invalid;
index d90bf6021df6d1762b1eaa3bc22ce7a5a377c2a2..f1b34c16fa5419a019fae75d3ae882b6ce2fc948 100644 (file)
@@ -27,6 +27,7 @@ public sealed class IdentitySystem : SharedIdentitySystem
     [Dependency] private readonly SharedContainerSystem _container = default!;
     [Dependency] private readonly HumanoidAppearanceSystem _humanoid = default!;
     [Dependency] private readonly CriminalRecordsConsoleSystem _criminalRecordsConsole = default!;
+    [Dependency] private readonly GrammarSystem _grammarSystem = default!;
 
     private HashSet<EntityUid> _queuedIdentityUpdates = new();
 
@@ -102,7 +103,7 @@ public sealed class IdentitySystem : SharedIdentitySystem
 
             // If presumed name is null and we're using that, we set proper noun to be false ("the old woman")
             if (name != representation.TrueName && representation.PresumedName == null)
-                identityGrammar.ProperNoun = false;
+                _grammarSystem.SetProperNoun((uid, grammar), false);
 
             Dirty(ident, identityGrammar);
         }
index bd6ffe375c44bdeff800bfb4e86759e836584f92..e2482b7b60148f9aeb01ec9b0287c8f21d325fa5 100644 (file)
@@ -130,7 +130,7 @@ public sealed class SubdermalImplantSystem : SharedSubdermalImplantSystem
 
     private EntityCoordinates? SelectRandomTileInRange(TransformComponent userXform, float radius)
     {
-        var userCoords = userXform.Coordinates.ToMap(EntityManager, _xform);
+        var userCoords = _xform.ToMapCoordinates(userXform.Coordinates);
         _targetGrids.Clear();
         _lookupSystem.GetEntitiesInRange(userCoords, radius, _targetGrids);
         Entity<MapGridComponent>? targetGrid = null;
index f74dd7fb131dc3931098fc69b7dfb74fb91c3e64..2539db7a6f9761f8c8860b84ec0ddbfb7b9831a0 100644 (file)
@@ -225,7 +225,7 @@ public sealed partial class InstrumentSystem : SharedInstrumentSystem
     {
         var metadataQuery = EntityManager.GetEntityQuery<MetaDataComponent>();
 
-        if (Deleted(uid, metadataQuery))
+        if (Deleted(uid))
             return Array.Empty<(NetEntity, string)>();
 
         var list = new ValueList<(NetEntity, string)>();
@@ -380,7 +380,6 @@ public sealed partial class InstrumentSystem : SharedInstrumentSystem
         }
 
         var activeQuery = EntityManager.GetEntityQuery<ActiveInstrumentComponent>();
-        var metadataQuery = EntityManager.GetEntityQuery<MetaDataComponent>();
         var transformQuery = EntityManager.GetEntityQuery<TransformComponent>();
 
         var query = AllEntityQuery<ActiveInstrumentComponent, InstrumentComponent>();
@@ -388,7 +387,7 @@ public sealed partial class InstrumentSystem : SharedInstrumentSystem
         {
             if (instrument.Master is {} master)
             {
-                if (Deleted(master, metadataQuery))
+                if (Deleted(master))
                 {
                     Clean(uid, instrument);
                 }
index b3318b8c2a9c325115b9297cbee1d862f463ee55..acbbce9e5025db412ee2ffe70cd96dd894ec712b 100644 (file)
@@ -5,7 +5,6 @@ using Content.Server.Medical.Components;
 using Content.Server.Popups;
 using Content.Server.Stack;
 using Content.Shared.Chemistry.EntitySystems;
-using Content.Shared.Audio;
 using Content.Shared.Damage;
 using Content.Shared.Database;
 using Content.Shared.DoAfter;
@@ -21,6 +20,7 @@ using Content.Shared.Popups;
 using Content.Shared.Stacks;
 using Robust.Shared.Audio.Systems;
 using Robust.Shared.Random;
+using Robust.Shared.Audio;
 
 namespace Content.Server.Medical;
 
@@ -31,7 +31,6 @@ public sealed class HealingSystem : EntitySystem
     [Dependency] private readonly DamageableSystem _damageable = default!;
     [Dependency] private readonly BloodstreamSystem _bloodstreamSystem = default!;
     [Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
-    [Dependency] private readonly IRobustRandom _random = default!;
     [Dependency] private readonly StackSystem _stacks = default!;
     [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
     [Dependency] private readonly MobThresholdSystem _mobThresholdSystem = default!;
@@ -115,7 +114,7 @@ public sealed class HealingSystem : EntitySystem
                 $"{EntityManager.ToPrettyString(args.User):user} healed themselves for {total:damage} damage");
         }
 
-        _audio.PlayPvs(healing.HealingEndSound, entity.Owner, AudioHelpers.WithVariation(0.125f, _random).WithVolume(1f));
+        _audio.PlayPvs(healing.HealingEndSound, entity.Owner);
 
         // Logic to determine the whether or not to repeat the healing action
         args.Repeat = (HasDamage(entity, healing) && !dontRepeat);
@@ -198,8 +197,7 @@ public sealed class HealingSystem : EntitySystem
             return false;
         }
 
-        _audio.PlayPvs(component.HealingBeginSound, uid,
-                AudioHelpers.WithVariation(0.125f, _random).WithVolume(1f));
+        _audio.PlayPvs(component.HealingBeginSound, uid);
 
         var isNotSelf = user != target;
 
index 1b55a533e3510e839da2ae87ba1de6a990c29db5..0d3c0c750c00f9da41ee64f10cc0199e0965706e 100644 (file)
@@ -215,7 +215,7 @@ public sealed class MindSystem : SharedMindSystem
             // not implicitly via optional arguments.
 
             var position = Deleted(mind.OwnedEntity)
-                ? _gameTicker.GetObserverSpawnPoint().ToMap(EntityManager, _transform)
+                ? _transform.ToMapCoordinates(_gameTicker.GetObserverSpawnPoint())
                 : _transform.GetMapCoordinates(mind.OwnedEntity.Value);
 
             entity = Spawn(GameTicker.ObserverPrototypeName, position);
@@ -336,7 +336,7 @@ public sealed class MindSystem : SharedMindSystem
         if (_players.TryGetSessionById(userId.Value, out var ret))
         {
             mind.Session = ret;
-            _pvsOverride.AddSessionOverride(netMind, ret);
+            _pvsOverride.AddSessionOverride(mindId, ret);
             _players.SetAttachedEntity(ret, mind.CurrentEntity);
         }
     }
index dfa084c283099887ea6ca9c33bdea4ecff505f0b..8dac0bbb7589150e35702411c4af3793bac845f7 100644 (file)
@@ -256,7 +256,7 @@ public sealed partial class BiomeSystem : SharedBiomeSystem
 
     private void OnFTLStarted(ref FTLStartedEvent ev)
     {
-        var targetMap = ev.TargetCoordinates.ToMap(EntityManager, _transform);
+        var targetMap = _transform.ToMapCoordinates(ev.TargetCoordinates);
         var targetMapUid = _mapManager.GetMapEntityId(targetMap.MapId);
 
         if (!TryComp<BiomeComponent>(targetMapUid, out var biome))
index cf33f8e3c634ac6ed26fc802794063699d5d8789..77c4793c9298b8e708d83baaa9c7b9233b09ed91 100644 (file)
@@ -25,7 +25,7 @@ public sealed class PointSystem : SharedPointSystem
 
     private void OnStartup(EntityUid uid, PointManagerComponent component, ComponentStartup args)
     {
-        _pvsOverride.AddGlobalOverride(GetNetEntity(uid));
+        _pvsOverride.AddGlobalOverride(uid);
     }
 
     /// <summary>
index 8fc7edacf3531d5c87ed7924540a2044684d3588..1aeddf6e291dbed4d6eca7184a4a373bdeaffc57 100644 (file)
@@ -69,7 +69,7 @@ public sealed partial class CableSystem : EntitySystem
 
         // anchor state can change as a result of deletion (detach to null).
         // We don't want to spawn an entity when deleted.
-        if (!TryLifeStage(uid, out var life) || life >= EntityLifeStage.Terminating)
+        if (TerminatingOrDeleted(uid))
             return;
 
         // This entity should not be un-anchorable. But this can happen if the grid-tile is deleted (RCD, explosion,
index 68543cc175587c98799580ab226f1594ce4189d8..c9e217b17078447f3b3a226f27007cc02668685c 100644 (file)
@@ -9,6 +9,7 @@ using Content.Shared.Singularity.Components;
 using Content.Shared.Singularity.EntitySystems;
 using Content.Shared.Tag;
 using Robust.Shared.Containers;
+using Robust.Shared.GameObjects;
 using Robust.Shared.Map;
 using Robust.Shared.Map.Components;
 using Robust.Shared.Physics.Components;
@@ -477,7 +478,7 @@ public sealed class EventHorizonSystem : SharedEventHorizonSystem
         if (drop_container is null)
             _containerSystem.TryGetContainingContainer((uid, null, null), out drop_container);
 
-        foreach (var container in comp.GetAllContainers())
+        foreach (var container in _containerSystem.GetAllContainers(uid))
         {
             ConsumeEntitiesInContainer(args.EventHorizonUid, container, args.EventHorizon, drop_container);
         }
index bc0de7c8c64f12623f98f41669b659b462381b79..4b31d5f8144061ad763ce271092f083a074279bb 100644 (file)
@@ -64,7 +64,7 @@ public sealed class SingularityAttractorSystem : EntitySystem
 
         attractor.LastPulseTime = _timing.CurTime;
 
-        var mapPos = xform.Coordinates.ToMap(EntityManager, _transform);
+        var mapPos = _transform.ToMapCoordinates(xform.Coordinates);
 
         if (mapPos == MapCoordinates.Nullspace)
             return;
@@ -72,7 +72,7 @@ public sealed class SingularityAttractorSystem : EntitySystem
         var query = EntityQuery<SingularityComponent, RandomWalkComponent, TransformComponent>();
         foreach (var (singulo, walk, singuloXform) in query)
         {
-            var singuloMapPos = singuloXform.Coordinates.ToMap(EntityManager, _transform);
+            var singuloMapPos = _transform.ToMapCoordinates(singuloXform.Coordinates);
 
             if (singuloMapPos.MapId != mapPos.MapId)
                 continue;
index f8ab79ec78c8bd7ccdf5de78946c243b4efe7481..d752afc1ade652f9e245457b19690a01902c7664 100644 (file)
@@ -1,13 +1,11 @@
 using Content.Shared.Clothing.Components;
 using Content.Shared.Hands.Components;
 using Content.Shared.Hands.EntitySystems;
-using Content.Shared.Humanoid;
 using Content.Shared.Interaction.Events;
 using Content.Shared.Inventory;
 using Content.Shared.Inventory.Events;
 using Content.Shared.Item;
 using Content.Shared.Strip.Components;
-using Robust.Shared.Containers;
 using Robust.Shared.GameStates;
 
 namespace Content.Shared.Clothing.EntitySystems;
@@ -15,10 +13,8 @@ namespace Content.Shared.Clothing.EntitySystems;
 public abstract class ClothingSystem : EntitySystem
 {
     [Dependency] private readonly SharedItemSystem _itemSys = default!;
-    [Dependency] private readonly SharedContainerSystem _containerSys = default!;
     [Dependency] private readonly InventorySystem _invSystem = default!;
     [Dependency] private readonly SharedHandsSystem _handsSystem = default!;
-    [Dependency] private readonly HideLayerClothingSystem _hideLayer = default!;
 
     public override void Initialize()
     {
index 830b51d5ad4997e2ab057815740e807692d61caa..cd8f7da76860e7cc236898d869b37625fe70435d 100644 (file)
@@ -71,7 +71,7 @@ public sealed class DashAbilitySystem : EntitySystem
         }
 
         var origin = _transform.GetMapCoordinates(user);
-        var target = args.Target.ToMap(EntityManager, _transform);
+        var target = _transform.ToMapCoordinates(args.Target);
         if (!_examine.InRangeUnOccluded(origin, target, SharedInteractionSystem.MaxRaycastRange, null))
         {
             // can only dash if the destination is visible on screen
index 3be2ae52e13008992dac24615a03278ccd9d8bc5..d17c4b32cca19c980390dc2b7113df3375a66d60 100644 (file)
@@ -15,7 +15,6 @@ namespace Content.Shared.Ninja.Systems;
 public sealed class EmagProviderSystem : EntitySystem
 {
     [Dependency] private readonly SharedAudioSystem _audio = default!;
-    [Dependency] private readonly EmagSystem _emag = default!;
     [Dependency] private readonly EntityWhitelistSystem _whitelist = default!;
     [Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
     [Dependency] private readonly SharedNinjaGlovesSystem _gloves = default!;
index 9e5096c77c6cb0cd90a79f5348438b0375e1e07e..a5c2af39aec940ddd4602c98caba1168cf1e5585 100644 (file)
@@ -45,6 +45,7 @@ public class RCDSystem : EntitySystem
     [Dependency] private readonly EntityLookupSystem _lookup = default!;
     [Dependency] private readonly IPrototypeManager _protoManager = default!;
     [Dependency] private readonly SharedMapSystem _mapSystem = default!;
+    [Dependency] private readonly SharedTransformSystem _transform = default!;
     [Dependency] private readonly TagSystem _tags = default!;
 
     private readonly int _instantConstructionDelay = 0;
@@ -561,12 +562,12 @@ public class RCDSystem : EntitySystem
     public bool TryGetMapGridData(EntityCoordinates location, [NotNullWhen(true)] out MapGridData? mapGridData)
     {
         mapGridData = null;
-        var gridUid = location.GetGridUid(EntityManager);
+        var gridUid = _transform.GetGrid(location);
 
         if (!TryComp<MapGridComponent>(gridUid, out var mapGrid))
         {
             location = location.AlignWithClosestGridTile(1.75f, EntityManager);
-            gridUid = location.GetGridUid(EntityManager);
+            gridUid = _transform.GetGrid(location);
 
             // Check if we got a grid ID the second time round
             if (!TryComp(gridUid, out mapGrid))
index 66ebcc3f78bdd0d7b9ef05d0bb5c77a654b0aef8..145b47b045c7370c0d70c2496474924515d73a69 100644 (file)
@@ -1,4 +1,4 @@
-using System.Numerics;
+using System.Numerics;
 using Content.Shared.Random.Helpers;
 using Robust.Shared.Random;
 using Robust.Shared.Utility;
@@ -20,7 +20,7 @@ public sealed class RandomHelperSystem : EntitySystem
         var offset = new Vector2(randomX, randomY);
 
         var xform = Transform(entity);
-        _transform.SetLocalPosition(xform, xform.LocalPosition + offset);
+        _transform.SetLocalPosition(entity, xform.LocalPosition + offset, xform);
     }
 
     public void RandomOffset(EntityUid entity, float min, float max)
index 507a0f4aa27048d236e4aaf416a48d0328fd5e5c..8ee0d3fc45a15e85bc1b3bcfac414f01b155510d 100644 (file)
@@ -1,4 +1,4 @@
-using System.Diagnostics.CodeAnalysis;
+using System.Diagnostics.CodeAnalysis;
 using Content.Shared.Physics;
 using Robust.Shared.Map;
 using Robust.Shared.Physics.Systems;
@@ -16,7 +16,7 @@ namespace Content.Shared.Spawning
             SharedPhysicsSystem? physicsManager = null)
         {
             physicsManager ??= entityManager.System<SharedPhysicsSystem>();
-            var mapCoordinates = coordinates.ToMap(entityManager, entityManager.System<SharedTransformSystem>());
+            var mapCoordinates = entityManager.System<SharedTransformSystem>().ToMapCoordinates(coordinates);
 
             return entityManager.SpawnIfUnobstructed(prototypeName, mapCoordinates, collisionLayer, box, physicsManager);
         }
index 3acd5051c9cbac8982f9afd53b299d2a76ad72e6..9b78904859ad78e0c942fd5d96c7e28541a44050 100644 (file)
@@ -59,14 +59,14 @@ public sealed class FloorTileSystem : EntitySystem
 
         // this looks a bit sussy but it might be because it needs to be able to place off of grids and expand them
         var location = args.ClickLocation.AlignWithClosestGridTile();
-        var locationMap = location.ToMap(EntityManager, _transform);
+        var locationMap = _transform.ToMapCoordinates(location);
         if (locationMap.MapId == MapId.Nullspace)
             return;
 
         var physicQuery = GetEntityQuery<PhysicsComponent>();
         var transformQuery = GetEntityQuery<TransformComponent>();
 
-        var map = location.ToMap(EntityManager, _transform);
+        var map = _transform.ToMapCoordinates(location);
 
         // Disallow placement close to grids.
         // FTLing close is okay but this makes alignment too finnicky.
@@ -92,7 +92,7 @@ public sealed class FloorTileSystem : EntitySystem
             return;
         }
 
-        var userPos = transformQuery.GetComponent(args.User).Coordinates.ToMapPos(EntityManager, _transform);
+        var userPos = _transform.ToMapCoordinates(transformQuery.GetComponent(args.User).Coordinates).Position;
         var dir = userPos - map.Position;
         var canAccessCenter = false;
         if (dir.LengthSquared() > 0.01)
index e16044b282608213d538d836fe0bf6074eff3240..a5d097d86dfd26f247505f454e0ecc9a24324453 100644 (file)
     bloodlossModifier: -4
     healingBeginSound:
       path: "/Audio/Items/Medical/brutepack_begin.ogg"
+      params:
+        volume: 1.0
+        variation: 0.125
     healingEndSound:
       path: "/Audio/Items/Medical/brutepack_end.ogg"
+      params:
+        volume: 1.0
+        variation: 0.125
   - type: Stack
     stackType: Cloth
     baseLayer: base
index 768bc77004efe86339d18e70eeb56db7452c3787..96eb8ed8ad77eb50121e5e8ce19df53a91e279f4 100644 (file)
         Caustic: -1.5
     healingBeginSound:
       path: "/Audio/Items/Medical/ointment_begin.ogg"
+      params:
+        volume: 1.0
+        variation: 0.125
     healingEndSound:
       path: "/Audio/Items/Medical/ointment_end.ogg"
+      params:
+        volume: 1.0
+        variation: 0.125
   - type: Stack
     stackType: Ointment
     count: 10
         Caustic: -10
     healingBeginSound:
       path: "/Audio/Items/Medical/ointment_begin.ogg"
+      params:
+        volume: 1.0
+        variation: 0.125
     healingEndSound:
       path: "/Audio/Items/Medical/ointment_end.ogg"
+      params:
+        volume: 1.0
+        variation: 0.125
   - type: Stack
     stackType: RegenerativeMesh
     count: 10
         Brute: -15 # 5 for each type in the group
     healingBeginSound:
       path: "/Audio/Items/Medical/brutepack_begin.ogg"
+      params:
+        volume: 1.0
+        variation: 0.125
     healingEndSound:
       path: "/Audio/Items/Medical/brutepack_end.ogg"
+      params:
+        volume: 1.0
+        variation: 0.125
   - type: Stack
     stackType: Brutepack
     count: 10
     bloodlossModifier: -10 # a suture should stop ongoing bleeding
     healingBeginSound:
       path: "/Audio/Items/Medical/brutepack_begin.ogg"
+      params:
+        volume: 1.0
+        variation: 0.125
     healingEndSound:
       path: "/Audio/Items/Medical/brutepack_end.ogg"
+      params:
+        volume: 1.0
+        variation: 0.125
   - type: Stack
     stackType: MedicatedSuture
     count: 10
     ModifyBloodLevel: 15 #restores about 5% blood per use on standard humanoids.
     healingBeginSound:
       path: "/Audio/Items/Medical/brutepack_begin.ogg"
+      params:
+        volume: 1.0
+        variation: 0.125
     healingEndSound:
       path: "/Audio/Items/Medical/brutepack_end.ogg"
+      params:
+        volume: 1.0
+        variation: 0.125
   - type: Stack
     stackType: Bloodpack
     count: 10
       delay: 0.5
       healingBeginSound:
         path: "/Audio/Items/Medical/brutepack_begin.ogg"
+        params:
+          volume: 1.0
+          variation: 0.125
       healingEndSound:
         path: "/Audio/Items/Medical/brutepack_end.ogg"
+        params:
+          volume: 1.0
+          variation: 0.125
 
 - type: entity
   name: roll of gauze
     bloodlossModifier: -10
     healingBeginSound:
       path: "/Audio/Items/Medical/brutepack_begin.ogg"
+      params:
+        volume: 1.0
+        variation: 0.125
     healingEndSound:
       path: "/Audio/Items/Medical/brutepack_end.ogg"
+      params:
+        volume: 1.0
+        variation: 0.125
   - type: Stack
     stackType: Gauze
     count: 10
     selfHealPenaltyMultiplier: 0
     healingBeginSound:
       path: "/Audio/Items/Medical/ointment_begin.ogg"
+      params:
+        volume: 1.0
+        variation: 0.125
     healingEndSound:
       path: "/Audio/Items/Medical/ointment_end.ogg"
+      params:
+        volume: 1.0
+        variation: 0.125
 
 # Pills
 - type: entity