diff --git a/code/modules/mob/living/carbon/alien/chorus/buildings/generic.dm b/code/modules/mob/living/carbon/alien/chorus/buildings/generic.dm index 094047e5e2..dda5d83c91 100644 --- a/code/modules/mob/living/carbon/alien/chorus/buildings/generic.dm +++ b/code/modules/mob/living/carbon/alien/chorus/buildings/generic.dm @@ -109,28 +109,28 @@ to_chat(C, SPAN_WARNING("You extend \the [src] [extend_text].")) a.visible_message(SPAN_DANGER("\The [a] [growth_verb] [through_text]!")) - -/obj/structure/chorus/spawner/can_activate() - return TRUE +//Checks for base activation conditions before spawner specifics. Why? Because there's a massive global list of various mobs being iterated through, to check that there's even eligible ghosts. +//This proc used to just outright return TRUE for whatever reason. +/obj/structure/chorus/spawner/can_activate(var/mob/living/carbon/alien/chorus/C, var/warning = TRUE) + if(..()) + for(var/mob/observer/ghost/ghost in GLOB.player_list) //No player ghost GLOB :( + if(MODE_DEITY in ghost.client.prefs.be_special_role) + return TRUE /obj/structure/chorus/spawner/activate() for(var/mob/observer/ghost/ghost in GLOB.player_list) if(MODE_DEITY in ghost.client.prefs.be_special_role) - to_chat(ghost, SPAN_NOTICE("A chorus spawn is available! (Jump)")) - -/obj/structure/chorus/spawner/OnTopic(user, href_list) - if(href_list["jump"] && istype(user,/mob/observer/ghost)) - var/mob/M = user - M.forceMove(get_turf(src)) - return TOPIC_HANDLED + to_chat(ghost, SPAN_NOTICE("A chorus spawn is available! ((Join))")) + +/obj/structure/chorus/spawner/OnTopic(var/mob/user, href_list) + if(href_list["src"] && istype(user,/mob/observer/ghost)) + if(GLOB.chorus.can_become_antag(user.mind)) + if(!owner.use_resource(activation_cost_resource, activation_cost_amount)) + var/datum/chorus_resource/resource = owner.get_resource(activation_cost_resource) + to_chat(user, SPAN_WARNING("\The [src] needs [activation_cost_amount - resource.amount] more [resource.name] in order to spawn.")) + return + announce_ghost_joinleave(user, 0, "They have joined a chorus") + var/mob/living/carbon/alien/chorus/sac = new(get_turf(src), owner) + sac.ckey = user.ckey + return TOPIC_HANDLED . = ..() - -/obj/structure/chorus/spawner/attack_ghost(var/mob/observer/ghost/user) - if(GLOB.chorus.can_become_antag(user.mind)) - if(!owner.use_resource(activation_cost_resource, activation_cost_amount)) - var/datum/chorus_resource/resource = owner.get_resource(activation_cost_resource) - to_chat(user, SPAN_WARNING("\The [src] needs [activation_cost_amount - resource.amount] more [resource.name] in order to spawn.")) - return - announce_ghost_joinleave(user, 0, "They have joined a chorus") - var/mob/living/carbon/alien/chorus/sac = new(get_turf(src), owner) - sac.ckey = user.ckey