1
0

StealConditionComponent.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. using Content.Server.Objectives.Systems;
  2. using Content.Shared.Objectives;
  3. using Robust.Shared.Prototypes;
  4. namespace Content.Server.Objectives.Components;
  5. /// <summary>
  6. /// Requires that you steal a certain item (or several)
  7. /// </summary>
  8. [RegisterComponent, Access(typeof(StealConditionSystem))]
  9. public sealed partial class StealConditionComponent : Component
  10. {
  11. /// <summary>
  12. /// A group of items to be stolen
  13. /// </summary>
  14. [DataField(required: true)]
  15. public ProtoId<StealTargetGroupPrototype> StealGroup;
  16. /// <summary>
  17. /// When enabled, disables generation of this target if there is no entity on the map (disable for objects that can be created mid-round).
  18. /// </summary>
  19. [DataField]
  20. public bool VerifyMapExistence = true;
  21. /// <summary>
  22. /// If true, counts objects that are close to steal areas.
  23. /// </summary>
  24. [DataField]
  25. public bool CheckStealAreas = false;
  26. /// <summary>
  27. /// If the target may be alive but has died, it will not be counted
  28. /// </summary>
  29. [DataField]
  30. public bool CheckAlive = false;
  31. /// <summary>
  32. /// The minimum number of items you need to steal to fulfill a objective
  33. /// </summary>
  34. [DataField]
  35. public int MinCollectionSize = 1;
  36. /// <summary>
  37. /// The maximum number of items you need to steal to fulfill a objective
  38. /// </summary>
  39. [DataField]
  40. public int MaxCollectionSize = 1;
  41. /// <summary>
  42. /// Target collection size after calculation
  43. /// </summary>
  44. [DataField]
  45. public int CollectionSize;
  46. /// <summary>
  47. /// Help newer players by saying e.g. "steal the chief engineer's advanced magboots"
  48. /// instead of "steal advanced magboots. Should be a loc string.
  49. /// </summary>
  50. [DataField("owner")]
  51. public string? OwnerText;
  52. // All this need to be loc string
  53. [DataField(required: true)]
  54. public LocId ObjectiveText;
  55. [DataField(required: true)]
  56. public LocId ObjectiveNoOwnerText;
  57. [DataField(required: true)]
  58. public LocId DescriptionText;
  59. [DataField(required: true)]
  60. public LocId DescriptionMultiplyText;
  61. }