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:
Winkarst
2025-05-12 20:35:42 +03:00
committed by GitHub
parent 410d8087c6
commit 08d9d46b46
8 changed files with 71 additions and 3 deletions

View 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;
}