Better Godmode (#37020)
* Commit * Oversights oops * breaking changes * unbreaking changes * Compatibility with AfterFullyEaten * Fixed * Update Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs --------- Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
4407eab96b
commit
62c380fc53
@@ -5,12 +5,18 @@ public abstract class SharedDestructibleSystem : EntitySystem
|
||||
/// <summary>
|
||||
/// Force entity to be destroyed and deleted.
|
||||
/// </summary>
|
||||
public void DestroyEntity(EntityUid owner)
|
||||
public bool DestroyEntity(EntityUid owner)
|
||||
{
|
||||
var eventArgs = new DestructionEventArgs();
|
||||
var ev = new DestructionAttemptEvent();
|
||||
RaiseLocalEvent(owner, ev);
|
||||
if (ev.Cancelled)
|
||||
return false;
|
||||
|
||||
var eventArgs = new DestructionEventArgs();
|
||||
RaiseLocalEvent(owner, eventArgs);
|
||||
|
||||
QueueDel(owner);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -23,6 +29,14 @@ public abstract class SharedDestructibleSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raised before an entity is about to be destroyed and deleted
|
||||
/// </summary>
|
||||
public sealed class DestructionAttemptEvent : CancellableEntityEventArgs
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raised when entity is destroyed and about to be deleted.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user