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);
}

View File

@@ -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

View File

@@ -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