Equipment verbs & admin inventory access. (#14315)

This commit is contained in:
Leon Friedrich
2023-03-06 06:12:08 +13:00
committed by GitHub
parent a9b268af49
commit b148bebd60
29 changed files with 499 additions and 141 deletions

View File

@@ -14,6 +14,15 @@ public abstract class SharedStrippableSystem : EntitySystem
SubscribeLocalEvent<StrippableComponent, DragDropDraggedEvent>(OnDragDrop);
}
public (float Time, bool Stealth) GetStripTimeModifiers(EntityUid user, EntityUid target, float initialTime)
{
var userEv = new BeforeStripEvent(initialTime);
RaiseLocalEvent(user, userEv);
var ev = new BeforeGettingStrippedEvent(userEv.Time, userEv.Stealth);
RaiseLocalEvent(target, ev);
return (ev.Time, ev.Stealth);
}
private void OnDragDrop(EntityUid uid, StrippableComponent component, ref DragDropDraggedEvent args)
{
// If the user drags a strippable thing onto themselves.