Rollerbeds (#5681)
This commit is contained in:
@@ -193,12 +193,18 @@ namespace Content.Server.Storage.Components
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
var @event = new StorageOpenAttemptEvent();
|
||||
IoCManager.Resolve<IEntityManager>().EventBus.RaiseLocalEvent(Owner, @event);
|
||||
|
||||
return !@event.Cancelled;
|
||||
}
|
||||
|
||||
public virtual bool CanClose(EntityUid user, bool silent = false)
|
||||
{
|
||||
return true;
|
||||
var @event = new StorageCloseAttemptEvent();
|
||||
IoCManager.Resolve<IEntityManager>().EventBus.RaiseLocalEvent(Owner, @event);
|
||||
|
||||
return !@event.Cancelled;
|
||||
}
|
||||
|
||||
public void ToggleOpen(EntityUid user)
|
||||
@@ -479,4 +485,14 @@ namespace Content.Server.Storage.Components
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class StorageOpenAttemptEvent : CancellableEntityEventArgs
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public sealed class StorageCloseAttemptEvent : CancellableEntityEventArgs
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user