DeliveryComponent.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using Robust.Shared.Audio;
  2. using Robust.Shared.GameStates;
  3. namespace Content.Shared.Delivery;
  4. /// <summary>
  5. /// Component given to deliveries.
  6. /// Means the entity is a delivery, which upon opening will grant a reward to cargo.
  7. /// </summary>
  8. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true)]
  9. public sealed partial class DeliveryComponent : Component
  10. {
  11. /// <summary>
  12. /// Whether this delivery has been opened before.
  13. /// </summary>
  14. [DataField, AutoNetworkedField]
  15. public bool IsOpened;
  16. /// <summary>
  17. /// Whether this delivery is still locked using the fingerprint reader.
  18. /// </summary>
  19. [DataField, AutoNetworkedField]
  20. public bool IsLocked = true;
  21. /// <summary>
  22. /// The amount of spesos that gets added to the station bank account on unlock.
  23. /// </summary>
  24. [DataField, AutoNetworkedField]
  25. public int SpesoReward = 500;
  26. /// <summary>
  27. /// The name of the recipient of this delivery.
  28. /// Used for the examine text.
  29. /// </summary>
  30. [DataField, AutoNetworkedField]
  31. public string? RecipientName;
  32. /// <summary>
  33. /// The job of the recipient of this delivery.
  34. /// Used for the examine text.
  35. /// </summary>
  36. [DataField, AutoNetworkedField]
  37. public string? RecipientJobTitle;
  38. /// <summary>
  39. /// The EntityUid of the station this delivery was spawned on.
  40. /// </summary>
  41. [DataField, AutoNetworkedField]
  42. public EntityUid? RecipientStation;
  43. /// <summary>
  44. /// The sound to play when the delivery is unlocked.
  45. /// </summary>
  46. [DataField]
  47. public SoundSpecifier? UnlockSound = new SoundCollectionSpecifier("DeliveryUnlockSounds", AudioParams.Default.WithVolume(-10));
  48. /// <summary>
  49. /// The sound to play when the delivery is opened.
  50. /// </summary>
  51. [DataField]
  52. public SoundSpecifier? OpenSound = new SoundCollectionSpecifier("DeliveryOpenSounds");
  53. /// <summary>
  54. /// The container with all the contents of the delivery.
  55. /// </summary>
  56. [DataField]
  57. public string Container = "delivery";
  58. }