Hotfix for Body Bags (#9155)

* Oops

* Requested changes

* Renamed

* rename

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Júlio César Ueti
2022-06-27 02:37:29 -03:00
committed by GitHub
parent e9d6156d0c
commit a265cd8935
3 changed files with 17 additions and 7 deletions

View File

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