From 0162d9f86b0d0ba66f3935e9211f9f1700fe46e9 Mon Sep 17 00:00:00 2001 From: Crazylemon Date: Thu, 17 Dec 2015 05:38:18 -0800 Subject: [PATCH] Added sanity checks to cloner autoprocess, scanning, and growing --- code/game/machinery/cloning.dm | 2 +- code/game/machinery/computer/cloning.dm | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 08aff0a1fad..f345ddad90f 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -187,7 +187,7 @@ //Start growing a human clone in the pod! /obj/machinery/clonepod/proc/growclone(var/datum/dna2/record/R) - if(mess || attempting || panel_open) + if(mess || attempting || panel_open || stat & (NOPOWER|BROKEN)) return 0 var/datum/mind/clonemind = locate(R.mind) if(!istype(clonemind)) //not a mind diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 4873fd9ca80..a04ecb252b0 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -28,7 +28,7 @@ return ..() /obj/machinery/computer/cloning/process() - if(!scanner || !pods.len || !autoprocess) + if(!scanner || !pods.len || !autoprocess || stat & NOPOWER) return if(scanner.occupant && (scanner.scan_level > 2)) @@ -341,6 +341,10 @@ return /obj/machinery/computer/cloning/proc/scan_mob(mob/living/carbon/human/subject as mob) + if (stat & NOPOWER) + return + if (scanner.stat & (NOPOWER|BROKEN)) + return if ((isnull(subject)) || (!(ishuman(subject))) || (!subject.dna) || (subject.species.flags & NO_SCAN)) scantemp = "Error: Unable to locate valid genetic data." nanomanager.update_uis(src)