From 1b7acdb1471f8396b49236f64765209948b733b6 Mon Sep 17 00:00:00 2001 From: Boop Date: Wed, 18 Jun 2014 12:31:53 +0100 Subject: [PATCH 1/3] Fix runtime with brains and throwmode --- code/modules/mob/living/carbon/carbon.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 0e6d130a568..1fed0f18549 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -252,11 +252,13 @@ /mob/living/carbon/proc/throw_mode_off() src.in_throw_mode = 0 - src.throw_icon.icon_state = "act_throw_off" + if(src.throw_icon) //in case we don't have the HUD and we use the hotkey + src.throw_icon.icon_state = "act_throw_off" /mob/living/carbon/proc/throw_mode_on() src.in_throw_mode = 1 - src.throw_icon.icon_state = "act_throw_on" + if(src.throw_icon) + src.throw_icon.icon_state = "act_throw_on" /mob/proc/throw_item(atom/target) return From 5b1949fb12a9de74ae81674eaae8c401d8b23200 Mon Sep 17 00:00:00 2001 From: Boop Date: Wed, 18 Jun 2014 12:44:08 +0100 Subject: [PATCH 2/3] Fixes #5291 and another wound runtime --- code/modules/organs/organ_external.dm | 41 ++++++++++++++------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index acd9efcb659..c51d5167157 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -239,28 +239,31 @@ This function completely restores a damaged organ to perfect condition. for (var/datum/wound/W in wounds) if (W.can_worsen(type, damage)) compatible_wounds += W - - var/datum/wound/W = pick(compatible_wounds) - W.open_wound(damage) - if(prob(25)) - //maybe have a separate message for BRUISE type damage? - owner.visible_message("\red The wound on [owner.name]'s [display_name] widens with a nasty ripping voice.",\ - "\red The wound on your [display_name] widens with a nasty ripping voice.",\ - "You hear a nasty ripping noise, as if flesh is being torn apart.") - return + + if(compatible_wounds.len) + var/datum/wound/W = pick(compatible_wounds) + W.open_wound(damage) + if(prob(25)) + //maybe have a separate message for BRUISE type damage? + owner.visible_message("\red The wound on [owner.name]'s [display_name] widens with a nasty ripping voice.",\ + "\red The wound on your [display_name] widens with a nasty ripping voice.",\ + "You hear a nasty ripping noise, as if flesh is being torn apart.") + return //Creating wound var/wound_type = get_wound_type(type, damage) - var/datum/wound/W = new wound_type(damage) - //Check whether we can add the wound to an existing wound - for(var/datum/wound/other in wounds) - if(other.can_merge(W)) - other.merge_wound(W) - W = null // to signify that the wound was added - break - if(W) - wounds += W + if(wound_type) + var/datum/wound/W = new wound_type(damage) + + //Check whether we can add the wound to an existing wound + for(var/datum/wound/other in wounds) + if(other.can_merge(W)) + other.merge_wound(W) + W = null // to signify that the wound was added + break + if(W) + wounds += W /datum/organ/external/proc/get_wound_type(var/type = CUT, var/damage) //if you look a the names in the wound's stages list for each wound type you will see the logic behind these values @@ -279,7 +282,7 @@ This function completely restores a damaged organ to perfect condition. if (damage <= 15) return /datum/wound/burn/large if (damage <= 30) return /datum/wound/burn/severe if (damage <= 40) return /datum/wound/burn/deep - if (damage <= 50) return /datum/wound/burn/carbonised + return /datum/wound/burn/carbonised /**************************************************** PROCESSING & UPDATING From 4b7a8610b83b0b0416c4f7ce312bb5c60262f3ad Mon Sep 17 00:00:00 2001 From: Boop Date: Wed, 18 Jun 2014 13:32:10 +0100 Subject: [PATCH 3/3] Fix latex gloves box not having the right sprite --- code/game/objects/items/weapons/storage/boxes.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index c0f83006fd2..2d4969c0d19 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -48,6 +48,8 @@ /obj/item/weapon/storage/box/gloves name = "box of latex gloves" desc = "Contains white gloves." + icon_state = "latex" + New() ..() new /obj/item/clothing/gloves/latex(src)