From f82bbebbe3c50ea21db9179b51f9cd5c104bb873 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 3 Sep 2021 05:08:38 -0400 Subject: [PATCH 1/3] Chorus Spawner Activation Checks Added Checks Parent Activation Conditions before Checking ghosts as part of child Activation Conditions --- .../living/carbon/alien/chorus/buildings/generic.dm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 094047e5e26..a0582b76b4f 100644 --- a/code/modules/mob/living/carbon/alien/chorus/buildings/generic.dm +++ b/code/modules/mob/living/carbon/alien/chorus/buildings/generic.dm @@ -109,9 +109,13 @@ 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. +//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) From 7e5a2c35c00af03ceb8b47c5fbf76f44b666b5bd Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 5 Sep 2021 20:30:39 -0400 Subject: [PATCH 2/3] Streamlined Womb Operation --- .../carbon/alien/chorus/buildings/generic.dm | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) 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 a0582b76b4f..e73884e2792 100644 --- a/code/modules/mob/living/carbon/alien/chorus/buildings/generic.dm +++ b/code/modules/mob/living/carbon/alien/chorus/buildings/generic.dm @@ -120,13 +120,19 @@ /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) From 2e2badffe19f30fb007e9eab0b2d71d043d4b95b Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 5 Sep 2021 20:31:58 -0400 Subject: [PATCH 3/3] Removed a Now Redundant Proc --- .../living/carbon/alien/chorus/buildings/generic.dm | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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 e73884e2792..dda5d83c91a 100644 --- a/code/modules/mob/living/carbon/alien/chorus/buildings/generic.dm +++ b/code/modules/mob/living/carbon/alien/chorus/buildings/generic.dm @@ -109,7 +109,7 @@ to_chat(C, SPAN_WARNING("You extend \the [src] [extend_text].")) a.visible_message(SPAN_DANGER("\The [a] [growth_verb] [through_text]!")) -//Checks for base activation conditions before spawner specifics. Why? Because there's a massive global list of various mobs being iterated. +//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(..()) @@ -134,13 +134,3 @@ 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