Imagine if artifacts fucking killed you (#17746)
This commit is contained in:
@@ -74,6 +74,13 @@ public sealed class ExplosiveComponent : Component
|
||||
[DataField("canCreateVacuum")]
|
||||
public bool CanCreateVacuum = true;
|
||||
|
||||
/// <summary>
|
||||
/// An override for whether or not the entity should be deleted after it explodes.
|
||||
/// If null, the system calling the explode method handles it.
|
||||
/// </summary>
|
||||
[DataField("deleteAfterExplosion")]
|
||||
public bool? DeleteAfterExplosion;
|
||||
|
||||
/// <summary>
|
||||
/// Avoid somehow double-triggering this explosion (e.g. by damaging this entity from its own explosion.
|
||||
/// </summary>
|
||||
|
||||
@@ -153,7 +153,7 @@ public sealed partial class ExplosionSystem : EntitySystem
|
||||
explosive.CanCreateVacuum,
|
||||
user);
|
||||
|
||||
if (delete)
|
||||
if (explosive.DeleteAfterExplosion ?? delete)
|
||||
EntityManager.QueueDeleteEntity(uid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user