Merge branch 'master' of https://github.com/Baystation12/Baystation12 into bs12_with_tgport

Conflicts:
	code/datums/disease.dm
	code/modules/reagents/Chemistry-Reagents.dm
	icons/turf/areas.dmi
	maps/tgstation.2.0.9.1.dmm

yep, this time going to merge map updates before making map changes >.>

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2012-10-21 01:25:04 +10:00
77 changed files with 10392 additions and 9860 deletions

View File

@@ -43,12 +43,12 @@ 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/can_carry = 1 // If the disease allows "carriers".
// if hidden[1] is true, then virus is hidden from medical scanners
var/can_carry = 1 // If the disease allows "carriers". 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]"
@@ -60,7 +60,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

@@ -3,9 +3,9 @@
max_stages = 4
spread = "On contact"
spread_type = CONTACT_GENERAL
cure = "Ryetalin"
cure = "ryetalyn"
curable = 0
cure = "Ryetalyn"
cure_id = "ryetalyn"
curable = 1
agent = "S4E1 retrovirus"
affected_species = list("Human")
var/list/original_dna = list()

View File

@@ -53,6 +53,11 @@ datum/mind
var/datum/faction/faction //associated faction
var/datum/changeling/changeling //changeling holder
var/rev_cooldown = 0
// the world.time since the mob has been brigged, or -1 if not at all
var/brigged_since = -1
New(var/key)
src.key = key
@@ -1083,6 +1088,37 @@ datum/mind
fail |= !ticker.mode.equip_revolutionary(current)
// check whether this mind's mob has been brigged for the given duration
// have to call this periodically for the duration to work properly
proc/is_brigged(duration)
var/turf/T = current.loc
if(!istype(T))
brigged_since = -1
return 0
var/is_currently_brigged = 0
if(istype(T.loc,/area/security/brig))
is_currently_brigged = 1
for(var/obj/item/weapon/card/id/card in current)
is_currently_brigged = 0
break // if they still have ID they're not brigged
for(var/obj/item/device/pda/P in current)
if(P.id)
is_currently_brigged = 0
break // if they still have ID they're not brigged
if(!is_currently_brigged)
brigged_since = -1
return 0
if(brigged_since == -1)
brigged_since = world.time
return (duration <= world.time - brigged_since)
//Initialisation procs
/mob/living/proc/mind_initialize()

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)
@@ -106,7 +105,8 @@
if(forbidden_limbs.len)
possible_points -= forbidden_limbs
if(!possible_points.len)
message_admins("Oh god WHAT! [owner]'s [src] was unable to find an organ to pass overdamage too!")
if(owner.stat != 2)
message_admins("Oh god WHAT! [owner]'s [src] was unable to find an organ to pass overdamage to!")
else
var/datum/organ/external/target = pick(possible_points)
if(brute)
@@ -181,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
@@ -196,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
@@ -232,14 +238,18 @@
owner.update_body(1)
return
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & ORGAN_ROBOT))
if(!(status & ORGAN_BROKEN))
owner.visible_message("\red You hear a loud cracking sound coming from \the [owner].","\red <b>Something feels like it shattered in your [display_name]!</b>","You hear a sickening crack.")
owner.emote("scream")
status |= ORGAN_BROKEN
broken_description = pick("broken","fracture","hairline fracture")
perma_injury = brute_dam
src.fracture()
return
proc/fracture()
if(status & ORGAN_BROKEN)
return
owner.visible_message("\red You hear a loud cracking sound coming from \the [owner].","\red <b>Something feels like it shattered in your [display_name]!</b>","You hear a sickening crack.")
owner.emote("scream")
status |= ORGAN_BROKEN
broken_description = pick("broken","fracture","hairline fracture")
perma_injury = brute_dam
// new damage icon system
// returns just the brute/burn damage code
proc/damage_state_text()
@@ -418,7 +428,7 @@
W = new wound_type(damage)
if(BURN)
var/list/size_names = list(/datum/wound/moderate_burn, /datum/wound/large_burn, /datum/wound/severe_burn, /datum/wound/deep_burn, /datum/wound/carbonised_area)
var/list/size_names = list(/datum/wound/moderate_burn, /datum/wound/large_burn, /datum/wound/severe_burn, /datum/wound/deep_burn, /datum/wound/carbonised_area, /datum/wound/carbonised_area)
wound_type = size_names[size]
W = new wound_type(damage)

View File

@@ -34,6 +34,13 @@
// number of wounds of this type
var/tmp/amount = 1
// maximum stage at which bleeding should still happen, counted from the right rather than the left of the list
// 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()
@@ -55,6 +62,10 @@
// this will ensure the size of the wound matches the damage
src.heal_damage(0)
// make the max_bleeding_stage count from the end of the list rather than the start
// this is more robust to changes to the list
max_bleeding_stage = src.desc_list.len - max_bleeding_stage
// returns 1 if there's a next stage, 0 otherwise
proc/next_stage()
if(current_stage + 1 > src.desc_list.len)
@@ -82,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
@@ -106,29 +123,36 @@
src.min_damage = damage_list[current_stage]
proc/bleeding()
return (!bandaged && damage > 4)
// 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
// link wound descriptions to amounts of damage
max_bleeding_stage = 2
stages = list("ugly ripped cut" = 20, "ripped cut" = 10, "cut" = 5, "healing cut" = 2, "small scab" = 0)
/datum/wound/deep_cut
max_bleeding_stage = 3
stages = list("ugly deep ripped cut" = 25, "deep ripped cut" = 20, "deep cut" = 15, "clotted cut" = 8, "scab" = 2, "fresh skin" = 0)
/datum/wound/flesh_wound
max_bleeding_stage = 3
stages = list("ugly ripped flesh wound" = 35, "ugly flesh wound" = 30, "flesh wound" = 25, "blood soaked clot" = 15, "large scab" = 5, "fresh skin" = 0)
/datum/wound/gaping_wound
max_bleeding_stage = 2
stages = list("gaping wound" = 50, "large blood soaked clot" = 25, "large clot" = 15, "small angry scar" = 5, \
"small straight scar" = 0)
/datum/wound/big_gaping_wound
max_bleeding_stage = 2
stages = list("big gaping wound" = 60, "healing gaping wound" = 40, "large angry scar" = 10, "large straight scar" = 0)
needs_treatment = 1 // this only heals when bandaged
/datum/wound/massive_wound
max_bleeding_stage = 2
stages = list("massive wound" = 70, "massive healing wound" = 50, "massive angry scar" = 10, "massive jagged scar" = 0)
needs_treatment = 1 // this only heals when bandaged
@@ -197,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