Tons of updates to autopsy.

- Fire, Electrocution, Strangulation, Trace Chemicals and Radiation Poisoning are now detected
- Fixed a bug to head surgery
- You now only hurt subjects on an operating table with a scalpel if your intent is set to harm
- The sheet of paper printed by the autopsy scanner now goes to a free hand if possible
This commit is contained in:
cib
2012-02-27 03:41:24 -08:00
parent 7e21a6f65c
commit 889d6d93a0
4 changed files with 96 additions and 25 deletions

View File

@@ -124,6 +124,7 @@
/mob/living/carbon/human
proc
handle_health_updates()
// if the mob has enough health, she should slowly heal
if(stat != 2)
@@ -295,16 +296,20 @@
if (radiation < 0)
radiation = 0
var/damage = 0 // stores how much damage was inflicted
switch(radiation)
if(1 to 49)
radiation--
if(prob(25))
damage = 1
adjustToxLoss(1)
updatehealth()
if(50 to 74)
radiation -= 2
adjustToxLoss(1)
damage = 1
if(prob(5))
radiation -= 5
Weaken(3)
@@ -315,6 +320,7 @@
if(75 to 100)
radiation -= 3
adjustToxLoss(3)
damage = 3
if(prob(1))
src << "\red You mutate!"
randmutb(src)
@@ -322,6 +328,12 @@
emote("gasp")
updatehealth()
if(damage)
var/V = pick(organs)
var/datum/organ/external/O = organs[V]
if(istype(O)) O.add_wound("Radiation Poisoning", damage)
//As close as I could find to where to put it
grav_delay = max(grav_delay-3,0)
@@ -794,6 +806,21 @@
dizziness = max(0, dizziness - 3)
jitteriness = max(0, jitteriness - 3)
if(life_tick % 10 == 0)
// handle trace chemicals for autopsy
for(var/V in organs)
var/datum/organ/O = organs[V]
for(var/chemID in O.trace_chemicals)
O.trace_chemicals[chemID] = O.trace_chemicals[chemID] - 1
if(O.trace_chemicals[chemID] <= 0)
O.trace_chemicals.Remove(chemID)
for(var/datum/reagent/A in reagents.reagent_list)
// add chemistry traces to a random organ
var/V = pick(organs)
var/datum/organ/O = organs[V]
O.trace_chemicals[A.name] = 100
updatehealth()
return //TODO: DEFERRED

View File

@@ -3,7 +3,9 @@
name = "organ"
mob/living/carbon/human/owner = null
list/datum/wound/weapon_wounds = list()
list/datum/autopsy_data/autopsy_data = list()
list/trace_chemicals = list() // traces of chemicals in the organ,
// links chemical IDs to number of ticks for which they'll stay in the blood
proc/process()
@@ -12,7 +14,7 @@
proc/receive_chem(chemical as obj)
return 0
/datum/wound
/datum/autopsy_data
var
weapon = null
pretend_weapon = null
@@ -21,7 +23,7 @@
time_inflicted = 0
proc/copy()
var/datum/wound/W = new()
var/datum/autopsy_data/W = new()
W.weapon = src.weapon
W.pretend_weapon = src.pretend_weapon
W.damage = src.damage
@@ -131,18 +133,18 @@
perma_injury = 0
// if all damage is healed, replace the wounds with scars
if(brute_dam + burn_dam == 0)
for(var/V in weapon_wounds)
var/datum/wound/W = weapon_wounds[V]
for(var/V in autopsy_data)
var/datum/autopsy_data/W = autopsy_data[V]
del W
weapon_wounds = list()
autopsy_data = list()
return update_icon()
proc/add_wound(var/used_weapon, var/damage)
var/datum/wound/W = weapon_wounds[used_weapon]
var/datum/autopsy_data/W = autopsy_data[used_weapon]
if(!W)
W = new()
W.weapon = used_weapon
weapon_wounds[used_weapon] = W
autopsy_data[used_weapon] = W
W.hits += 1
W.damage += damage