Slime core mob selection fix (#19289)

Marked some mobs that were not meant to be spawned as abstracts.
Updated the reaction of the slime core to not spawn abstract mobs.

Fixes #19276
This commit is contained in:
Fluffy
2024-05-31 20:15:42 +00:00
committed by GitHub
parent 81b31ed865
commit d0d98edb8f
7 changed files with 80 additions and 3 deletions
@@ -1,5 +1,7 @@
//For things that swim and don't do much else.
/mob/living/simple_animal/aquatic
abstract_type = /mob/living/simple_animal/aquatic
name = "aquatic animal"
desc = DESC_PARENT
icon = 'icons/mob/npc/fish.dmi'
@@ -1,4 +1,6 @@
/mob/living/simple_animal/hostile/commanded
abstract_type = /mob/living/simple_animal/hostile/commanded
name = "commanded"
var/short_name = null
stance = COMMANDED_STOP
@@ -1,4 +1,6 @@
/mob/living/simple_animal/hostile
abstract_type = /mob/living/simple_animal/hostile
faction = "hostile"
var/stance = HOSTILE_STANCE_IDLE //Used to determine behavior
var/mob/living/target_mob
@@ -1,5 +1,7 @@
//For things that swim and don't do much else, but also bite!
/mob/living/simple_animal/hostile/retaliate/aquatic
abstract_type = /mob/living/simple_animal/hostile/retaliate/aquatic
name = "aquatic animal"
desc = DESC_PARENT
icon = 'icons/mob/npc/fish.dmi'
@@ -1,4 +1,6 @@
/mob/living/simple_animal/hostile/retaliate
abstract_type = /mob/living/simple_animal/hostile/retaliate
var/list/enemies = list()
/mob/living/simple_animal/hostile/retaliate/Destroy()
+11 -3
View File
@@ -1243,6 +1243,7 @@
required = /obj/item/slime_extract/gold
/datum/chemical_reaction/slime/crit/on_reaction(var/datum/reagents/holder)
//exclusion list for things you don't want the reaction to create
var/blocked = list(
/mob/living/simple_animal/hostile,
/mob/living/simple_animal/hostile/pirate,
@@ -1255,10 +1256,8 @@
/mob/living/simple_animal/hostile/syndicate/ranged,
/mob/living/simple_animal/hostile/syndicate/ranged/space,
/mob/living/simple_animal/hostile/faithless,
/mob/living/simple_animal/hostile/retaliate,
/mob/living/simple_animal/hostile/retaliate/clown,
/mob/living/simple_animal/hostile/true_changeling,
/mob/living/simple_animal/hostile/commanded,
/mob/living/simple_animal/hostile/commanded/dog,
/mob/living/simple_animal/hostile/commanded/dog/amaskan,
/mob/living/simple_animal/hostile/commanded/dog/columbo,
@@ -1281,7 +1280,7 @@
/mob/living/simple_animal/hostile/cavern_geist/augmented,
/mob/living/simple_animal/hostile/retaliate/pra_exploration_drone
)
//exclusion list for things you don't want the reaction to create.
var/list/critters = typesof(/mob/living/simple_animal/hostile) - blocked // list of possible hostile mobs
var/turf/location = get_turf(holder.my_atom)
playsound(location, 'sound/effects/phasein.ogg', 100, 1)
@@ -1290,6 +1289,15 @@
for(var/i = 1, i <= 5, i++)
var/chosen = pick(critters)
//No abstract mobs
while(is_abstract(chosen))
critters -= chosen
if(!length(critters))
crash_with("No critters left to pick from!")
return
chosen = pick(critters)
var/mob/living/simple_animal/hostile/C = new chosen
C.faction = "slimesummon"
C.forceMove(location)