1
0

HotPotatoComponent.cs 692 B

1234567891011121314151617181920
  1. using Robust.Shared.GameStates;
  2. namespace Content.Shared.HotPotato;
  3. /// <summary>
  4. /// Similar to <see cref="Interaction.Components.UnremoveableComponent"/>
  5. /// except entities with this component can be removed in specific case: <see cref="CanTransfer"/>
  6. /// </summary>
  7. [RegisterComponent, NetworkedComponent]
  8. [AutoGenerateComponentState]
  9. [Access(typeof(SharedHotPotatoSystem))]
  10. public sealed partial class HotPotatoComponent : Component
  11. {
  12. /// <summary>
  13. /// If set to true entity can be removed by hitting entities if they have hands
  14. /// </summary>
  15. [DataField("canTransfer"), ViewVariables(VVAccess.ReadWrite)]
  16. [AutoNetworkedField]
  17. public bool CanTransfer = true;
  18. }