Add WieldingBlockerComponent (#37778)

initial commit
This commit is contained in:
slarticodefast
2025-05-26 05:50:30 +02:00
committed by GitHub
parent 68d5d940cf
commit e8bc811f7a
6 changed files with 124 additions and 12 deletions

View File

@@ -0,0 +1,23 @@
using Robust.Shared.GameStates;
namespace Content.Shared.Wieldable.Components;
/// <summary>
/// Blocks an entity from wielding items.
/// When added to an item, it will block wielding when held in hand or equipped.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class WieldingBlockerComponent : Component
{
/// <summary>
/// Block wielding when this item is held in a hand?
/// </summary>
[DataField, AutoNetworkedField]
public bool BlockInHand = true;
/// <summary>
/// Block wielding when this item is equipped?
/// </summary>
[DataField, AutoNetworkedField]
public bool BlockEquipped = true;
}