diff --git a/code/__DEFINES/xeno.dm b/code/__DEFINES/xeno.dm index e9eb4ca4c1ed..5907bb51f487 100644 --- a/code/__DEFINES/xeno.dm +++ b/code/__DEFINES/xeno.dm @@ -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 (90 MINUTES) +#define XENO_COMM_ACQUISITION_TIME (0 MINUTES) //RETURN TO 90 MINUTES BEFORE TM - MORROW /// The time it takes for a pylon to give one larva while activated -#define XENO_PYLON_ACTIVATION_COOLDOWN (5 MINUTES) +#define XENO_PYLON_ACTIVATION_COOLDOWN (30 SECONDS) //RETURN TO 5 MINUTES BEFORE TM - MORROW /// The time against away_timer when an AFK xeno larva can be replaced #define XENO_LEAVE_TIMER_LARVA 80 //80 seconds diff --git a/code/game/machinery/telecomms/presets.dm b/code/game/machinery/telecomms/presets.dm index 597d5ae6afd3..d22dcc3aa5e3 100644 --- a/code/game/machinery/telecomms/presets.dm +++ b/code/game/machinery/telecomms/presets.dm @@ -211,7 +211,11 @@ GLOBAL_LIST_EMPTY(all_static_telecomms_towers) bound_width = 64 freq_listening = list(COLONY_FREQ) var/toggle_cooldown = 0 + + /// Tower has been taken over by xenos, is not usable var/corrupted = FALSE + + /// Held image for the current overlay on the tower from xeno corruption var/image/corruption_image = null /obj/structure/machinery/telecomms/relay/preset/tower/mapcomms/Initialize() @@ -307,7 +311,7 @@ GLOBAL_LIST_EMPTY(all_static_telecomms_towers) if(!weeded_turf.weeds.parent) return - if(!istypestrict(weeded_turf.weeds.parent, /obj/effect/alien/weeds/node/pylon/cluster)) + if(!istype(weeded_turf.weeds.parent, /obj/effect/alien/weeds/node/pylon/cluster)) return if(ROUND_TIME < XENO_COMM_ACQUISITION_TIME) @@ -326,7 +330,7 @@ GLOBAL_LIST_EMPTY(all_static_telecomms_towers) qdel(cluster_parent) - var/obj/effect/alien/resin/special/pylon/new_pylon = new(cluster_loc, linked_hive) + var/obj/effect/alien/resin/special/pylon/endgame/new_pylon = new(cluster_loc, linked_hive) new_pylon.node.children = held_children_weeds for(var/obj/effect/alien/weeds/weed in new_pylon.node.children) @@ -336,10 +340,10 @@ GLOBAL_LIST_EMPTY(all_static_telecomms_towers) corrupted = TRUE - corruption_image = image(icon, icon_state = "resin_growing") //seems to start at the end of the loop for some reason?, figure out why before merge - Morrow + corruption_image = image(icon, icon_state = "resin_growing") - flick_overlay(src, corruption_image, (4 SECONDS)) - addtimer(CALLBACK(src, PROC_REF(switch_to_idle_corruption)), (4 SECONDS)) + flick_overlay(src, corruption_image, (2 SECONDS)) + addtimer(CALLBACK(src, PROC_REF(switch_to_idle_corruption)), (2 SECONDS)) new_pylon.comms_relay_connection() diff --git a/code/modules/cm_aliens/structures/special/pylon_core.dm b/code/modules/cm_aliens/structures/special/pylon_core.dm index 97b7762b527a..65336d42f746 100644 --- a/code/modules/cm_aliens/structures/special/pylon_core.dm +++ b/code/modules/cm_aliens/structures/special/pylon_core.dm @@ -18,8 +18,6 @@ var/damaged = FALSE var/plasma_stored = 0 var/plasma_required_to_repair = 1000 - var/activated = FALSE - COOLDOWN_DECLARE(larva_given_time) var/protection_level = TURF_PROTECTION_CAS @@ -39,23 +37,6 @@ if(node) qdel(node) - - if(activated) - if(XENO_STRUCTURE_PYLON in linked_hive.hive_structures) - for(var/obj/effect/alien/resin/special/pylon/pylon as anything in linked_hive.hive_structures[XENO_STRUCTURE_PYLON]) - pylon.activated = FALSE - - marine_announcement("ALERT.\n\nEnergy build up around communication relays halted.", "[MAIN_AI_SYSTEM] Biological Scanner") // Ask lore team for a better AI system name, honestly a second look for these announcements may be good - Morrow - for(var/hivenumber in GLOB.hive_datum) - var/datum/hive_status/checked_hive = GLOB.hive_datum[hivenumber] - if(!length(checked_hive.totalXenos)) - continue - - if(checked_hive == linked_hive) - xeno_announcement(SPAN_XENOANNOUNCE("We have lost our control of the tall's communication relays."), hivenumber, XENO_GENERAL_ANNOUNCE) - else - xeno_announcement(SPAN_XENOANNOUNCE("Another hive has lost control of the tall's communication relays."), hivenumber, XENO_GENERAL_ANNOUNCE) - . = ..() /obj/effect/alien/resin/special/pylon/attack_alien(mob/living/carbon/xenomorph/M) @@ -106,20 +87,37 @@ playsound(loc, "alien_resin_build", 25) /obj/effect/alien/resin/special/pylon/proc/place_node() - var/obj/effect/alien/weeds/node/pylon/W = new node_type(loc, null, null, linked_hive) - W.resin_parent = src - return W + var/obj/effect/alien/weeds/node/pylon/pylon_node = new node_type(loc, null, null, linked_hive) + pylon_node.resin_parent = src + return pylon_node -/obj/effect/alien/resin/special/pylon/proc/comms_relay_connection() - var/check = TRUE +/obj/effect/alien/resin/special/pylon/endgame + cover_range = WEED_RANGE_CORE + var/activated = FALSE +/obj/effect/alien/resin/special/pylon/endgame/Destroy() + if(activated) + if(XENO_STRUCTURE_PYLON in linked_hive.hive_structures) + for(var/obj/effect/alien/resin/special/pylon/endgame/pylon as anything in linked_hive.hive_structures[XENO_STRUCTURE_PYLON]) + pylon.activated = FALSE + + marine_announcement("ALERT.\n\nEnergy build up around communication relays halted.", "[MAIN_AI_SYSTEM] Biological Scanner") // Ask lore team for a better AI system name, honestly a second look for these announcements may be good - Morrow + for(var/hivenumber in GLOB.hive_datum) + var/datum/hive_status/checked_hive = GLOB.hive_datum[hivenumber] + if(!length(checked_hive.totalXenos)) + continue + + if(checked_hive == linked_hive) + xeno_announcement(SPAN_XENOANNOUNCE("We have lost our control of the tall's communication relays."), hivenumber, XENO_GENERAL_ANNOUNCE) + else + xeno_announcement(SPAN_XENOANNOUNCE("Another hive has lost control of the tall's communication relays."), hivenumber, XENO_GENERAL_ANNOUNCE) + + . = ..() + +/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) - check = FALSE - break - - if(!check) - return FALSE + return marine_announcement("ALERT.\n\nIrregular build up of energy around communication relays.", "[MAIN_AI_SYSTEM] Biological Scanner") // Ask lore team for a better AI system name, honestly a second look for these announcements may be good - Morrow for(var/hivenumber in GLOB.hive_datum) @@ -132,25 +130,19 @@ else xeno_announcement(SPAN_XENOANNOUNCE("Another hive has harnessed the tall's communication relays.[linked_hive.faction_is_ally(checked_hive.name) ? "" : " Stop them!"]"), hivenumber, XENO_GENERAL_ANNOUNCE) - for(var/obj/effect/alien/resin/special/pylon/structure as anything in linked_hive.hive_structures[XENO_STRUCTURE_PYLON]) + for(var/obj/effect/alien/resin/special/pylon/endgame/structure in linked_hive.hive_structures[XENO_STRUCTURE_PYLON]) structure.activated = TRUE - addtimer(CALLBACK(structure, PROC_REF(give_larva)), XENO_PYLON_ACTIVATION_COOLDOWN) + addtimer(CALLBACK(structure, PROC_REF(give_larva)), XENO_PYLON_ACTIVATION_COOLDOWN, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_LOOP|TIMER_DELETE_ME) -/obj/effect/alien/resin/special/pylon/proc/give_larva() +/obj/effect/alien/resin/special/pylon/endgame/proc/give_larva() if(!activated) return - if(!COOLDOWN_FINISHED(src, larva_given_time)) //Somehow out of sync or doubled timers so we kill this "recursion" - return - - if(!linked_hive.hive_location || !linked_hive.living_xeno_queen) //without a queen and a hive core we do not give larva but we don't deactivate either - addtimer(CALLBACK(src, PROC_REF(give_larva)), XENO_PYLON_ACTIVATION_COOLDOWN) + if(!linked_hive.hive_location || !linked_hive.living_xeno_queen) return linked_hive.stored_larva++ linked_hive.hive_ui.update_burrowed_larva() - COOLDOWN_START(src, larva_given_time, (XENO_PYLON_ACTIVATION_COOLDOWN - 1)) //Hypothetically stops any stacked timers, there is probably a better way to do this but I'm having a brain fart, ask Harry - Morrow - addtimer(CALLBACK(src, PROC_REF(give_larva)), XENO_PYLON_ACTIVATION_COOLDOWN) //Hive Core - Generates strong weeds, supports other buildings /obj/effect/alien/resin/special/pylon/core diff --git a/code/modules/cm_aliens/weeds.dm b/code/modules/cm_aliens/weeds.dm index 07dec0406e17..01140beae304 100644 --- a/code/modules/cm_aliens/weeds.dm +++ b/code/modules/cm_aliens/weeds.dm @@ -55,7 +55,7 @@ linked_hive = GLOB.hive_datum[hivenumber] set_hive_data(src, hivenumber) - if(spread_on_semiweedable) + if(spread_on_semiweedable && weed_strength < WEED_LEVEL_HIVE) if(color) var/list/RGB = ReadRGB(color) RGB[1] = Clamp(RGB[1] + 35, 0, 255) @@ -588,6 +588,7 @@ weed_strength = WEED_LEVEL_HIVE node_range = WEED_RANGE_PYLON overlay_node = FALSE + spread_on_semiweedable = TRUE var/obj/effect/alien/resin/special/resin_parent /obj/effect/alien/weeds/node/pylon/proc/set_parent_damaged() @@ -619,6 +620,9 @@ /obj/effect/alien/weeds/node/pylon/acid_spray_act() return +/obj/effect/alien/weeds/node/pylon/cluster + spread_on_semiweedable = FALSE + /obj/effect/alien/weeds/node/pylon/cluster/set_parent_damaged() if(!resin_parent) return diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index c8e8b1eb82c9..ab5028b12844 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -316,7 +316,7 @@ XENO_STRUCTURE_EGGMORPH = 6, XENO_STRUCTURE_EVOPOD = 2, XENO_STRUCTURE_RECOVERY = 6, - XENO_STRUCTURE_PYLON = 10, + XENO_STRUCTURE_PYLON = 2, ) var/global/list/hive_structure_types = list(