From 6cdb39af6d30b287b4ee85a3174262cf32fb7e0b Mon Sep 17 00:00:00 2001 From: Drulikar Date: Mon, 4 Nov 2024 00:12:20 -0600 Subject: [PATCH] Eggmorpher cooldown reduction if on ovi --- .../cm_aliens/structures/special/egg_morpher.dm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/code/modules/cm_aliens/structures/special/egg_morpher.dm b/code/modules/cm_aliens/structures/special/egg_morpher.dm index abed439db582..e0691b0d4d28 100644 --- a/code/modules/cm_aliens/structures/special/egg_morpher.dm +++ b/code/modules/cm_aliens/structures/special/egg_morpher.dm @@ -21,12 +21,14 @@ var/datum/shape/range_bounds ///How long it takes to generate one facehugger. var/spawn_cooldown_length = 120 SECONDS + ///How long it takes to generate one facehugger if queen is on ovi. + var/spawn_cooldown_length_ovi = 60 SECONDS COOLDOWN_DECLARE(spawn_cooldown) /obj/effect/alien/resin/special/eggmorph/Initialize(mapload, hive_ref) . = ..() - COOLDOWN_START(src, spawn_cooldown, spawn_cooldown_length) + COOLDOWN_START(src, spawn_cooldown, get_egg_cooldown()) range_bounds = SQUARE(x, y, EGGMORPG_RANGE) /obj/effect/alien/resin/special/eggmorph/Destroy() @@ -107,7 +109,7 @@ if(!linked_hive || !COOLDOWN_FINISHED(src, spawn_cooldown) || stored_huggers == huggers_to_grow_max) return - COOLDOWN_START(src, spawn_cooldown, spawn_cooldown_length) + COOLDOWN_START(src, spawn_cooldown, get_egg_cooldown()) if(stored_huggers < huggers_to_grow_max) stored_huggers = min(huggers_to_grow_max, stored_huggers + 1) @@ -148,7 +150,7 @@ if(stored_huggers) //this way another hugger doesn't immediately spawn after we pick one up if(stored_huggers == huggers_to_grow_max) - COOLDOWN_START(src, spawn_cooldown, spawn_cooldown_length) + COOLDOWN_START(src, spawn_cooldown, get_egg_cooldown()) to_chat(M, SPAN_XENONOTICE("You retrieve a child.")) stored_huggers = max(0, stored_huggers - 1) @@ -161,6 +163,11 @@ . = ..() //Do a view printout as needed just in case the observer doesn't want to join as a Hugger but wants info join_as_facehugger_from_this(user) +/obj/effect/alien/resin/special/eggmorph/proc/get_egg_cooldown() + if(linked_hive?.living_xeno_queen?.ovipositor) + return spawn_cooldown_length_ovi + return spawn_cooldown_length + /obj/effect/alien/resin/special/eggmorph/proc/join_as_facehugger_from_this(mob/dead/observer/user) if(stored_huggers <= huggers_reserved) to_chat(user, SPAN_WARNING("\The [src] doesn't have any facehuggers to inhabit."))