EntityStorage ECS (#9291)

This commit is contained in:
Nemanja
2022-07-13 19:11:59 -04:00
committed by GitHub
parent a655891a8d
commit 5edf2ccad5
46 changed files with 1057 additions and 1126 deletions

View File

@@ -19,7 +19,7 @@ namespace Content.Server.Foldable
SubscribeLocalEvent<FoldableComponent, StorageOpenAttemptEvent>(OnFoldableOpenAttempt);
SubscribeLocalEvent<FoldableComponent, GetVerbsEvent<AlternativeVerb>>(AddFoldVerb);
SubscribeLocalEvent<FoldableComponent, StoreThisAttemptEvent>(OnStoreThisAttempt);
SubscribeLocalEvent<FoldableComponent, StoreMobInItemContainerAttemptEvent>(OnStoreThisAttempt);
}
@@ -88,8 +88,10 @@ namespace Content.Server.Foldable
strap.Enabled = !component.IsFolded;
}
public void OnStoreThisAttempt(EntityUid uid, FoldableComponent comp, StoreThisAttemptEvent args)
public void OnStoreThisAttempt(EntityUid uid, FoldableComponent comp, StoreMobInItemContainerAttemptEvent args)
{
args.Handled = true;
if (comp.IsFolded)
args.Cancel();
}