Skip to content
This repository has been archived by the owner on Mar 10, 2022. It is now read-only.

Chorus Womb Fix+Improvements #33

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions code/modules/mob/living/carbon/alien/chorus/buildings/generic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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! <a href='?src=\ref[src];jump=1'>(Jump)</a>"))

/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! (<a href='?src=\ref[src]'>(Join)</a>)"))

/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