mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
WIP bloodloss and scaring system.
This commit is contained in:
@@ -308,13 +308,24 @@ proc/analyze_health_less_info(mob/living/carbon/M as mob, mob/user as mob)
|
||||
user.show_message(text("\red Significant brain damage detected. Subject may have had a concussion."), 1)
|
||||
if (M.virus2 || M.reagents.reagent_list.len > 0)
|
||||
user.show_message(text("\red Unknown substance detected in blood."), 1)
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
for(var/name in H.organs)
|
||||
var/datum/organ/external/e = H.organs[name]
|
||||
if(e.broken)
|
||||
user.show_message(text("\red Bone fractures detected. Advanced scanner required for location."), 1)
|
||||
break
|
||||
if(ishuman(M))
|
||||
if(M:vessel)
|
||||
var/blood_volume = round(M:vessel.get_reagent_amount("blood"))
|
||||
var/blood_percent = blood_volume / 560
|
||||
blood_percent *= 100
|
||||
if(blood_volume <= 448)
|
||||
user.show_message("\red <b>Warning: Blood Level LOW: [blood_percent]% [blood_volume]cl")
|
||||
else if(blood_volume <= 336)
|
||||
user.show_message("\red <b>Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl")
|
||||
else
|
||||
user.show_message("\blue Blood Level Normal: [blood_percent]% [blood_volume]cl")
|
||||
return
|
||||
|
||||
/obj/item/device/healthanalyzer/attack(mob/M as mob, mob/user as mob)
|
||||
|
||||
@@ -15,7 +15,35 @@ MEDICAL
|
||||
t_him = "her"
|
||||
user << "\red \The [M] is dead, you cannot help [t_him]!"
|
||||
return
|
||||
if (M.health < 50)
|
||||
|
||||
var/stoppedblood = 0
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/external/affecting = H.get_organ("chest")
|
||||
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/user2 = user
|
||||
affecting = H.get_organ(check_zone(user2.zone_sel.selecting))
|
||||
else
|
||||
if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0)
|
||||
affecting = H.get_organ("head")
|
||||
|
||||
if(H.bloodloss > 0 && heal_brute > 0) // fix wounds too if bruise pack
|
||||
for(var/datum/organ/wound/W in affecting.wounds)
|
||||
if(W.bleeding)
|
||||
if(stoppedblood)
|
||||
stoppedblood = 2
|
||||
break
|
||||
W.stopbleeding()
|
||||
stoppedblood = 1
|
||||
|
||||
if (user)
|
||||
if (M != user)
|
||||
H.visible_message("\red [user] patches [stoppedblood - 1 ? "some of" : "the last of"] [H]'s wounds with [src]", "\red You patch up [stoppedblood - 1 ? "some of" : "the last of"] [H]'s wounds", "\red You hear something like gauze being ripped.")
|
||||
else
|
||||
H.visible_message("\red [user] patches [stoppedblood - 1 ? "some of" : "the last of"] their own wounds with [src]", "\red You patch up [stoppedblood - 1 ? "some of" : "the last of"] your wounds", "\red You hear something like gauze being ripped.")
|
||||
|
||||
if (M.health < 50 && !stoppedblood)
|
||||
var/t_him = "it"
|
||||
if (M.gender == MALE)
|
||||
t_him = "him"
|
||||
@@ -66,36 +94,14 @@ MEDICAL
|
||||
|
||||
if (affecting.heal_damage(src.heal_brute, src.heal_burn))
|
||||
H.UpdateDamageIcon()
|
||||
|
||||
if(H.bloodloss > 0 && heal_brute > 0) // fix wounds too if bruise pack
|
||||
var/stoped = 0
|
||||
for(var/datum/organ/external/wound/W in affecting.wounds)
|
||||
if(W.bleeding)
|
||||
W.stopbleeding()
|
||||
stoped = 0
|
||||
break
|
||||
if(!stoped)
|
||||
// user << "There is no bleeding wound at [t]" //code no longer in a dedicated obj, thus this doesn't really matter
|
||||
return
|
||||
if (user)
|
||||
if (M != user)
|
||||
for (var/mob/O in viewers(H, null))
|
||||
O.show_message("\red [H] has been bandaged with [src] by [user]", 1)
|
||||
else
|
||||
var/t_himself = "itself"
|
||||
if (user.gender == MALE)
|
||||
t_himself = "himself"
|
||||
else if (user.gender == FEMALE)
|
||||
t_himself = "herself"
|
||||
for (var/mob/O in viewers(H, null))
|
||||
O.show_message("\red [H] bandaged [t_himself] with [src]", 1)
|
||||
|
||||
M.updatehealth()
|
||||
else
|
||||
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
|
||||
use(1)
|
||||
|
||||
|
||||
|
||||
/obj/item/stack/medical/advanced/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
if (M.stat == 2)
|
||||
var/t_him = "it"
|
||||
@@ -105,7 +111,35 @@ MEDICAL
|
||||
t_him = "her"
|
||||
user << "\red \The [M] is dead, you cannot help [t_him]!"
|
||||
return
|
||||
if (M.health < 0)
|
||||
|
||||
var/stoppedblood = 0
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/external/affecting = H.get_organ("chest")
|
||||
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/user2 = user
|
||||
affecting = H.get_organ(check_zone(user2.zone_sel.selecting))
|
||||
else
|
||||
if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0)
|
||||
affecting = H.get_organ("head")
|
||||
|
||||
if(H.bloodloss > 0 && heal_brute > 0) // fix wounds too if bruise pack
|
||||
for(var/datum/organ/wound/W in affecting.wounds)
|
||||
if(W.bleeding)
|
||||
if(stoppedblood)
|
||||
stoppedblood = 2
|
||||
break
|
||||
W.stopbleeding()
|
||||
stoppedblood = 1
|
||||
|
||||
if (user)
|
||||
if (M != user)
|
||||
H.visible_message("\red [user] patches [stoppedblood - 1 ? "some of" : "the last of"] [H]'s wounds with [src]", "\red You patch up [stoppedblood - 1 ? "some of" : "the last of"] [H]'s wounds", "\red You hear something like gauze being ripped.")
|
||||
else
|
||||
H.visible_message("\red [user] patches [stoppedblood - 1 ? "some of" : "the last of"] their own wounds with [src]", "\red You patch up [stoppedblood - 1 ? "some of" : "the last of"] your wounds", "\red You hear something like gauze being ripped.")
|
||||
|
||||
if (M.health < 0 && !stoppedblood)
|
||||
var/t_him = "it"
|
||||
if (M.gender == MALE)
|
||||
t_him = "him"
|
||||
@@ -156,30 +190,6 @@ MEDICAL
|
||||
|
||||
if (affecting.heal_damage(src.heal_brute, src.heal_burn))
|
||||
H.UpdateDamageIcon()
|
||||
|
||||
if(H.bloodloss > 0 && heal_brute > 0) // fix wounds too if bruise pack
|
||||
var/stoped = 0
|
||||
for(var/datum/organ/external/wound/W in affecting.wounds)
|
||||
if(W.bleeding)
|
||||
W.stopbleeding()
|
||||
stoped = 0
|
||||
break
|
||||
if(!stoped)
|
||||
// user << "There is no bleeding wound at [t]" //code no longer in a dedicated obj, thus this doesn't really matter
|
||||
return
|
||||
if (user)
|
||||
if (M != user)
|
||||
for (var/mob/O in viewers(H, null))
|
||||
O.show_message("\red [H] has been bandaged with [src] by [user]", 1)
|
||||
else
|
||||
var/t_himself = "itself"
|
||||
if (user.gender == MALE)
|
||||
t_himself = "himself"
|
||||
else if (user.gender == FEMALE)
|
||||
t_himself = "herself"
|
||||
for (var/mob/O in viewers(H, null))
|
||||
O.show_message("\red [H] bandaged [t_himself] with [src]", 1)
|
||||
|
||||
M.updatehealth()
|
||||
else
|
||||
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
|
||||
@@ -1565,7 +1565,6 @@ CIRCULAR SAW
|
||||
e.brute_dam = 0.0
|
||||
e.burn_dam = 0.0
|
||||
e.bandaged = 0.0
|
||||
e.wound_size = 0.0
|
||||
e.max_damage = initial(e.max_damage)
|
||||
e.bleeding = 0
|
||||
e.open = 0
|
||||
|
||||
@@ -171,9 +171,11 @@
|
||||
|
||||
if(keyslot1)
|
||||
user.put_in_hands(keyslot1)
|
||||
keyslot1 = null
|
||||
|
||||
if(keyslot2)
|
||||
user.put_in_hands(keyslot2)
|
||||
keyslot2 = null
|
||||
|
||||
recalculateChannels()
|
||||
user << "You pop out the encryption keys in the headset!"
|
||||
|
||||
Reference in New Issue
Block a user