Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xenos cannot pylon working comms anymore #6241

Merged
merged 5 commits into from
May 11, 2024
Merged
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
12 changes: 10 additions & 2 deletions code/game/machinery/telecomms/presets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ GLOBAL_LIST_EMPTY(all_static_telecomms_towers)
else
update_icon()

/obj/structure/machinery/telecomms/relay/preset/tower/mapcomms/update_state()
..()
if(inoperable())
handle_xeno_acquisition(get_turf(src))

/// Handles xenos corrupting the tower when weeds touch the turf it is located on
/obj/structure/machinery/telecomms/relay/preset/tower/mapcomms/proc/handle_xeno_acquisition(turf/weeded_turf)
SIGNAL_HANDLER
Expand All @@ -328,12 +333,15 @@ GLOBAL_LIST_EMPTY(all_static_telecomms_towers)
if(SSticker.mode.is_in_endgame)
return

if(operable())
return

if(ROUND_TIME < XENO_COMM_ACQUISITION_TIME)
addtimer(CALLBACK(src, PROC_REF(handle_xeno_acquisition), weeded_turf), (XENO_COMM_ACQUISITION_TIME - ROUND_TIME))
addtimer(CALLBACK(src, PROC_REF(handle_xeno_acquisition), weeded_turf), (XENO_COMM_ACQUISITION_TIME - ROUND_TIME), TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_NO_HASH_WAIT)
return

if(!COOLDOWN_FINISHED(src, corruption_delay))
addtimer(CALLBACK(src, PROC_REF(handle_xeno_acquisition), weeded_turf), (COOLDOWN_TIMELEFT(src, corruption_delay)))
addtimer(CALLBACK(src, PROC_REF(handle_xeno_acquisition), weeded_turf), (COOLDOWN_TIMELEFT(src, corruption_delay)), TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_NO_HASH_WAIT)
return

var/obj/effect/alien/weeds/node/pylon/cluster/parent_node = weeded_turf.weeds.parent
Expand Down
Loading