From: J Date: Fri, 18 Apr 2025 03:47:17 +0000 (+0000) Subject: Storage warnings cleanup (#36196) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=fa24960445e9bac27bf4689f035f0504a72d874a;p=space-station-14.git Storage warnings cleanup (#36196) * Storage warnings cleanup * Setting audio params on component --- diff --git a/Content.Server/Storage/Components/CursedEntityStorageComponent.cs b/Content.Server/Storage/Components/CursedEntityStorageComponent.cs index 8a56ecc78e..5f387135d7 100644 --- a/Content.Server/Storage/Components/CursedEntityStorageComponent.cs +++ b/Content.Server/Storage/Components/CursedEntityStorageComponent.cs @@ -5,6 +5,6 @@ namespace Content.Server.Storage.Components; [RegisterComponent] public sealed partial class CursedEntityStorageComponent : Component { - [DataField("cursedSound")] - public SoundSpecifier CursedSound = new SoundPathSpecifier("/Audio/Effects/teleport_departure.ogg"); + [DataField] + public SoundSpecifier CursedSound = new SoundPathSpecifier("/Audio/Effects/teleport_departure.ogg", AudioParams.Default.WithVariation(0.125f)); } diff --git a/Content.Server/Storage/EntitySystems/BluespaceLockerSystem.cs b/Content.Server/Storage/EntitySystems/BluespaceLockerSystem.cs index 3a88bf3910..de5ab7a6ca 100644 --- a/Content.Server/Storage/EntitySystems/BluespaceLockerSystem.cs +++ b/Content.Server/Storage/EntitySystems/BluespaceLockerSystem.cs @@ -17,6 +17,7 @@ using Robust.Shared.Random; using Robust.Shared.Timing; using Robust.Shared.Prototypes; using Content.Server.Shuttles.Components; +using Robust.Shared.Physics; namespace Content.Server.Storage.EntitySystems; @@ -163,11 +164,11 @@ public sealed class BluespaceLockerSystem : EntitySystem return false; if (lockerComponent.PickLinksFromSameMap && - link.ToCoordinates().GetMapId(EntityManager) != locker.ToCoordinates().GetMapId(EntityManager)) + _transformSystem.GetMapId(link.ToCoordinates()) != _transformSystem.GetMapId(locker.ToCoordinates())) return false; if (lockerComponent.PickLinksFromStationGrids && - !HasComp(link.ToCoordinates().GetGridUid(EntityManager))) + !HasComp(_transformSystem.GetGrid(link.ToCoordinates()))) return false; if (lockerComponent.PickLinksFromResistLockers && @@ -392,7 +393,7 @@ public sealed class BluespaceLockerSystem : EntitySystem switch (component.BehaviorProperties.DestroyType) { case BluespaceLockerDestroyType.Explode: - _explosionSystem.QueueExplosion(uid.ToCoordinates().ToMap(EntityManager, _transformSystem), + _explosionSystem.QueueExplosion(_transformSystem.ToMapCoordinates(uid.ToCoordinates()), ExplosionSystem.DefaultExplosionPrototypeId, 4, 1, 2, uid, maxTileBreak: 0); goto case BluespaceLockerDestroyType.Delete; case BluespaceLockerDestroyType.Delete: diff --git a/Content.Server/Storage/EntitySystems/CursedEntityStorageSystem.cs b/Content.Server/Storage/EntitySystems/CursedEntityStorageSystem.cs index 9b65daf461..4e1d0647ee 100644 --- a/Content.Server/Storage/EntitySystems/CursedEntityStorageSystem.cs +++ b/Content.Server/Storage/EntitySystems/CursedEntityStorageSystem.cs @@ -1,10 +1,9 @@ -using System.Linq; using Content.Server.Storage.Components; -using Content.Shared.Audio; using Content.Shared.Storage.Components; -using Robust.Shared.Random; using Robust.Shared.Audio.Systems; using Robust.Shared.Containers; +using Robust.Shared.Random; +using System.Linq; namespace Content.Server.Storage.EntitySystems; @@ -50,6 +49,6 @@ public sealed class CursedEntityStorageSystem : EntitySystem _entityStorage.AddToContents(entity, lockerEnt); } - _audio.PlayPvs(component.CursedSound, uid, AudioHelpers.WithVariation(0.125f, _random)); + _audio.PlayPvs(component.CursedSound, uid); } } diff --git a/Content.Server/Storage/EntitySystems/EntityStorageSystem.cs b/Content.Server/Storage/EntitySystems/EntityStorageSystem.cs index 8b31f598d0..27d84de28c 100644 --- a/Content.Server/Storage/EntitySystems/EntityStorageSystem.cs +++ b/Content.Server/Storage/EntitySystems/EntityStorageSystem.cs @@ -139,7 +139,7 @@ public sealed class EntityStorageSystem : SharedEntityStorageSystem private TileRef? GetOffsetTileRef(EntityUid uid, EntityStorageComponent component) { - var targetCoordinates = new EntityCoordinates(uid, component.EnteringOffset).ToMap(EntityManager, TransformSystem); + var targetCoordinates = TransformSystem.ToMapCoordinates(new EntityCoordinates(uid, component.EnteringOffset)); if (_map.TryFindGridAt(targetCoordinates, out var gridId, out var grid)) {