StoreOnCollideComponent.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. using Content.Shared.Storage.EntitySystems;
  2. using Content.Shared.Whitelist;
  3. using Robust.Shared.GameStates;
  4. namespace Content.Shared.Storage.Components;
  5. // Use where you want an entity to store other entities on collide
  6. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(StoreOnCollideSystem))]
  7. public sealed partial class StoreOnCollideComponent : Component
  8. {
  9. /// <summary>
  10. /// Entities that are allowed in the storage on collide
  11. /// </summary>
  12. [DataField]
  13. public EntityWhitelist? Whitelist;
  14. /// <summary>
  15. /// Should this storage lock on collide, provided they have a lock component?
  16. /// </summary>
  17. [DataField]
  18. public bool LockOnCollide;
  19. /// <summary>
  20. /// Should the behavior be disabled when the storage is first opened?
  21. /// </summary>
  22. [DataField]
  23. public bool DisableWhenFirstOpened;
  24. /// <summary>
  25. /// If the behavior is disabled or not
  26. /// </summary>
  27. [DataField, AutoNetworkedField]
  28. public bool Disabled;
  29. }