Merge pull request #9586 from BlackMajor/Yeehaw

Adds posibrains to the spawners menu for ghosts.
This commit is contained in:
kevinz000
2019-10-24 18:45:57 -07:00
committed by GitHub
3 changed files with 17 additions and 4 deletions
@@ -151,7 +151,7 @@
message_admins(msg)
to_chat(usr, "<span class='danger'>The round is either not ready, or has already finished...</span>")
return
if(!GLOB.enter_allowed)
to_chat(usr, "<span class='notice'>There is an administrative lock on entering the game!</span>")
return
@@ -92,6 +92,17 @@ GLOBAL_VAR(posibrain_notify_cooldown)
if(posi_ask == "No" || QDELETED(src))
return
transfer_personality(user)
latejoin_remove()
/obj/item/mmi/posibrain/Destroy()
latejoin_remove()
return ..()
/obj/item/mmi/posibrain/proc/latejoin_remove()
GLOB.poi_list -= src
LAZYREMOVE(GLOB.mob_spawners[name], src)
if(!LAZYLEN(GLOB.mob_spawners[name]))
GLOB.mob_spawners -= name
/obj/item/mmi/posibrain/transfer_identity(mob/living/carbon/C)
name = "[initial(name)] ([C])"
@@ -163,6 +174,8 @@ GLOBAL_VAR(posibrain_notify_cooldown)
brainmob.container = src
if(autoping)
ping_ghosts("created", TRUE)
GLOB.poi_list |= src
LAZYADD(GLOB.mob_spawners[name], src)
/obj/item/mmi/posibrain/attackby(obj/item/O, mob/user)
return