This commit is contained in:
Chinsky
2012-10-18 15:42:11 +04:00
9 changed files with 5622 additions and 5561 deletions

View File

@@ -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"

View File

@@ -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--

View File

@@ -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()

View File

@@ -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

View File

@@ -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

View File

@@ -262,9 +262,6 @@
if(!D.hidden[SCANNER])
dat += text("<font color='red'><B>Warning: [D.form] Detected</B>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]</FONT><BR>")
if (occupant.virus2 || occupant.reagents.reagent_list.len > 0)
dat += text("<font color='red'>Warning: Foreign substances detected in bloodstream.</FONT>")
dat += "<HR><table border='1'>"
dat += "<tr>"
dat += "<th>Organ</th>"
@@ -273,8 +270,7 @@
dat += "<th>Other Wounds</th>"
dat += "</tr>"
for(var/name in occupant.organs)
var/datum/organ/external/e = occupant.organs[name]
for(var/datum/organ/external/e in occupant.organs)
dat += "<tr>"
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 += "<td>[e.display_name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[bled][AN][splint][open][infected][imp]</td>"
dat += "<td>[e.display_name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[bled][AN][splint][open][infected][imp][internal_bleeding]</td>"
else
dat += "<td>[e.display_name]</td><td>-</td><td>-</td><td>Not Found</td>"
dat += "</tr>"

View File

@@ -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]"

View File

@@ -59,6 +59,18 @@ should be listed in the changelog upon commit though. Thanks. -->
<div class="commit sansserif">
<h2 class="date">October 18th</h2>
<h3 class="author">CIB updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">Added a new type of wound, internal wounds. These should later be treated with surgery, though for now bicardine works.</li>
<li class="tweak">Appendicitis now has a fourth stage in which the appendix burst and an internal wound is inflicted.</li>
<li class="rscadd">The full body scanner is back.</li>
</ul>
</div>
<div class="commit sansserif">
<h2 class="date">17.10.2012</h2>
<h3 class="author">CIB updated:</h3>
<ul class="changes bgimages16">

File diff suppressed because it is too large Load Diff