From ba370735ff04cc82b7919bf1d755f1b6669ab727 Mon Sep 17 00:00:00 2001 From: Mloc Date: Sun, 29 Jul 2012 18:34:12 +0100 Subject: [PATCH 1/2] NULL checks. Signed-off-by: Mloc --- code/game/machinery/adv_med.dm | 2 +- code/game/machinery/computer/cloning.dm | 3 ++- code/modules/mob/living/carbon/human/human.dm | 4 ++-- code/modules/mob/living/carbon/human/life.dm | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 22503193547..816feff98c6 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -290,7 +290,7 @@ AN = "[e.broken_description]:" if(e.open) open = "Open:" - if(e.implant && e.implant.len) + if(e.implant) imp = "Implanted:" if(!AN && !open && !infected & !imp) AN = "None" diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 49b762b3972..a4252c112f6 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -208,7 +208,8 @@ dat += "Back

" for(var/id in geneticsrecords) var/datum/data/record/R = geneticsrecords[id] - dat += "[R.fields["id"]]-[R.fields["name"]]
" + if(R) + dat += "[R.fields["id"]]-[R.fields["name"]]
" if(3) dat += "

Selected Record

" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 97680f72b6e..e9eef75bc6e 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -969,7 +969,7 @@ // Gloves var/datum/organ/external/lo = organs["l_hand"] var/datum/organ/external/ro = organs["r_hand"] - if (!(lo.status & ORGAN_DESTROYED && ro.status & ORGAN_DESTROYED)) + if (lo && ro && !(lo.status & ORGAN_DESTROYED && ro.status & ORGAN_DESTROYED)) if (gloves) var/t1 = gloves.item_state if (!t1) @@ -1419,7 +1419,7 @@ lying_icon.Blend(new /icon('human.dmi', "chest_[g]_l"), ICON_OVERLAY) var/datum/organ/external/head = organs["head"] - if(!(head.status & ORGAN_DESTROYED)) + if(head && !(head.status & ORGAN_DESTROYED)) stand_icon.Blend(new /icon('human.dmi', "head_[g]_s"), ICON_OVERLAY) lying_icon.Blend(new /icon('human.dmi', "head_[g]_l"), ICON_OVERLAY) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 2be48979c90..d3295eb7616 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -357,7 +357,7 @@ emote("gasp") updatehealth() - if(damage) + if(damage && organs.len) var/V = pick(organs) var/datum/organ/external/O = organs[V] if(istype(O)) O.add_wound("Radiation Poisoning", damage) From 687b86ce1b656e1774c1ff82cd6fbe67428c9b14 Mon Sep 17 00:00:00 2001 From: Mloc Date: Sun, 29 Jul 2012 19:35:34 +0200 Subject: [PATCH 2/2] Update baystation12.dme --- baystation12.dme | 1 + 1 file changed, 1 insertion(+) diff --git a/baystation12.dme b/baystation12.dme index ba6a1f7196d..f5a901ed619 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -228,6 +228,7 @@ #define DEBUG // END_PREFERENCES // BEGIN_INCLUDE +#include "code\modules\mob\simple_animal\munchkin.dm" #include "code\access_defines.dm" #include "code\names.dm" #include "code\setup.dm"