move lockcomponent to shared (#13722)
* move lockcomponent to shared * ajcm review
This commit is contained in:
@@ -14,6 +14,7 @@ using Content.Shared.Examine;
|
||||
using Content.Shared.Standing;
|
||||
using Content.Shared.Storage;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Storage.Components;
|
||||
|
||||
namespace Content.Server.Morgue;
|
||||
|
||||
@@ -42,8 +43,9 @@ public sealed class CrematoriumSystem : EntitySystem
|
||||
return;
|
||||
|
||||
if (_appearance.TryGetData<bool>(uid, CrematoriumVisuals.Burning, out var isBurning, appearance) && isBurning)
|
||||
{
|
||||
args.PushMarkup(Loc.GetString("crematorium-entity-storage-component-on-examine-details-is-burning", ("owner", uid)));
|
||||
|
||||
}
|
||||
if (_appearance.TryGetData<bool>(uid, StorageVisuals.HasContents, out var hasContents, appearance) && hasContents)
|
||||
{
|
||||
args.PushMarkup(Loc.GetString("crematorium-entity-storage-component-on-examine-details-has-contents"));
|
||||
@@ -54,9 +56,9 @@ public sealed class CrematoriumSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
|
||||
private void OnAttemptOpen(EntityUid uid, ActiveCrematoriumComponent component, StorageOpenAttemptEvent args)
|
||||
private void OnAttemptOpen(EntityUid uid, ActiveCrematoriumComponent component, ref StorageOpenAttemptEvent args)
|
||||
{
|
||||
args.Cancel();
|
||||
args.Cancelled = true;
|
||||
}
|
||||
|
||||
private void AddCremateVerb(EntityUid uid, CrematoriumComponent component, GetVerbsEvent<AlternativeVerb> args)
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
using Content.Server.Body.Systems;
|
||||
using Content.Server.Morgue.Components;
|
||||
using Content.Server.Storage.Components;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Shared.Standing;
|
||||
using Content.Shared.Storage.Components;
|
||||
|
||||
namespace Content.Server.Morgue;
|
||||
|
||||
public sealed class EntityStorageLayingDownOverrideSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly StandingStateSystem _standing = default!;
|
||||
[Dependency] private readonly BodySystem _body = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -18,11 +16,12 @@ public sealed class EntityStorageLayingDownOverrideSystem : EntitySystem
|
||||
SubscribeLocalEvent<EntityStorageLayingDownOverrideComponent, StorageBeforeCloseEvent>(OnBeforeClose);
|
||||
}
|
||||
|
||||
private void OnBeforeClose(EntityUid uid, EntityStorageLayingDownOverrideComponent component,
|
||||
StorageBeforeCloseEvent args)
|
||||
private void OnBeforeClose(EntityUid uid, EntityStorageLayingDownOverrideComponent component, ref StorageBeforeCloseEvent args)
|
||||
{
|
||||
foreach (var ent in args.Contents)
|
||||
{
|
||||
if (HasComp<BodyComponent>(ent) && !_standing.IsDown(ent))
|
||||
args.Contents.Remove(ent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user