mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-28 06:26:29 +01:00
Several medical related changes.
- There's now internal wounds - Appendicitis stage 4 causes internal wounds - Added back the body scanner
This commit is contained in:
@@ -45,7 +45,6 @@
|
||||
|
||||
|
||||
proc/take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
|
||||
// TODO: this proc needs to be rewritten to not update damages directly
|
||||
if((brute <= 0) && (burn <= 0))
|
||||
return 0
|
||||
if(status & ORGAN_DESTROYED)
|
||||
@@ -182,6 +181,11 @@
|
||||
if(W.damage == 0 && W.created + 10 * 10 * 60 <= world.time)
|
||||
wounds -= W
|
||||
// let the GC handle the deletion of the wound
|
||||
if(W.internal && !W.is_treated())
|
||||
// internal wounds get worse over time
|
||||
W.open_wound(0.5 * wound_update_accuracy)
|
||||
owner.vessel.remove_reagent("blood",0.1 * W.damage * wound_update_accuracy)
|
||||
|
||||
if(W.is_treated())
|
||||
// slow healing
|
||||
var/amount = 0.2
|
||||
@@ -197,6 +201,7 @@
|
||||
proc/bandage()
|
||||
var/rval = 0
|
||||
for(var/datum/wound/W in wounds)
|
||||
if(W.internal) continue
|
||||
rval |= !W.bandaged
|
||||
W.bandaged = 1
|
||||
return rval
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
// 1 means all stages except the last should bleed
|
||||
var/max_bleeding_stage = 1
|
||||
|
||||
// internal wounds can only be fixed through surgery
|
||||
var/internal = 0
|
||||
|
||||
// helper lists
|
||||
var/tmp/list/desc_list = list()
|
||||
var/tmp/list/damage_list = list()
|
||||
@@ -90,7 +93,13 @@
|
||||
|
||||
// heal the given amount of damage, and if the given amount of damage was more
|
||||
// than what needed to be healed, return how much heal was left
|
||||
proc/heal_damage(amount)
|
||||
// set @heals_internal to also heal internal organ damage
|
||||
// TODO: set heals_internal to 0 by default
|
||||
proc/heal_damage(amount, heals_internal = 1)
|
||||
if(src.internal && !heals_internal)
|
||||
// heal nothing
|
||||
return amount
|
||||
|
||||
var/healed_damage = min(src.damage, amount)
|
||||
amount -= healed_damage
|
||||
src.damage -= healed_damage
|
||||
@@ -114,7 +123,8 @@
|
||||
src.min_damage = damage_list[current_stage]
|
||||
|
||||
proc/bleeding()
|
||||
return (!bandaged && (damage_type == BRUISE && damage >= 20 || damage_type == CUT) && current_stage <= max_bleeding_stage)
|
||||
// internal wounds don't bleed in the sense of this function
|
||||
return (!bandaged && (damage_type == BRUISE && damage >= 20 || damage_type == CUT) && current_stage <= max_bleeding_stage && !src.internal)
|
||||
|
||||
/** CUTS **/
|
||||
/datum/wound/cut
|
||||
@@ -211,4 +221,12 @@
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
damage_type = BURN
|
||||
damage_type = BURN
|
||||
|
||||
/datum/wound/internal_bleeding
|
||||
internal = 1
|
||||
|
||||
stages = list("severed vein" = 30, "cut vein" = 20, "damaged vein" = 10, "bruised vein" = 5)
|
||||
max_bleeding_stage = 0
|
||||
|
||||
needs_treatment = 1
|
||||
Reference in New Issue
Block a user