1
0

RCDDeconstructibleComponent.cs 1009 B

12345678910111213141516171819202122232425262728293031323334
  1. using Content.Shared.RCD.Systems;
  2. using Robust.Shared.GameStates;
  3. using Robust.Shared.Prototypes;
  4. namespace Content.Shared.RCD.Components;
  5. [RegisterComponent, NetworkedComponent]
  6. [Access(typeof(RCDSystem))]
  7. public sealed partial class RCDDeconstructableComponent : Component
  8. {
  9. /// <summary>
  10. /// Number of charges consumed when the deconstruction is completed
  11. /// </summary>
  12. [DataField, ViewVariables(VVAccess.ReadWrite)]
  13. public int Cost = 1;
  14. /// <summary>
  15. /// The length of the deconstruction
  16. /// </summary>
  17. [DataField, ViewVariables(VVAccess.ReadWrite)]
  18. public float Delay = 1f;
  19. /// <summary>
  20. /// The visual effect that plays during deconstruction
  21. /// </summary>
  22. [DataField("fx"), ViewVariables(VVAccess.ReadWrite)]
  23. public EntProtoId? Effect = null;
  24. /// <summary>
  25. /// Toggles whether this entity is deconstructable or not
  26. /// </summary>
  27. [DataField, ViewVariables(VVAccess.ReadWrite)]
  28. public bool Deconstructable = true;
  29. }