1
0

ToolQualityPrototype.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Robust.Shared.Prototypes;
  2. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  3. using Robust.Shared.Utility;
  4. namespace Content.Shared.Tools
  5. {
  6. [Prototype("tool")]
  7. public sealed partial class ToolQualityPrototype : IPrototype
  8. {
  9. [IdDataField]
  10. public string ID { get; private set; } = default!;
  11. /// <summary>
  12. /// Human-readable name for this tool quality e.g. "Anchoring"
  13. /// </summary>
  14. /// <remarks>This is a localization string ID.</remarks>
  15. [DataField("name")]
  16. public string Name { get; private set; } = string.Empty;
  17. /// <summary>
  18. /// Human-readable name for a tool of this type e.g. "Wrench"
  19. /// </summary>
  20. /// <remarks>This is a localization string ID.</remarks>
  21. [DataField("toolName")]
  22. public string ToolName { get; private set; } = string.Empty;
  23. /// <summary>
  24. /// An icon that will be used to represent this tool type.
  25. /// </summary>
  26. [DataField("icon")]
  27. public SpriteSpecifier? Icon { get; private set; } = null;
  28. /// <summary>
  29. /// The default entity prototype for this tool type.
  30. /// </summary>
  31. [DataField("spawn", required:true, customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
  32. public string Spawn { get; private set; } = string.Empty;
  33. }
  34. }