SalvageMobEntry.cs 876 B

123456789101112131415161718192021222324
  1. using Content.Shared.Random;
  2. using Robust.Shared.Prototypes;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  4. namespace Content.Shared.Salvage.Expeditions;
  5. [DataDefinition]
  6. public partial record struct SalvageMobEntry() : IBudgetEntry
  7. {
  8. /// <summary>
  9. /// Cost for this mob in a budget.
  10. /// </summary>
  11. [ViewVariables(VVAccess.ReadWrite), DataField("cost")]
  12. public float Cost { get; set; } = 1f;
  13. /// <summary>
  14. /// Probability to spawn this mob. Summed with everything else for the faction.
  15. /// </summary>
  16. [ViewVariables(VVAccess.ReadWrite), DataField("prob")]
  17. public float Prob { get; set; } = 1f;
  18. [ViewVariables(VVAccess.ReadWrite), DataField("proto", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
  19. public string Proto { get; set; } = string.Empty;
  20. }