DiskConsoleComponent.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. using Robust.Shared.Audio;
  2. using Robust.Shared.Prototypes;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  4. namespace Content.Server.Research.TechnologyDisk.Components;
  5. [RegisterComponent]
  6. public sealed partial class DiskConsoleComponent : Component
  7. {
  8. /// <summary>
  9. /// How much it costs to print a disk
  10. /// </summary>
  11. [DataField("pricePerDisk"), ViewVariables(VVAccess.ReadWrite)]
  12. public int PricePerDisk = 1000;
  13. /// <summary>
  14. /// The prototype of what's being printed
  15. /// </summary>
  16. [DataField("diskPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>)), ViewVariables(VVAccess.ReadWrite)]
  17. public string DiskPrototype = "TechnologyDisk";
  18. /// <summary>
  19. /// How long it takes to print <see cref="DiskPrototype"/>
  20. /// </summary>
  21. [DataField("printDuration"), ViewVariables(VVAccess.ReadWrite)]
  22. public TimeSpan PrintDuration = TimeSpan.FromSeconds(1);
  23. /// <summary>
  24. /// The sound made when printing occurs
  25. /// </summary>
  26. [DataField("printSound")]
  27. public SoundSpecifier PrintSound = new SoundPathSpecifier("/Audio/Machines/printer.ogg");
  28. }