mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
@@ -258,6 +258,12 @@
|
||||
number_wounds += E.number_wounds
|
||||
|
||||
var/leg_tally = 2
|
||||
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))
|
||||
@@ -305,6 +311,7 @@
|
||||
|| E.name == "r_leg" || E.name == "r_foot" && !lying)
|
||||
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")
|
||||
@@ -312,6 +319,35 @@
|
||||
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))
|
||||
canstand_l = 0
|
||||
hasleg_l = 0
|
||||
E = get_organ("r_leg")
|
||||
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
|
||||
canstand_r = 0
|
||||
hasleg_r = 0
|
||||
E = get_organ("l_foot")
|
||||
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
|
||||
canstand_l = 0
|
||||
E = get_organ("r_foot")
|
||||
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
|
||||
canstand_r = 0
|
||||
E = get_organ("l_arm")
|
||||
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
|
||||
hasarm_l = 0
|
||||
E = get_organ("r_arm")
|
||||
if(E.status & ORGAN_DESTROYED && !(E.status & ORGAN_SPLINTED))
|
||||
hasarm_r = 0
|
||||
|
||||
// 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
|
||||
|
||||
|
||||
proc/handle_mutations_and_radiation()
|
||||
if(getFireLoss())
|
||||
if((COLD_RESISTANCE in mutations) || (prob(1)))
|
||||
@@ -320,25 +356,50 @@
|
||||
// Make nanoregen heal youu, -3 all damage types
|
||||
if(NANOREGEN in augmentations)
|
||||
var/healed = 0
|
||||
if(getToxLoss())
|
||||
adjustToxLoss(-3)
|
||||
healed = 1
|
||||
if(getOxyLoss())
|
||||
adjustOxyLoss(-3)
|
||||
healed = 1
|
||||
if(getCloneLoss())
|
||||
adjustCloneLoss(-3)
|
||||
healed = 1
|
||||
if(getBruteLoss())
|
||||
heal_organ_damage(3,0)
|
||||
healed = 1
|
||||
if(getFireLoss())
|
||||
heal_organ_damage(0,3)
|
||||
healed = 1
|
||||
if(halloss > 0)
|
||||
halloss -= 3
|
||||
if(halloss < 0) halloss = 0
|
||||
healed = 1
|
||||
var/hptoreg = 3
|
||||
if(stat==UNCONSCIOUS) hptoreg=1
|
||||
if(stat==DEAD) hptoreg=0
|
||||
for(var/i=0; i<hptoreg; i++)
|
||||
var/list/damages
|
||||
if(getToxLoss())
|
||||
damages+="tox"
|
||||
if(getOxyLoss())
|
||||
damages+="oxy"
|
||||
if(getCloneLoss())
|
||||
damages+="clone"
|
||||
if(getBruteLoss())
|
||||
damages+="brute"
|
||||
if(getFireLoss())
|
||||
damages+="burn"
|
||||
if(halloss != 0)
|
||||
damages+="hal"
|
||||
|
||||
if(damages.len)
|
||||
switch(pick(damages))
|
||||
if("tox")
|
||||
adjustToxLoss(-1)
|
||||
healed = 1
|
||||
if("oxy")
|
||||
adjustOxyLoss(-1)
|
||||
healed = 1
|
||||
if("clone")
|
||||
adjustCloneLoss(-1)
|
||||
healed = 1
|
||||
if("brute")
|
||||
heal_organ_damage(1,0)
|
||||
healed = 1
|
||||
if("burn")
|
||||
heal_organ_damage(0,1)
|
||||
healed = 1
|
||||
if("hal")
|
||||
if(halloss > 0)
|
||||
halloss -= 1
|
||||
if(halloss < 0)
|
||||
halloss = 0
|
||||
healed = 1
|
||||
else
|
||||
break
|
||||
|
||||
if(healed)
|
||||
if(prob(5))
|
||||
src << "\blue You feel your wounds mending..."
|
||||
|
||||
@@ -246,8 +246,21 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
lying_icon = new /icon('icons/mob/human.dmi', "body_[g]_l")
|
||||
individual_limbs = 0
|
||||
|
||||
// Draw each individual limb
|
||||
if(individual_limbs)
|
||||
//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) \
|
||||
&& (part.status & ORGAN_DESTROYED))
|
||||
var/icon/temp = new /icon('dam_mask.dmi', "[part.icon_name]")
|
||||
temp.MapColors(-1,0,0,0, 0,-1,0,0, 0,0,-1,0, 0,0,0,-1, 1,1,1,1)
|
||||
stand_icon.AddAlphaMask(temp)
|
||||
|
||||
temp = new /icon('dam_mask.dmi', "[part.icon_name]2")
|
||||
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 (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)
|
||||
|
||||
@@ -256,35 +269,24 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
stand_icon.Blend(new /icon('icons/mob/human.dmi', "head_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('icons/mob/human.dmi', "head_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
for(var/datum/organ/external/part in organs)
|
||||
if(!istype(part, /datum/organ/external/groin) \
|
||||
&& !istype(part, /datum/organ/external/chest) \
|
||||
&& !istype(part, /datum/organ/external/head) \
|
||||
&& !(part.status & ORGAN_DESTROYED))
|
||||
var/icon/temp = new /icon('human.dmi', "[part.icon_name]_s")
|
||||
if(part.status & ORGAN_ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
stand_icon.Blend(temp, ICON_OVERLAY)
|
||||
temp = new /icon('human.dmi', "[part.icon_name]_l")
|
||||
if(part.status & ORGAN_ROBOT) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
lying_icon.Blend(temp , ICON_OVERLAY)
|
||||
|
||||
stand_icon.Blend(new /icon('human.dmi', "groin_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "groin_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
if (husk)
|
||||
var/icon/husk_s = new /icon('human.dmi', "husk_s")
|
||||
var/icon/husk_l = new /icon('human.dmi', "husk_l")
|
||||
// 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) \
|
||||
&& !istype(part, /datum/organ/external/head) \
|
||||
&& !(part.status & ORGAN_DESTROYED))
|
||||
var/icon/temp = new /icon('human.dmi', "[part.icon_name]_s")
|
||||
if(part.status & ORGAN_ROBOT)
|
||||
temp.MapColors(rgb(77,77,77,0), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
stand_icon.Blend(temp, ICON_OVERLAY)
|
||||
|
||||
for(var/datum/organ/external/part in organs)
|
||||
if(!istype(part, /datum/organ/external/groin) \
|
||||
&& !istype(part, /datum/organ/external/chest) \
|
||||
&& !istype(part, /datum/organ/external/head) \
|
||||
&& (part.status & ORGAN_DESTROYED))
|
||||
husk_s.Blend(new /icon('dam_mask.dmi', "[part.icon_name]"), ICON_SUBTRACT)
|
||||
husk_l.Blend(new /icon('dam_mask.dmi', "[part.icon_name]2"), ICON_SUBTRACT)
|
||||
|
||||
stand_icon.Blend(husk_s, ICON_OVERLAY)
|
||||
lying_icon.Blend(husk_l, ICON_OVERLAY)
|
||||
temp = new /icon('human.dmi', "[part.icon_name]_l")
|
||||
if(part.status & ORGAN_ROBOT)
|
||||
temp.MapColors(rgb(77,77,77,0), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
lying_icon.Blend(temp, ICON_OVERLAY)
|
||||
|
||||
//Skin tone
|
||||
if(!skeleton)
|
||||
|
||||
@@ -761,15 +761,15 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
lying = 0
|
||||
else
|
||||
lying = 1
|
||||
else if( stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH) )
|
||||
else if( stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH))
|
||||
lying = 1
|
||||
canmove = 0
|
||||
else if( stunned )
|
||||
// lying = 0
|
||||
canmove = 0
|
||||
else
|
||||
lying = 0
|
||||
canmove = 1
|
||||
lying = !can_stand
|
||||
canmove = has_limbs
|
||||
|
||||
if(lying)
|
||||
density = 0
|
||||
|
||||
@@ -220,3 +220,6 @@
|
||||
var/tajaran_talk_understand = 0
|
||||
var/soghun_talk_understand = 0
|
||||
var/skrell_talk_understand = 0
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user