Delete unremoveable items when removed from hands or inventory (#15662)

This commit is contained in:
brainfood1183
2023-04-24 01:20:39 +01:00
committed by GitHub
parent 0fdbe1152e
commit 298913f980
3 changed files with 50 additions and 1 deletions

View File

@@ -1,8 +1,17 @@
using Content.Shared.Whitelist;
using Robust.Shared.GameStates;
namespace Content.Shared.Interaction.Components
{
[RegisterComponent]
[NetworkedComponent]
public sealed class UnremoveableComponent : Component {}
public sealed class UnremoveableComponent : Component
{
/// <summary>
/// If this is true then unremovable items that are removed from inventory are deleted (typically from corpse gibbing).
/// Items within unremovable containers are not deleted when removed.
/// </summary>
[DataField("deleteOnDrop")]
public bool DeleteOnDrop = true;
}
}