From c9f587010eb85acced555ef9be14fd8ccf5284ee Mon Sep 17 00:00:00 2001 From: Kyep <16434066+Kyep@users.noreply.github.com> Date: Sun, 7 Feb 2021 21:33:11 +0000 Subject: [PATCH] fix (#15467) Co-authored-by: Kyep --- code/modules/surgery/organs/parasites.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/surgery/organs/parasites.dm b/code/modules/surgery/organs/parasites.dm index b9afa20b7d2..84b2cf1695b 100644 --- a/code/modules/surgery/organs/parasites.dm +++ b/code/modules/surgery/organs/parasites.dm @@ -52,9 +52,13 @@ var/egg_progress = 0 // # of on_life() cycles completed, unlike cycle_num this is reset on each hatch event var/egg_progress_per_hatch = 90 // if egg_progress > this, chance to hatch and reset egg_progress var/eggs_hatched = 0 // num of hatch events completed - var/awaymission_checked = FALSE var/awaymission_infection = FALSE // TRUE if infection occurred inside gateway +/obj/item/organ/internal/body_egg/terror_eggs/Initialize(mapload) + . = ..() + var/turf/T = get_turf(src) + if(istype(T) && is_away_level(T.z)) + awaymission_infection = TRUE /obj/item/organ/internal/body_egg/terror_eggs/on_life() // Safety first. @@ -67,10 +71,6 @@ egg_progress += calc_variable_progress() // Detect & stop people attempting to bring a gateway white spider infection back to the main station. - if(!awaymission_checked) - awaymission_checked = TRUE - if(is_away_level(owner.z)) - awaymission_infection = TRUE if(awaymission_infection) var/turf/T = get_turf(owner) if(istype(T) && !is_away_level(T.z))