diff --git a/Content.Client/Trigger/TimerTriggerVisualizerSystem.cs b/Content.Client/Trigger/TimerTriggerVisualizerSystem.cs index 4bea26b47b..ed163f0732 100644 --- a/Content.Client/Trigger/TimerTriggerVisualizerSystem.cs +++ b/Content.Client/Trigger/TimerTriggerVisualizerSystem.cs @@ -52,7 +52,7 @@ public sealed class TimerTriggerVisualizerSystem : VisualizerSystem [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)); /// /// Paper to spawn when printing logs. diff --git a/Content.Server/CartridgeLoader/Cartridges/LogProbeCartridgeSystem.cs b/Content.Server/CartridgeLoader/Cartridges/LogProbeCartridgeSystem.cs index 75b6b44636..025bb87e17 100644 --- a/Content.Server/CartridgeLoader/Cartridges/LogProbeCartridgeSystem.cs +++ b/Content.Server/CartridgeLoader/Cartridges/LogProbeCartridgeSystem.cs @@ -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); diff --git a/Content.Server/Containers/EmptyOnMachineDeconstructSystem.cs b/Content.Server/Containers/EmptyOnMachineDeconstructSystem.cs index ae3ca47dd7..ed0350af57 100644 --- a/Content.Server/Containers/EmptyOnMachineDeconstructSystem.cs +++ b/Content.Server/Containers/EmptyOnMachineDeconstructSystem.cs @@ -33,12 +33,14 @@ namespace Content.Server.Containers private void OnDeconstruct(EntityUid uid, EmptyOnMachineDeconstructComponent component, MachineDeconstructedEvent ev) { - if (!EntityManager.TryGetComponent(uid, out var mComp)) + if (!TryComp(uid, out var mComp)) return; - var baseCoords = EntityManager.GetComponent(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); } diff --git a/Content.Server/Decals/DecalSystem.cs b/Content.Server/Decals/DecalSystem.cs index 02d3ebd0a1..2e1ed2c68d 100644 --- a/Content.Server/Decals/DecalSystem.cs +++ b/Content.Server/Decals/DecalSystem.cs @@ -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> _dirtyChunks = new(); private readonly Dictionary>> _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(decal.Id)) return false; - var gridId = coordinates.GetGridUid(EntityManager); + var gridId = _transform.GetGrid(coordinates); if (!TryComp(gridId, out MapGridComponent? grid)) return false; diff --git a/Content.Server/Disposal/Unit/EntitySystems/DisposableSystem.cs b/Content.Server/Disposal/Unit/EntitySystems/DisposableSystem.cs index 064f9300b3..0e624ca6f5 100644 --- a/Content.Server/Disposal/Unit/EntitySystems/DisposableSystem.cs +++ b/Content.Server/Disposal/Unit/EntitySystems/DisposableSystem.cs @@ -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; } diff --git a/Content.Server/Engineering/EntitySystems/SpawnAfterInteractSystem.cs b/Content.Server/Engineering/EntitySystems/SpawnAfterInteractSystem.cs index 407f877515..2e4cbee10c 100644 --- a/Content.Server/Engineering/EntitySystems/SpawnAfterInteractSystem.cs +++ b/Content.Server/Engineering/EntitySystems/SpawnAfterInteractSystem.cs @@ -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(args.ClickLocation.GetGridUid(EntityManager), out var grid)) + if (!TryComp(_transform.GetGrid(args.ClickLocation), out var grid)) return; if (!grid.TryGetTileRef(args.ClickLocation, out var tileRef)) return; diff --git a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs index 8267b8e971..9cf3a1252f 100644 --- a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs +++ b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs @@ -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] 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(gridUid, out var mapGrid)) { puddleUid = EntityUid.Invalid; diff --git a/Content.Server/IdentityManagement/IdentitySystem.cs b/Content.Server/IdentityManagement/IdentitySystem.cs index d90bf6021d..f1b34c16fa 100644 --- a/Content.Server/IdentityManagement/IdentitySystem.cs +++ b/Content.Server/IdentityManagement/IdentitySystem.cs @@ -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 _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); } diff --git a/Content.Server/Implants/SubdermalImplantSystem.cs b/Content.Server/Implants/SubdermalImplantSystem.cs index bd6ffe375c..e2482b7b60 100644 --- a/Content.Server/Implants/SubdermalImplantSystem.cs +++ b/Content.Server/Implants/SubdermalImplantSystem.cs @@ -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? targetGrid = null; diff --git a/Content.Server/Instruments/InstrumentSystem.cs b/Content.Server/Instruments/InstrumentSystem.cs index f74dd7fb13..2539db7a6f 100644 --- a/Content.Server/Instruments/InstrumentSystem.cs +++ b/Content.Server/Instruments/InstrumentSystem.cs @@ -225,7 +225,7 @@ public sealed partial class InstrumentSystem : SharedInstrumentSystem { var metadataQuery = EntityManager.GetEntityQuery(); - 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(); - var metadataQuery = EntityManager.GetEntityQuery(); var transformQuery = EntityManager.GetEntityQuery(); var query = AllEntityQuery(); @@ -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); } diff --git a/Content.Server/Medical/HealingSystem.cs b/Content.Server/Medical/HealingSystem.cs index b3318b8c2a..acbbce9e50 100644 --- a/Content.Server/Medical/HealingSystem.cs +++ b/Content.Server/Medical/HealingSystem.cs @@ -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; diff --git a/Content.Server/Mind/MindSystem.cs b/Content.Server/Mind/MindSystem.cs index 1b55a533e3..0d3c0c750c 100644 --- a/Content.Server/Mind/MindSystem.cs +++ b/Content.Server/Mind/MindSystem.cs @@ -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); } } diff --git a/Content.Server/Parallax/BiomeSystem.cs b/Content.Server/Parallax/BiomeSystem.cs index dfa084c283..8dac0bbb75 100644 --- a/Content.Server/Parallax/BiomeSystem.cs +++ b/Content.Server/Parallax/BiomeSystem.cs @@ -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(targetMapUid, out var biome)) diff --git a/Content.Server/Points/PointSystem.cs b/Content.Server/Points/PointSystem.cs index cf33f8e3c6..77c4793c92 100644 --- a/Content.Server/Points/PointSystem.cs +++ b/Content.Server/Points/PointSystem.cs @@ -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); } /// diff --git a/Content.Server/Power/EntitySystems/CableSystem.cs b/Content.Server/Power/EntitySystems/CableSystem.cs index 8fc7edacf3..1aeddf6e29 100644 --- a/Content.Server/Power/EntitySystems/CableSystem.cs +++ b/Content.Server/Power/EntitySystems/CableSystem.cs @@ -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, diff --git a/Content.Server/Singularity/EntitySystems/EventHorizonSystem.cs b/Content.Server/Singularity/EntitySystems/EventHorizonSystem.cs index 68543cc175..c9e217b170 100644 --- a/Content.Server/Singularity/EntitySystems/EventHorizonSystem.cs +++ b/Content.Server/Singularity/EntitySystems/EventHorizonSystem.cs @@ -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); } diff --git a/Content.Server/Singularity/EntitySystems/SingularityAttractorSystem.cs b/Content.Server/Singularity/EntitySystems/SingularityAttractorSystem.cs index bc0de7c8c6..4b31d5f814 100644 --- a/Content.Server/Singularity/EntitySystems/SingularityAttractorSystem.cs +++ b/Content.Server/Singularity/EntitySystems/SingularityAttractorSystem.cs @@ -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(); 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; diff --git a/Content.Shared/Clothing/EntitySystems/ClothingSystem.cs b/Content.Shared/Clothing/EntitySystems/ClothingSystem.cs index f8ab79ec78..d752afc1ad 100644 --- a/Content.Shared/Clothing/EntitySystems/ClothingSystem.cs +++ b/Content.Shared/Clothing/EntitySystems/ClothingSystem.cs @@ -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() { diff --git a/Content.Shared/Ninja/Systems/DashAbilitySystem.cs b/Content.Shared/Ninja/Systems/DashAbilitySystem.cs index 830b51d5ad..cd8f7da768 100644 --- a/Content.Shared/Ninja/Systems/DashAbilitySystem.cs +++ b/Content.Shared/Ninja/Systems/DashAbilitySystem.cs @@ -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 diff --git a/Content.Shared/Ninja/Systems/EmagProviderSystem.cs b/Content.Shared/Ninja/Systems/EmagProviderSystem.cs index 3be2ae52e1..d17c4b32cc 100644 --- a/Content.Shared/Ninja/Systems/EmagProviderSystem.cs +++ b/Content.Shared/Ninja/Systems/EmagProviderSystem.cs @@ -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!; diff --git a/Content.Shared/RCD/Systems/RCDSystem.cs b/Content.Shared/RCD/Systems/RCDSystem.cs index 9e5096c77c..a5c2af39ae 100644 --- a/Content.Shared/RCD/Systems/RCDSystem.cs +++ b/Content.Shared/RCD/Systems/RCDSystem.cs @@ -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(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)) diff --git a/Content.Shared/Random/RandomHelperSystem.cs b/Content.Shared/Random/RandomHelperSystem.cs index 66ebcc3f78..145b47b045 100644 --- a/Content.Shared/Random/RandomHelperSystem.cs +++ b/Content.Shared/Random/RandomHelperSystem.cs @@ -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) diff --git a/Content.Shared/Spawning/EntitySystemExtensions.cs b/Content.Shared/Spawning/EntitySystemExtensions.cs index 507a0f4aa2..8ee0d3fc45 100644 --- a/Content.Shared/Spawning/EntitySystemExtensions.cs +++ b/Content.Shared/Spawning/EntitySystemExtensions.cs @@ -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(); - var mapCoordinates = coordinates.ToMap(entityManager, entityManager.System()); + var mapCoordinates = entityManager.System().ToMapCoordinates(coordinates); return entityManager.SpawnIfUnobstructed(prototypeName, mapCoordinates, collisionLayer, box, physicsManager); } diff --git a/Content.Shared/Tiles/FloorTileSystem.cs b/Content.Shared/Tiles/FloorTileSystem.cs index 3acd5051c9..9b78904859 100644 --- a/Content.Shared/Tiles/FloorTileSystem.cs +++ b/Content.Shared/Tiles/FloorTileSystem.cs @@ -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(); var transformQuery = GetEntityQuery(); - 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) diff --git a/Resources/Prototypes/Entities/Objects/Materials/materials.yml b/Resources/Prototypes/Entities/Objects/Materials/materials.yml index e16044b282..a5d097d86d 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/materials.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/materials.yml @@ -93,8 +93,14 @@ 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 diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml index 768bc77004..96eb8ed8ad 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml @@ -38,8 +38,14 @@ 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 @@ -89,8 +95,14 @@ 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 @@ -128,8 +140,14 @@ 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 @@ -178,8 +196,14 @@ 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 @@ -218,8 +242,14 @@ 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 @@ -268,8 +298,14 @@ 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 @@ -298,8 +334,14 @@ 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 @@ -359,8 +401,14 @@ 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