From fa1d74e435af1c8ea7134074143a89278312bf41 Mon Sep 17 00:00:00 2001 From: Ater Ignis Date: Mon, 29 Oct 2012 15:04:30 +0400 Subject: [PATCH] added comments --- code/modules/mob/living/carbon/human/life.dm | 28 +++++++++++-------- .../mob/living/carbon/human/update_icons.dm | 4 ++- code/modules/mob/mob_defines.dm | 4 +-- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 7171da3e95d..b451399e5be 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -258,12 +258,12 @@ number_wounds += E.number_wounds var/leg_tally = 2 - var/canstand_l = 1 - var/canstand_r = 1 - var/hasleg_l = 1 - var/hasleg_r = 1 - var/hasarm_l = 1 - var/hasarm_r = 1 + var/canstand_l = 1 //Can stand on left leg + var/canstand_r = 1 //Can stand on right leg + var/hasleg_l = 1 //Have left leg + var/hasleg_r = 1 //Have right leg + var/hasarm_l = 1 //Have left arm + var/hasarm_r = 1 //Have right arm for(var/datum/organ/external/E in organs) E.process() if(E.status & ORGAN_ROBOT && prob(E.brute_dam + E.burn_dam)) @@ -312,6 +312,14 @@ if(!(E.status & ORGAN_SPLINTED)) leg_tally-- // let it fail even if just foot&leg + // standing is poor + if(leg_tally <= 0 && !paralysis && !(lying || resting) && prob(5)) + emote("scream") + emote("collapse") + paralysis = 10 + + + //Check arms and legs for existence var/datum/organ/external/E E = get_organ("l_leg") if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED)) @@ -334,12 +342,8 @@ if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED)) hasarm_r = 0 - // standing is poor - if(leg_tally <= 0 && !paralysis && !(lying || resting) && prob(5)) - emote("scream") - emote("collapse") - paralysis = 10 - + // Can stand if have at least one full leg (with leg and foot parts present) + // Has limbs to move around if at least one arm or leg is at least partially there can_stand = canstand_l||canstand_r has_limbs = hasleg_l||hasleg_r||hasarm_l||hasarm_r diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index a6654639206..018c802b179 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -246,6 +246,7 @@ proc/get_damage_icon_part(damage_state, body_part) lying_icon = new /icon('icons/mob/human.dmi', "body_[g]_l") individual_limbs = 0 + //remove destroyed limbs from base icon for(var/datum/organ/external/part in organs) if(!istype(part, /datum/organ/external/groin) \ && !istype(part, /datum/organ/external/chest) \ @@ -258,7 +259,7 @@ proc/get_damage_icon_part(damage_state, body_part) temp.MapColors(-1,0,0,0, 0,-1,0,0, 0,0,-1,0, 0,0,0,-1, 1,1,1,1) lying_icon.AddAlphaMask(temp) - // Draw each individual limb + // Draw each individual limb (AterIgnis: not sure why this is needed at all - base icon have all of these, but that was before me) if(!husk && individual_limbs) stand_icon.Blend(new /icon('icons/mob/human.dmi', "chest_[g]_s"), ICON_OVERLAY) lying_icon.Blend(new /icon('icons/mob/human.dmi', "chest_[g]_l"), ICON_OVERLAY) @@ -271,6 +272,7 @@ proc/get_damage_icon_part(damage_state, body_part) stand_icon.Blend(new /icon('human.dmi', "groin_[g]_s"), ICON_OVERLAY) lying_icon.Blend(new /icon('human.dmi', "groin_[g]_l"), ICON_OVERLAY) + // Draw nondestroyed robotic limbs grayscale for(var/datum/organ/external/part in organs) if(!istype(part, /datum/organ/external/groin) \ && !istype(part, /datum/organ/external/chest) \ diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 348ae438e6c..f28dc77e2e7 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -221,5 +221,5 @@ var/soghun_talk_understand = 0 var/skrell_talk_understand = 0 - var/has_limbs = 1 - var/can_stand = 1 + var/has_limbs = 1 //Whether this mob have any limbs he can move with + var/can_stand = 1 //Whether this mob have ability to stand