LoadoutPrototype.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using Content.Shared.Preferences.Loadouts.Effects;
  2. using Content.Shared.Roles;
  3. using Robust.Shared.Prototypes;
  4. namespace Content.Shared.Preferences.Loadouts;
  5. /// <summary>
  6. /// Individual loadout item to be applied.
  7. /// </summary>
  8. [Prototype]
  9. public sealed partial class LoadoutPrototype : IPrototype, IEquipmentLoadout
  10. {
  11. [IdDataField]
  12. public string ID { get; private set; } = string.Empty;
  13. /*
  14. * You can either use an existing StartingGearPrototype or specify it inline to avoid bloating yaml.
  15. */
  16. /// <summary>
  17. /// An entity whose sprite, name and description is used for display in the interface. If null, tries to get the proto of the item from gear (if it is a single item).
  18. /// </summary>
  19. [DataField]
  20. public EntProtoId? DummyEntity;
  21. [DataField]
  22. public ProtoId<StartingGearPrototype>? StartingGear;
  23. /// <summary>
  24. /// Effects to be applied when the loadout is applied.
  25. /// These can also return true or false for validation purposes.
  26. /// </summary>
  27. [DataField]
  28. public List<LoadoutEffect> Effects = new();
  29. /// <inheritdoc />
  30. [DataField]
  31. public Dictionary<string, EntProtoId> Equipment { get; set; } = new();
  32. /// <inheritdoc />
  33. [DataField]
  34. public List<EntProtoId> Inhand { get; set; } = new();
  35. /// <inheritdoc />
  36. [DataField]
  37. public Dictionary<string, List<EntProtoId>> Storage { get; set; } = new();
  38. }