SpaceVillainArcadeComponent.cs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. using Content.Shared.Arcade;
  2. using Robust.Shared.Audio;
  3. using Robust.Shared.Prototypes;
  4. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
  5. namespace Content.Server.Arcade.SpaceVillain;
  6. [RegisterComponent]
  7. public sealed partial class SpaceVillainArcadeComponent : SharedSpaceVillainArcadeComponent
  8. {
  9. /// <summary>
  10. /// Unused flag that can be hacked via wires.
  11. /// Name suggests that it was intended to either make the health/mana values underflow while playing the game or turn the arcade machine into an infinite prize fountain.
  12. /// </summary>
  13. [ViewVariables]
  14. public bool OverflowFlag;
  15. /// <summary>
  16. /// The current session of the SpaceVillain game for this arcade machine.
  17. /// </summary>
  18. [ViewVariables]
  19. public SpaceVillainGame? Game = null;
  20. /// <summary>
  21. /// The sound played when a new session of the SpaceVillain game is begun.
  22. /// </summary>
  23. [DataField("newGameSound")]
  24. public SoundSpecifier NewGameSound = new SoundPathSpecifier("/Audio/Effects/Arcade/newgame.ogg");
  25. /// <summary>
  26. /// The sound played when the player chooses to attack.
  27. /// </summary>
  28. [DataField("playerAttackSound")]
  29. public SoundSpecifier PlayerAttackSound = new SoundPathSpecifier("/Audio/Effects/Arcade/player_attack.ogg");
  30. /// <summary>
  31. /// The sound played when the player chooses to heal.
  32. /// </summary>
  33. [DataField("playerHealSound")]
  34. public SoundSpecifier PlayerHealSound = new SoundPathSpecifier("/Audio/Effects/Arcade/player_heal.ogg");
  35. /// <summary>
  36. /// The sound played when the player chooses to regain mana.
  37. /// </summary>
  38. [DataField("playerChargeSound")]
  39. public SoundSpecifier PlayerChargeSound = new SoundPathSpecifier("/Audio/Effects/Arcade/player_charge.ogg");
  40. /// <summary>
  41. /// The sound played when the player wins.
  42. /// </summary>
  43. [DataField("winSound")]
  44. public SoundSpecifier WinSound = new SoundPathSpecifier("/Audio/Effects/Arcade/win.ogg");
  45. /// <summary>
  46. /// The sound played when the player loses.
  47. /// </summary>
  48. [DataField("gameOverSound")]
  49. public SoundSpecifier GameOverSound = new SoundPathSpecifier("/Audio/Effects/Arcade/gameover.ogg");
  50. /// <summary>
  51. /// The prefixes that can be used to create the game name.
  52. /// </summary>
  53. [ViewVariables(VVAccess.ReadWrite)]
  54. [DataField("possibleFightVerbs")]
  55. public List<string> PossibleFightVerbs = new()
  56. {"Defeat", "Annihilate", "Save", "Strike", "Stop", "Destroy", "Robust", "Romance", "Pwn", "Own"};
  57. /// <summary>
  58. /// The first names/titles that can be used to construct the name of the villain.
  59. /// </summary>
  60. [ViewVariables(VVAccess.ReadWrite)]
  61. [DataField("possibleFirstEnemyNames")]
  62. public List<string> PossibleFirstEnemyNames = new(){
  63. "the Automatic", "Farmer", "Lord", "Professor", "the Cuban", "the Evil", "the Dread King",
  64. "the Space", "Lord", "the Great", "Duke", "General"
  65. };
  66. /// <summary>
  67. /// The last names that can be used to construct the name of the villain.
  68. /// </summary>
  69. [ViewVariables(VVAccess.ReadWrite)]
  70. [DataField("possibleLastEnemyNames")]
  71. public List<string> PossibleLastEnemyNames = new()
  72. {
  73. "Melonoid", "Murdertron", "Sorcerer", "Ruin", "Jeff", "Ectoplasm", "Crushulon", "Uhangoid",
  74. "Vhakoid", "Peteoid", "slime", "Griefer", "ERPer", "Lizard Man", "Unicorn"
  75. };
  76. /// <summary>
  77. /// The prototypes that can be dispensed as a reward for winning the game.
  78. /// </summary>
  79. [ViewVariables(VVAccess.ReadWrite)]
  80. [DataField("possibleRewards", customTypeSerializer: typeof(PrototypeIdListSerializer<EntityPrototype>))]
  81. public List<string> PossibleRewards = new();
  82. /// <summary>
  83. /// The minimum number of prizes the arcade machine can have.
  84. /// </summary>
  85. [DataField("rewardMinAmount")]
  86. public int RewardMinAmount;
  87. /// <summary>
  88. /// The maximum number of prizes the arcade machine can have.
  89. /// </summary>
  90. [DataField("rewardMaxAmount")]
  91. public int RewardMaxAmount;
  92. /// <summary>
  93. /// The remaining number of prizes the arcade machine can dispense.
  94. /// </summary>
  95. [ViewVariables(VVAccess.ReadWrite)]
  96. public int RewardAmount = 0;
  97. }