Convert rat king to use a ghost role spawner (#9459)

* Convert rat king to use a ghost role spawner

* fix literally unplayable spelling mistake
This commit is contained in:
Rane
2022-07-05 23:43:23 -04:00
committed by GitHub
parent 836c0bb1c4
commit f432592b0d
3 changed files with 20 additions and 8 deletions

View File

@@ -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<VentCritterSpawnLocationComponent, TransformComponent>().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);
}