Makes robolimbs repair completely

Previously, because noncritical robolimbs did not count for bruteloss or burnloss (per line 13 in human_damage.dm), nothing would ever cause robot limbs to call update_wounds() on the organs to clear wounds after repair. Furthermore, update_wounds ignored wounds on robotic limbs and edited early without even checking if it should remove them. This caused a problem.

This corrects this, and still exits early(er) in update_wounds() for robotic limbs, but makes sure there are no 0-damage wounds left and if there are, removes them.

As a 'backup', hitting a robolimb with a welder when there's nothing to fix will also call this proc, to catch any cases where someone has directly changed wounds or anything like that.

Also fixes spacing on robolimb damage examine text (get_wound_desc had spaces, but should not have in most cases), and added a message for having an open maintenance panel on a limb.
This commit is contained in:
Arokha Sieyes
2016-05-18 01:14:41 -04:00
parent c8289fd465
commit 1749af51b2
2 changed files with 16 additions and 5 deletions
+15 -5
View File
@@ -349,6 +349,7 @@
//Sync the organ's damage with its wounds
src.update_damages()
src.update_wounds()
owner.updatehealth()
var/result = update_icon()
@@ -602,6 +603,9 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/update_wounds()
if((status & ORGAN_ROBOT)) //Robotic limbs don't heal or get worse.
for(var/datum/wound/W in wounds)
if(W.damage <= 0)
wounds -= W
return
for(var/datum/wound/W in wounds)
@@ -1129,17 +1133,23 @@ Note that amputating the affected organ does in fact remove the infection from t
if(brute_dam)
switch(brute_dam)
if(0 to 20)
. += " some dents"
. += "some dents"
if(21 to INFINITY)
. += pick(" a lot of dents"," severe denting")
. += pick("a lot of dents","severe denting")
if(brute_dam && burn_dam)
. += " and"
. += " and "
if(burn_dam)
switch(burn_dam)
if(0 to 20)
. += " some burns"
. += "some burns"
if(21 to INFINITY)
. += pick(" a lot of burns"," severe melting")
. += pick("a lot of burns","severe melting")
if(open)
if(brute_dam || burn_dam)
. += " and an open panel"
else
. += "an open panel"
return
var/list/wound_descriptors = list()