From e4907537b5d9d1d0c0048a2f80ba6d56a9dc52ca Mon Sep 17 00:00:00 2001 From: "rastaf.zero@gmail.com" Date: Tue, 29 Mar 2011 17:00:42 +0000 Subject: [PATCH] Fixed runtime errors in cryo and mining. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1308 316c924e-a436-60f5-8080-3fe189b3f50e --- code/WorkInProgress/mining.dm | 8 ++++---- code/game/machinery/cryo.dm | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/code/WorkInProgress/mining.dm b/code/WorkInProgress/mining.dm index 02d6eb06deb..97df3ae6bb0 100644 --- a/code/WorkInProgress/mining.dm +++ b/code/WorkInProgress/mining.dm @@ -2584,7 +2584,7 @@ var/list/datum/material_recipe/MATERIAL_RECIPES = list( origin_tech = "materials=4" perunit = 2000 -/obj/item/stack/sheet/gold/New() +/obj/item/stack/sheet/gold/New(loc,amount) ..() pixel_x = rand(0,4)-4 pixel_y = rand(0,4)-4 @@ -2600,7 +2600,7 @@ var/list/datum/material_recipe/MATERIAL_RECIPES = list( origin_tech = "materials=3" perunit = 2000 -/obj/item/stack/sheet/silver/New() +/obj/item/stack/sheet/silver/New(loc,amount) ..() pixel_x = rand(0,4)-4 pixel_y = rand(0,4)-4 @@ -2615,7 +2615,7 @@ var/list/datum/material_recipe/MATERIAL_RECIPES = list( origin_tech = "materials=6" perunit = 1000 -/obj/item/stack/sheet/diamond/New() +/obj/item/stack/sheet/diamond/New(loc,amount) ..() pixel_x = rand(0,4)-4 pixel_y = rand(0,4)-4 @@ -2664,7 +2664,7 @@ var/list/datum/material_recipe/MATERIAL_RECIPES = list( origin_tech = "materials=4" perunit = 2000 -/obj/item/stack/sheet/clown/New() +/obj/item/stack/sheet/clown/New(loc,amount) ..() pixel_x = rand(0,4)-4 pixel_y = rand(0,4)-4 diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 9b72ab06268..770e24bd754 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -170,7 +170,9 @@ //severe damage should heal waaay slower without proper chemicals if(occupant.bodytemperature < 225) occupant.toxloss = max(0, occupant.toxloss - min(1, 20/occupant.toxloss)) - occupant.heal_organ_damage(min(1, 20/occupant.bruteloss),min(1, 20/occupant.fireloss)) + var/heal_brute = occupant.bruteloss ? min(1, 20/occupant.bruteloss) : 0 + var/heal_fire = occupant.fireloss ? min(1, 20/occupant.fireloss) : 0 + occupant.heal_organ_damage(heal_brute,heal_fire) if(beaker && (next_trans == 0)) beaker:reagents.trans_to(occupant, 1, 10) beaker:reagents.reaction(occupant)