Remove IDestroyAct, IBreakAct (#7876)
This commit is contained in:
40
Content.Shared/Destructible/SharedDestructibleSystem.cs
Normal file
40
Content.Shared/Destructible/SharedDestructibleSystem.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
namespace Content.Shared.Destructible;
|
||||
|
||||
public abstract class SharedDestructibleSystem : EntitySystem
|
||||
{
|
||||
/// <summary>
|
||||
/// Force entity to be destroyed and deleted.
|
||||
/// </summary>
|
||||
public void DestroyEntity(EntityUid owner)
|
||||
{
|
||||
var eventArgs = new DestructionEventArgs();
|
||||
|
||||
RaiseLocalEvent(owner, eventArgs, false);
|
||||
QueueDel(owner);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Force entity to broke.
|
||||
/// </summary>
|
||||
public void BreakEntity(EntityUid owner)
|
||||
{
|
||||
var eventArgs = new BreakageEventArgs();
|
||||
RaiseLocalEvent(owner, eventArgs, false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raised when entity is destroyed and about to be deleted.
|
||||
/// </summary>
|
||||
public sealed class DestructionEventArgs : EntityEventArgs
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raised when entity was heavy damage and about to break.
|
||||
/// </summary>
|
||||
public sealed class BreakageEventArgs : EntityEventArgs
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user