2021-06-09 22:19:39 +02:00
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Content.Server.Hands.Components;
|
|
|
|
|
using Content.Server.Items;
|
|
|
|
|
using Content.Server.Paper;
|
|
|
|
|
using Content.Server.Storage.Components;
|
|
|
|
|
using Content.Shared.Body.Components;
|
|
|
|
|
using Content.Shared.Examine;
|
|
|
|
|
using Content.Shared.Interaction;
|
|
|
|
|
using Content.Shared.Morgue;
|
2021-09-26 15:18:45 +02:00
|
|
|
using Content.Shared.Popups;
|
2021-06-27 19:02:46 +10:00
|
|
|
using Content.Shared.Standing;
|
2020-10-28 22:51:43 +00:00
|
|
|
using Robust.Server.GameObjects;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Robust.Shared.Containers;
|
2020-10-28 22:51:43 +00:00
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
using Robust.Shared.Localization;
|
|
|
|
|
using Robust.Shared.Utility;
|
|
|
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Morgue.Components
|
2020-10-28 22:51:43 +00:00
|
|
|
{
|
|
|
|
|
[RegisterComponent]
|
|
|
|
|
[ComponentReference(typeof(EntityStorageComponent))]
|
|
|
|
|
[ComponentReference(typeof(IActivate))]
|
|
|
|
|
[ComponentReference(typeof(IStorageComponent))]
|
2021-11-11 02:15:23 +13:00
|
|
|
public class BodyBagEntityStorageComponent : EntityStorageComponent
|
2020-10-28 22:51:43 +00:00
|
|
|
{
|
|
|
|
|
public override string Name => "BodyBagEntityStorage";
|
|
|
|
|
|
|
|
|
|
protected override bool AddToContents(IEntity entity)
|
|
|
|
|
{
|
2021-10-13 18:58:18 +11:00
|
|
|
if (entity.HasComponent<SharedBodyComponent>() && !EntitySystem.Get<StandingStateSystem>().IsDown(entity.Uid)) return false;
|
2020-10-28 22:51:43 +00:00
|
|
|
return base.AddToContents(entity);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|