Genpop Closets & IDs (#36392)
* Genpop IDs and Lockers * placeholder generation, no ui yet. * UI * Fix time offset * fix meta.jsons * big speller * Scarkyo review * Add turnstile prototypes * make IDs recyclable --------- Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com> Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
This commit is contained in:
@@ -181,7 +181,7 @@ public abstract class SharedEntityStorageSystem : EntitySystem
|
||||
|
||||
if (component.Open)
|
||||
{
|
||||
TryCloseStorage(target);
|
||||
TryCloseStorage(target, user);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -360,9 +360,9 @@ public abstract class SharedEntityStorageSystem : EntitySystem
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool TryCloseStorage(EntityUid target)
|
||||
public bool TryCloseStorage(EntityUid target, EntityUid? user = null)
|
||||
{
|
||||
if (!CanClose(target))
|
||||
if (!CanClose(target, user))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -413,9 +413,9 @@ public abstract class SharedEntityStorageSystem : EntitySystem
|
||||
return !ev.Cancelled;
|
||||
}
|
||||
|
||||
public bool CanClose(EntityUid target, bool silent = false)
|
||||
public bool CanClose(EntityUid target, EntityUid? user = null, bool silent = false)
|
||||
{
|
||||
var ev = new StorageCloseAttemptEvent();
|
||||
var ev = new StorageCloseAttemptEvent(user);
|
||||
RaiseLocalEvent(target, ref ev, silent);
|
||||
|
||||
return !ev.Cancelled;
|
||||
|
||||
Reference in New Issue
Block a user