Co-authored-by: Kyep <Kyep@users.noreply.github.com>
This commit is contained in:
Kyep
2021-02-07 21:33:11 +00:00
committed by GitHub
parent 66d987691c
commit c9f587010e
+5 -5
View File
@@ -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))