SiliconLawProviderComponent.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using Robust.Shared.Prototypes;
  2. using Robust.Shared.Audio;
  3. namespace Content.Shared.Silicons.Laws.Components;
  4. /// <summary>
  5. /// This is used for an entity which grants laws to a <see cref="SiliconLawBoundComponent"/>
  6. /// </summary>
  7. [RegisterComponent, Access(typeof(SharedSiliconLawSystem))]
  8. public sealed partial class SiliconLawProviderComponent : Component
  9. {
  10. /// <summary>
  11. /// The id of the lawset that is being provided.
  12. /// </summary>
  13. [DataField(required: true)]
  14. public ProtoId<SiliconLawsetPrototype> Laws = string.Empty;
  15. /// <summary>
  16. /// Lawset created from the prototype id.
  17. /// Cached when getting laws and modified during an ion storm event and when emagged.
  18. /// </summary>
  19. [DataField, ViewVariables(VVAccess.ReadWrite)]
  20. public SiliconLawset? Lawset;
  21. /// <summary>
  22. /// The sound that plays for the Silicon player
  23. /// when the law change is processed for the provider.
  24. /// </summary>
  25. [DataField]
  26. public SoundSpecifier? LawUploadSound = new SoundPathSpecifier("/Audio/Misc/cryo_warning.ogg");
  27. /// <summary>
  28. /// Whether this silicon is subverted by an ion storm or emag.
  29. /// </summary>
  30. [DataField]
  31. public bool Subverted = false;
  32. }