Adds the ability to apply pressure to bleeding wounds

This commit is contained in:
Yoshax
2016-09-21 22:16:20 +01:00
parent 34cc19cf1e
commit 653610e194
7 changed files with 95 additions and 17 deletions
+12 -2
View File
@@ -128,8 +128,18 @@ var/const/BLOOD_VOLUME_SURVIVE = 40
for(var/obj/item/organ/external/temp in organs)
if(!(temp.status & ORGAN_BLEEDING) || (temp.robotic >= ORGAN_ROBOT))
continue
for(var/datum/wound/W in temp.wounds) if(W.bleeding())
blood_max += W.damage / 30
for(var/datum/wound/W in temp.wounds)
if(W.bleeding())
if(temp.applied_pressure)
if(ishuman(temp.applied_pressure))
var/mob/living/carbon/human/H = temp.applied_pressure
H.bloody_hands(src, 0)
//somehow you can apply pressure to every wound on the organ at the same time
//you're basically forced to do nothing at all, so let's make it pretty effective
var/min_eff_damage = max(0, W.damage - 10) / 6 //still want a little bit to drip out, for effect
blood_max += max(min_eff_damage, W.damage - 30) / 30
else
blood_max += W.damage / 30
if (temp.open)
blood_max += 2 //Yer stomach is cut open
drip(blood_max)
+19 -5
View File
@@ -38,6 +38,7 @@
var/list/s_col // skin colour
var/list/h_col // hair colour
var/body_hair // Icon blend for body hair if any.
var/mob/living/applied_pressure
// Wound and structural data.
var/wound_update_accuracy = 1 // how often wounds should be updated, a higher number means less often
@@ -1028,6 +1029,8 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/apply_splint(var/atom/movable/splint)
if(!splinted)
splinted = splint
if(!applied_pressure)
applied_pressure = splint
return 1
return 0
@@ -1035,6 +1038,8 @@ Note that amputating the affected organ does in fact remove the infection from t
if(splinted)
if(splinted.loc == src)
splinted.dropInto(owner? owner.loc : src.loc)
if(applied_pressure == splinted)
applied_pressure = null
splinted = null
return 1
return 0
@@ -1244,11 +1249,20 @@ Note that amputating the affected organ does in fact remove the infection from t
for(var/datum/wound/W in wounds)
if(W.internal && !open) continue // can't see internal wounds
var/this_wound_desc = W.desc
if(W.damage_type == BURN && W.salved) this_wound_desc = "salved [this_wound_desc]"
if(W.bleeding()) this_wound_desc = "bleeding [this_wound_desc]"
else if(W.bandaged) this_wound_desc = "bandaged [this_wound_desc]"
if(W.germ_level > 600) this_wound_desc = "badly infected [this_wound_desc]"
else if(W.germ_level > 330) this_wound_desc = "lightly infected [this_wound_desc]"
if(W.damage_type == BURN && W.salved)
this_wound_desc = "salved [this_wound_desc]"
if(W.bleeding())
this_wound_desc = "bleeding [this_wound_desc]"
else if(W.bandaged)
this_wound_desc = "bandaged [this_wound_desc]"
if(W.germ_level > 600)
this_wound_desc = "badly infected [this_wound_desc]"
else if(W.germ_level > 330)
this_wound_desc = "lightly infected [this_wound_desc]"
if(wound_descriptors[this_wound_desc])
wound_descriptors[this_wound_desc] += W.amount
else