Storage warnings cleanup (#36196)
* Storage warnings cleanup * Setting audio params on component
This commit is contained in:
@@ -5,6 +5,6 @@ namespace Content.Server.Storage.Components;
|
|||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
public sealed partial class CursedEntityStorageComponent : Component
|
public sealed partial class CursedEntityStorageComponent : Component
|
||||||
{
|
{
|
||||||
[DataField("cursedSound")]
|
[DataField]
|
||||||
public SoundSpecifier CursedSound = new SoundPathSpecifier("/Audio/Effects/teleport_departure.ogg");
|
public SoundSpecifier CursedSound = new SoundPathSpecifier("/Audio/Effects/teleport_departure.ogg", AudioParams.Default.WithVariation(0.125f));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ using Robust.Shared.Random;
|
|||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Content.Server.Shuttles.Components;
|
using Content.Server.Shuttles.Components;
|
||||||
|
using Robust.Shared.Physics;
|
||||||
|
|
||||||
namespace Content.Server.Storage.EntitySystems;
|
namespace Content.Server.Storage.EntitySystems;
|
||||||
|
|
||||||
@@ -163,11 +164,11 @@ public sealed class BluespaceLockerSystem : EntitySystem
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (lockerComponent.PickLinksFromSameMap &&
|
if (lockerComponent.PickLinksFromSameMap &&
|
||||||
link.ToCoordinates().GetMapId(EntityManager) != locker.ToCoordinates().GetMapId(EntityManager))
|
_transformSystem.GetMapId(link.ToCoordinates()) != _transformSystem.GetMapId(locker.ToCoordinates()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (lockerComponent.PickLinksFromStationGrids &&
|
if (lockerComponent.PickLinksFromStationGrids &&
|
||||||
!HasComp<StationMemberComponent>(link.ToCoordinates().GetGridUid(EntityManager)))
|
!HasComp<StationMemberComponent>(_transformSystem.GetGrid(link.ToCoordinates())))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (lockerComponent.PickLinksFromResistLockers &&
|
if (lockerComponent.PickLinksFromResistLockers &&
|
||||||
@@ -392,7 +393,7 @@ public sealed class BluespaceLockerSystem : EntitySystem
|
|||||||
switch (component.BehaviorProperties.DestroyType)
|
switch (component.BehaviorProperties.DestroyType)
|
||||||
{
|
{
|
||||||
case BluespaceLockerDestroyType.Explode:
|
case BluespaceLockerDestroyType.Explode:
|
||||||
_explosionSystem.QueueExplosion(uid.ToCoordinates().ToMap(EntityManager, _transformSystem),
|
_explosionSystem.QueueExplosion(_transformSystem.ToMapCoordinates(uid.ToCoordinates()),
|
||||||
ExplosionSystem.DefaultExplosionPrototypeId, 4, 1, 2, uid, maxTileBreak: 0);
|
ExplosionSystem.DefaultExplosionPrototypeId, 4, 1, 2, uid, maxTileBreak: 0);
|
||||||
goto case BluespaceLockerDestroyType.Delete;
|
goto case BluespaceLockerDestroyType.Delete;
|
||||||
case BluespaceLockerDestroyType.Delete:
|
case BluespaceLockerDestroyType.Delete:
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
using System.Linq;
|
|
||||||
using Content.Server.Storage.Components;
|
using Content.Server.Storage.Components;
|
||||||
using Content.Shared.Audio;
|
|
||||||
using Content.Shared.Storage.Components;
|
using Content.Shared.Storage.Components;
|
||||||
using Robust.Shared.Random;
|
|
||||||
using Robust.Shared.Audio.Systems;
|
using Robust.Shared.Audio.Systems;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
|
using Robust.Shared.Random;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace Content.Server.Storage.EntitySystems;
|
namespace Content.Server.Storage.EntitySystems;
|
||||||
|
|
||||||
@@ -50,6 +49,6 @@ public sealed class CursedEntityStorageSystem : EntitySystem
|
|||||||
_entityStorage.AddToContents(entity, lockerEnt);
|
_entityStorage.AddToContents(entity, lockerEnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
_audio.PlayPvs(component.CursedSound, uid, AudioHelpers.WithVariation(0.125f, _random));
|
_audio.PlayPvs(component.CursedSound, uid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ public sealed class EntityStorageSystem : SharedEntityStorageSystem
|
|||||||
|
|
||||||
private TileRef? GetOffsetTileRef(EntityUid uid, EntityStorageComponent component)
|
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))
|
if (_map.TryFindGridAt(targetCoordinates, out var gridId, out var grid))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user