This commit is contained in:
Fluffy
2024-02-24 11:32:43 +00:00
committed by GitHub
parent b78b9b80f5
commit c32c4e57ed
7 changed files with 132 additions and 10 deletions
@@ -10,3 +10,14 @@
atom_add_message = "A Greimorian queen has birthed a Greimorian servant!"
spawn_mob = /mob/living/simple_animal/hostile/giant_spider/nurse/servant
/datum/ghostspawner/servant/spawn_mob(mob/user)
. = ..()
//Basically, we don't want the mob AI to keep running if a player is assigned to it
//ideally there should also be an handling to resume thinking if the player ghosts
//but that would probably need a signal that we don't currently have, hence
//something for another time
var/mob/our_new_mob = . //This cast is needed, sorry
if(istype(our_new_mob) && !QDELETED(our_new_mob))
MOB_STOP_THINKING(our_new_mob)
+12 -2
View File
@@ -155,9 +155,19 @@
spawn_atoms -= A
return A
//The proc to actually spawn in the user
/**
* The proc to actually spawn in the user
*
* OVERWRITE THIS IN THE CHILD IMPLEMENTATIONS to return the spawned in mob !!!
*
* This is a basic proc for atom based spawners
*
* * user - A `/mob` to assign the current owner (client) of, to the new ghost spawn
*
* Returns a `/mob` which is the spawned mob, or `null` in case of error/unavailability
*/
/datum/ghostspawner/proc/spawn_mob(mob/user)
//OVERWRITE THIS IN THE CHILD IMPLEMENTATIONS to return the spawned in mob !!!
RETURN_TYPE(/mob)
//This is a basic proc for atom based spawners.
// Location based spawners usually need a bit more logic
@@ -13,3 +13,14 @@
respawn_flag = null
spawn_mob = /mob/living/simple_animal/hostile/giant_spider/nurse/spider_queen
/datum/ghostspawner/simplemob/spider_queen/spawn_mob(mob/user)
. = ..()
//Basically, we don't want the mob AI to keep running if a player is assigned to it
//ideally there should also be an handling to resume thinking if the player ghosts
//but that would probably need a signal that we don't currently have, hence
//something for another time
var/mob/our_new_mob = . //This cast is needed, sorry
if(istype(our_new_mob) && !QDELETED(our_new_mob))
MOB_STOP_THINKING(our_new_mob)