New Feature: Slot blockers (#35172)
* First commit * More comments * Update * Update * For Beloved Maintainers * Beck T, my beloved * Update * Old stuff * Update EquipAttemptEvents.cs * Update UnequipAttemptEvent.cs --------- Co-authored-by: beck-thompson <107373427+beck-thompson@users.noreply.github.com>
This commit is contained in:
16
Content.Shared/Inventory/SlotBlockComponent.cs
Normal file
16
Content.Shared/Inventory/SlotBlockComponent.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Inventory;
|
||||
|
||||
/// <summary>
|
||||
/// Used to prevent items from being unequipped and equipped from slots that are listed in <see cref="Slots"/>.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SlotBlockSystem))]
|
||||
public sealed partial class SlotBlockComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Slots that this entity should block.
|
||||
/// </summary>
|
||||
[DataField(required: true), AutoNetworkedField]
|
||||
public SlotFlags Slots = SlotFlags.NONE;
|
||||
}
|
||||
Reference in New Issue
Block a user