Files
tbd-station-14/Content.Shared/Storage/Components/StoreOnCollideComponent.cs
keronshb 82528dce37 Adds Store on Collide and Wand of the Locker (#33710)
* Adds wand of locker and locker projectile

* Adds IsOpen method to check if storage is open

* Adds store on collide

* Adds Store On Collide to Wizard Locker

* Adds Lock API

* Adds locking support

* Adds resist override and custom visual layers

* Fixes decursed states, adds comment for a future visualizer

* adds locker wand visuals and descriptions

* shrinks locker radius, moves TODO for throw support

* Adds whitelist and moves storage and lock logic into their own methods

* Adds support to disable store on collide after the first open. Fixes prediction issues with disabling.

* Adds wand of locker to the grimoire

* Adds wizard access prototype

* Adds Wizard to universal access

* Moves Lock on collide to on collide method

* Comments

* Changes layer order

* Fixes prediction issues when locking.

* Adds Wiz access to universal ID
2024-12-04 17:49:54 +01:00

35 lines
1.0 KiB
C#

using Content.Shared.Storage.EntitySystems;
using Content.Shared.Whitelist;
using Robust.Shared.GameStates;
namespace Content.Shared.Storage.Components;
// Use where you want an entity to store other entities on collide
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(StoreOnCollideSystem))]
public sealed partial class StoreOnCollideComponent : Component
{
/// <summary>
/// Entities that are allowed in the storage on collide
/// </summary>
[DataField]
public EntityWhitelist? Whitelist;
/// <summary>
/// Should this storage lock on collide, provided they have a lock component?
/// </summary>
[DataField]
public bool LockOnCollide;
/// <summary>
/// Should the behavior be disabled when the storage is first opened?
/// </summary>
[DataField]
public bool DisableWhenFirstOpened;
/// <summary>
/// If the behavior is disabled or not
/// </summary>
[DataField, AutoNetworkedField]
public bool Disabled;
}