Skip to content

Commit

Permalink
some review, forgotten test code SMH
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Jul 27, 2023
1 parent ff56b09 commit b1d0d1a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@
#define XENO_BURIED_LARVA_TIME_LIMIT (30 MINUTES)

/// The time when xenos can start taking over comm towers
#define XENO_COMM_ACQUISITION_TIME (0 MINUTES) //RETURN TO 90 MINUTES BEFORE TM - MORROW
#define XENO_COMM_ACQUISITION_TIME (90 MINUTES)

/// The time it takes for a pylon to give one larva while activated
#define XENO_PYLON_ACTIVATION_COOLDOWN (30 SECONDS) //RETURN TO 5 MINUTES BEFORE TM - MORROW
#define XENO_PYLON_ACTIVATION_COOLDOWN (5 MINUTES)

/// The time against away_timer when an AFK xeno larva can be replaced
#define XENO_LEAVE_TIMER_LARVA 80 //80 seconds
Expand Down
4 changes: 4 additions & 0 deletions code/game/machinery/telecomms/presets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ GLOBAL_LIST_EMPTY(all_static_telecomms_towers)
else
update_icon()

/// 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 @@ -314,6 +315,9 @@ GLOBAL_LIST_EMPTY(all_static_telecomms_towers)
if(!istype(weeded_turf.weeds.parent, /obj/effect/alien/weeds/node/pylon/cluster))
return

if(SSticker.mode.is_in_endgame)
return

if(ROUND_TIME < XENO_COMM_ACQUISITION_TIME)
addtimer(CALLBACK(src, PROC_REF(handle_xeno_acquisition), weeded_turf), (XENO_COMM_ACQUISITION_TIME - ROUND_TIME))
return
Expand Down
4 changes: 3 additions & 1 deletion code/modules/cm_aliens/structures/special/pylon_core.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
LAZYREMOVE(A.linked_pylons, src)

if(node)
qdel(node)
qdel_null(node)
. = ..()

/obj/effect/alien/resin/special/pylon/attack_alien(mob/living/carbon/xenomorph/M)
Expand Down Expand Up @@ -114,6 +114,7 @@

. = ..()

/// Checks if all comms towers are connected and then starts end game content on all pylons if they are
/obj/effect/alien/resin/special/pylon/endgame/proc/comms_relay_connection()
for(var/obj/structure/machinery/telecomms/relay/preset/tower/mapcomms/checked_comms_relay in GLOB.all_static_telecomms_towers)
if(!checked_comms_relay.corrupted)
Expand All @@ -134,6 +135,7 @@
structure.activated = TRUE
addtimer(CALLBACK(structure, PROC_REF(give_larva)), XENO_PYLON_ACTIVATION_COOLDOWN, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_LOOP|TIMER_DELETE_ME)

/// Looped proc via timer to give larva after time
/obj/effect/alien/resin/special/pylon/endgame/proc/give_larva()
if(!activated)
return
Expand Down

0 comments on commit b1d0d1a

Please sign in to comment.