Merge pull request #1546 from Mloc/dev

Null checks, fixed cael's derp.
This commit is contained in:
CIB
2012-07-29 13:18:43 -07:00
5 changed files with 7 additions and 5 deletions
+1
View File
@@ -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"
+1 -1
View File
@@ -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"
+2 -1
View File
@@ -208,7 +208,8 @@
dat += "<a href='byond://?src=\ref[src];menu=1'>Back</a><br><br>"
for(var/id in geneticsrecords)
var/datum/data/record/R = geneticsrecords[id]
dat += "<a href='byond://?src=\ref[src];view_rec=[id]'>[R.fields["id"]]-[R.fields["name"]]</a><br>"
if(R)
dat += "<a href='byond://?src=\ref[src];view_rec=[id]'>[R.fields["id"]]-[R.fields["name"]]</a><br>"
if(3)
dat += "<h4>Selected Record</h4>"
@@ -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)
+1 -1
View File
@@ -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)