mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +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:
@@ -43,11 +43,14 @@ to null does not delete the object itself. Thank you.
|
||||
var/severity = null//severity descr
|
||||
var/longevity = 250//time in "ticks" the virus stays in inanimate object (blood stains, corpses, etc). In syringes, bottles and beakers it stays infinitely.
|
||||
var/list/hidden = list(0, 0)
|
||||
var/age = 0 // age of the disease in the current mob
|
||||
var/stage_minimum_age = 0 // how old the disease must be to advance per stage
|
||||
// if hidden[1] is true, then virus is hidden from medical scanners
|
||||
// if hidden[2] is true, then virus is hidden from PANDEMIC machine
|
||||
|
||||
|
||||
/datum/disease/proc/stage_act()
|
||||
age++
|
||||
var/cure_present = has_cure()
|
||||
//world << "[cure_present]"
|
||||
|
||||
@@ -59,7 +62,7 @@ to null does not delete the object itself. Thank you.
|
||||
|
||||
if(stage > max_stages)
|
||||
stage = max_stages
|
||||
if(stage_prob != 0 && prob(stage_prob) && stage != max_stages && !cure_present) //now the disease shouldn't get back up to stage 4 in no time
|
||||
if(stage_prob != 0 && prob(stage_prob) && stage != max_stages && !cure_present && age > stage_minimum_age * stage) //now the disease shouldn't get back up to stage 4 in no time
|
||||
stage++
|
||||
if(stage != 1 && (prob(1) || (cure_present && prob(cure_chance))))
|
||||
stage--
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/datum/disease/appendicitis
|
||||
form = "Condition"
|
||||
name = "Appendicitis"
|
||||
max_stages = 3
|
||||
max_stages = 4
|
||||
spread = "Acute"
|
||||
cure = "Surgery"
|
||||
agent = "Shitty Appendix"
|
||||
agent = "Appendix"
|
||||
affected_species = list("Human")
|
||||
permeability_mod = 1
|
||||
contagious_period = 9001 //slightly hacky, but hey! whatever works, right?
|
||||
@@ -12,16 +12,22 @@
|
||||
severity = "Medium"
|
||||
longevity = 1000
|
||||
hidden = list(0, 1)
|
||||
stage_minimum_age = 100 // at least 100 life ticks per stage
|
||||
|
||||
/datum/disease/appendicitis/stage_act()
|
||||
..()
|
||||
switch(stage)
|
||||
if(1)
|
||||
if(prob(5)) affected_mob.emote("cough")
|
||||
if(affected_mob.op_stage.appendix == 2.0)
|
||||
// appendix is removed, can't get infected again
|
||||
src.cure()
|
||||
if(prob(5))
|
||||
affected_mob << "\red You feel a stinging pain in your abdomen!"
|
||||
affected_mob.emote("me",1,"winces slightly.")
|
||||
if(2)
|
||||
if(prob(3))
|
||||
affected_mob << "\red You feel a stabbing pain in your abdomen!"
|
||||
affected_mob.Stun(rand(2,3))
|
||||
affected_mob.emote("me",1,"winces painfully.")
|
||||
affected_mob.adjustToxLoss(1)
|
||||
if(3)
|
||||
if(prob(1))
|
||||
@@ -38,4 +44,18 @@
|
||||
else
|
||||
affected_mob << "\red You gag as you want to throw up, but there's nothing in your stomach!"
|
||||
affected_mob.Weaken(10)
|
||||
affected_mob.adjustToxLoss(3)
|
||||
affected_mob.adjustToxLoss(3)
|
||||
|
||||
if(4)
|
||||
if(prob(1) && ishuman(affected_mob))
|
||||
var/mob/living/carbon/human/H = affected_mob
|
||||
H << "\red Your abdomen is a world of pain!"
|
||||
H.Weaken(10)
|
||||
H.op_stage.appendix = 2.0
|
||||
|
||||
var/datum/organ/external/groin = H.get_organ("groin")
|
||||
var/datum/wound/W = new /datum/wound/internal_bleeding(25)
|
||||
H.adjustToxLoss(25)
|
||||
groin.wounds += W
|
||||
|
||||
src.cure()
|
||||
|
||||
@@ -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