diff --git a/baystation12.dme b/baystation12.dme index 9e06a9bd13d..a91e627d8aa 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -480,6 +480,7 @@ #include "code\game\jobs\job\science.dm" #include "code\game\jobs\job\security.dm" #include "code\game\jobs\job\silicon.dm" +#include "code\game\machinery\adv_med.dm" #include "code\game\machinery\ai_slipper.dm" #include "code\game\machinery\airlock_control.dm" #include "code\game\machinery\alarm.dm" @@ -966,10 +967,10 @@ #include "code\modules\critters\critter_defenses.dm" #include "code\modules\critters\critters.dm" #include "code\modules\critters\hivebots\hivebot.dm" -#include "code\modules\DetectiveWork\detective_work.dm" -#include "code\modules\DetectiveWork\evidence.dm" -#include "code\modules\DetectiveWork\footprints_and_rag.dm" -#include "code\modules\DetectiveWork\scanner.dm" +#include "code\modules\detectivework\detective_work.dm" +#include "code\modules\detectivework\evidence.dm" +#include "code\modules\detectivework\footprints_and_rag.dm" +#include "code\modules\detectivework\scanner.dm" #include "code\modules\flufftext\Dreaming.dm" #include "code\modules\flufftext\Hallucination.dm" #include "code\modules\flufftext\TextFilters.dm" diff --git a/code/datums/disease.dm b/code/datums/disease.dm index 83dfbd7e95f..29beb26066a 100644 --- a/code/datums/disease.dm +++ b/code/datums/disease.dm @@ -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-- diff --git a/code/datums/diseases/appendicitis.dm b/code/datums/diseases/appendicitis.dm index 68a0eeabf83..c87d435e763 100644 --- a/code/datums/diseases/appendicitis.dm +++ b/code/datums/diseases/appendicitis.dm @@ -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) \ No newline at end of file + 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() diff --git a/code/datums/organs/organ_external.dm b/code/datums/organs/organ_external.dm index 5c534bf45b6..a64122f70c2 100644 --- a/code/datums/organs/organ_external.dm +++ b/code/datums/organs/organ_external.dm @@ -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 diff --git a/code/datums/organs/wound.dm b/code/datums/organs/wound.dm index c72d5bcecbc..024419e1818 100644 --- a/code/datums/organs/wound.dm +++ b/code/datums/organs/wound.dm @@ -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 \ No newline at end of file + 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 \ No newline at end of file diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 816feff98c6..c5471bd696b 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -262,9 +262,6 @@ if(!D.hidden[SCANNER]) dat += text("Warning: [D.form] Detected\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]
") - if (occupant.virus2 || occupant.reagents.reagent_list.len > 0) - dat += text("Warning: Foreign substances detected in bloodstream.") - dat += "
" dat += "" dat += "" @@ -273,8 +270,7 @@ dat += "" dat += "" - for(var/name in occupant.organs) - var/datum/organ/external/e = occupant.organs[name] + for(var/datum/organ/external/e in occupant.organs) dat += "" var/AN = "" var/open = "" @@ -282,6 +278,10 @@ var/imp = "" var/bled = "" var/splint = "" + var/internal_bleeding = "" + for(var/datum/wound/W in e.wounds) if(W.internal) + internal_bleeding = "Internal Bleeding:" + break if(e.status & ORGAN_SPLINTED) splint = "Splinted:" if(e.status & ORGAN_BLEEDING) @@ -295,7 +295,7 @@ if(!AN && !open && !infected & !imp) AN = "None" if(!(e.status & ORGAN_DESTROYED)) - dat += "" + dat += "" else dat += "" dat += "" diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 68c1f4240a9..a5c8612d38c 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -274,6 +274,7 @@ else if(temp.wounds.len > 0) var/list/wound_descriptors = list() for(var/datum/wound/W in temp.wounds) + if(W.internal && !temp.open) continue // can't see internal wounds var/this_wound_desc = W.desc if(W.bleeding()) this_wound_desc = "bleeding [this_wound_desc]" else if(W.bandaged) this_wound_desc = "bandaged [this_wound_desc]" diff --git a/html/changelog.html b/html/changelog.html index 89c90138a2b..c87be05f56b 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -59,6 +59,18 @@ should be listed in the changelog upon commit though. Thanks. -->
+

October 18th

+

CIB updated:

+ +
+ +
+ +

17.10.2012

CIB updated:

OrganOther Wounds
[e.display_name][e.burn_dam][e.brute_dam][bled][AN][splint][open][infected][imp][e.display_name][e.burn_dam][e.brute_dam][bled][AN][splint][open][infected][imp][internal_bleeding][e.display_name]--Not Found