Merge branch 'master' of github.com:Baystation12/Baystation12 into dev

This commit is contained in:
Mloc-Argent
2013-11-14 12:03:59 +00:00
13 changed files with 82 additions and 105 deletions
+9 -34
View File
@@ -91,7 +91,7 @@
I.take_damage(rand(3,5))
//Special effects for limbs.
if(E.name in list("l_hand","l_arm","r_hand","r_arm"))
if(E.name in list("l_hand","l_arm","r_hand","r_arm") && (broken||malfunction))
var/obj/item/c_hand //Getting what's in this hand
if(E.name == "l_hand" || E.name == "l_arm")
c_hand = l_hand
@@ -99,8 +99,7 @@
c_hand = r_hand
if (c_hand)
if (broken||malfunction)
u_equip(c_hand)
u_equip(c_hand)
if(broken)
emote("me", 1, "screams in pain and drops what they were holding in their [E.display_name?"[E.display_name]":"[E]"]!")
@@ -124,35 +123,11 @@
paralysis = 10
//Check arms and legs for existence
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
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 = 2 //can stand on both legs
var/datum/organ/external/E = organs_by_name["l_foot"]
if(E.status & ORGAN_DESTROYED)
can_stand--
// 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
E = organs_by_name["r_foot"]
if(E.status & ORGAN_DESTROYED)
can_stand--
+3 -7
View File
@@ -203,7 +203,6 @@ This function completely restores a damaged organ to perfect condition.
implants -= implanted_object
owner.updatehealth()
update_icon()
/datum/organ/external/proc/createwound(var/type = CUT, var/damage)
@@ -290,7 +289,6 @@ This function completely restores a damaged organ to perfect condition.
perma_injury = 0
update_germs()
update_icon()
return
//Updating germ levels. Handles organ germ levels and necrosis.
@@ -383,6 +381,8 @@ This function completely restores a damaged organ to perfect condition.
// sync the organ's damage with its wounds
src.update_damages()
if (update_icon())
owner.UpdateDamageIcon(1)
//Updates brute_damn and burn_damn from wound damages. Updates BLEEDING status.
/datum/organ/external/proc/update_damages()
@@ -415,10 +415,6 @@ This function completely restores a damaged organ to perfect condition.
var/n_is = damage_state_text()
if (n_is != damage_state)
damage_state = n_is
if(status & ORGAN_DESTROYED)
owner.update_body(1)
else
owner.UpdateDamageIcon(1)
return 1
return 0
@@ -550,7 +546,7 @@ This function completely restores a damaged organ to perfect condition.
var/lol = pick(cardinal)
step(organ,lol)
owner.regenerate_icons()
owner.update_body(1)
/****************************************************