From f432592b0d056e8551a8989f3406bf3e907f8ad3 Mon Sep 17 00:00:00 2001 From: Rane <60792108+Elijahrane@users.noreply.github.com> Date: Tue, 5 Jul 2022 23:43:23 -0400 Subject: [PATCH] Convert rat king to use a ghost role spawner (#9459) * Convert rat king to use a ghost role spawner * fix literally unplayable spelling mistake --- .../StationEvents/Events/MouseMigration.cs | 6 +++--- .../Entities/Markers/Spawners/ghost_roles.yml | 16 ++++++++++++++++ .../Prototypes/Entities/Mobs/NPCs/regalrat.yml | 6 +----- 3 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 Resources/Prototypes/Entities/Markers/Spawners/ghost_roles.yml diff --git a/Content.Server/StationEvents/Events/MouseMigration.cs b/Content.Server/StationEvents/Events/MouseMigration.cs index ee7510e6ee..f285b6652b 100644 --- a/Content.Server/StationEvents/Events/MouseMigration.cs +++ b/Content.Server/StationEvents/Events/MouseMigration.cs @@ -19,7 +19,7 @@ public sealed class MouseMigration : StationEvent public override int EarliestStart => 30; - public override int MinimumPlayers => 35; //this just ensures that it doesn't spawn on lowpop maps. + public override int MinimumPlayers => 35; //this just ensures that it doesn't spawn on lowpop maps. public override float Weight => WeightLow; @@ -34,7 +34,7 @@ public sealed class MouseMigration : StationEvent public override void Startup() { base.Startup(); - + var spawnLocations = _entityManager.EntityQuery().ToList(); _random.Shuffle(spawnLocations); @@ -44,7 +44,7 @@ public sealed class MouseMigration : StationEvent { var spawnChoice = _random.Pick(SpawnedPrototypeChoices); if (_random.Prob(0.01f) || i == 0) //small chance for multiple, but always at least 1 - spawnChoice = "MobRatKing"; + spawnChoice = "SpawnPointGhostRatKing"; _entityManager.SpawnEntity(spawnChoice, spawnLocations[i].Item2.Coordinates); } diff --git a/Resources/Prototypes/Entities/Markers/Spawners/ghost_roles.yml b/Resources/Prototypes/Entities/Markers/Spawners/ghost_roles.yml new file mode 100644 index 0000000000..beb998cd10 --- /dev/null +++ b/Resources/Prototypes/Entities/Markers/Spawners/ghost_roles.yml @@ -0,0 +1,16 @@ +- type: entity + id: SpawnPointGhostRatKing + name: ghost role spawn point + suffix: rat king + parent: MarkerBase + components: + - type: GhostRoleMobSpawner + prototype: MobRatKing + name: Rat King + description: You are the Rat King, scavenge food in order to produce rat minions to do your bidding. + rules: You are an antagonist, scavenge, attack, and grow your hoard! + - type: Sprite + sprite: Markers/jobs.rsi + layers: + - state: green + - texture: Mobs/Animals/regalrat.rsi/icon.png diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml b/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml index 7d7b11f4c7..26f2d6827e 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml @@ -10,10 +10,6 @@ baseSprintSpeed : 3.75 - type: PlayerInputMover - type: PlayerMobMover - - type: UtilityAI - behaviorSets: - - Idle - - UnarmedAttackHostiles - type: Reactive groups: Flammable: [Touch] @@ -71,7 +67,7 @@ makeSentient: true name: Rat King description: You are the Rat King, scavenge food in order to produce rat minions to do your bidding. - rules: You are an antagonist, scavenge, attack, and grow your hoarde! + rules: You are an antagonist, scavenge, attack, and grow your hoard! - type: Tag tags: - CannotSuicide