mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* Remove all IPrototypeManager instances * Remove redundant IComponentFactory instances too * Found some stragglers * DestructibleSystem.PrototypeManager: no dependency * not based
31 lines
1.2 KiB
C#
31 lines
1.2 KiB
C#
using Content.Shared.Explosion;
|
|
using Content.Shared.Hands;
|
|
using Content.Shared.Storage;
|
|
using Content.Shared.Storage.Components;
|
|
using Content.Shared.Storage.EntitySystems;
|
|
using Robust.Shared.Map;
|
|
using Robust.Shared.Player;
|
|
namespace Content.Server.Storage.EntitySystems;
|
|
|
|
public sealed partial class StorageSystem : SharedStorageSystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<StorageComponent, BeforeExplodeEvent>(OnExploded);
|
|
SubscribeLocalEvent<StorageFillComponent, MapInitEvent>(OnStorageFillMapInit);
|
|
}
|
|
|
|
private void OnExploded(Entity<StorageComponent> ent, ref BeforeExplodeEvent args)
|
|
{
|
|
args.Contents.AddRange(ent.Comp.Container.ContainedEntities);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override void PlayPickupAnimation(EntityUid uid, EntityCoordinates initialCoordinates, EntityCoordinates finalCoordinates,
|
|
Angle initialRotation, EntityUid? user = null)
|
|
{
|
|
var filter = Filter.Pvs(uid).RemoveWhereAttachedEntity(e => e == user);
|
|
RaiseNetworkEvent(new PickupAnimationEvent(GetNetEntity(uid), GetNetCoordinates(initialCoordinates), GetNetCoordinates(finalCoordinates), initialRotation), filter);
|
|
}
|
|
}
|