Ported autopsy.

This commit is contained in:
cib
2012-11-14 20:31:31 +01:00
parent 97272ec1dd
commit 7ae7099098
11 changed files with 286 additions and 34 deletions
+6 -1
View File
@@ -1,6 +1,11 @@
/datum/organ
var/name = "organ"
var/mob/living/carbon/human/owner = null
var/list/datum/autopsy_data/autopsy_data = list()
var/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
///datum/organ/proc/process()
// return 0
@@ -12,4 +17,4 @@
return 0
proc/receive_chem(chemical as obj)
return 0
return 0
+13
View File
@@ -122,6 +122,8 @@
if(status & ORGAN_BROKEN)
owner.emote("scream")
if(used_weapon) add_autopsy_data(used_weapon, brute + burn)
owner.updatehealth()
@@ -519,6 +521,17 @@
if(T)
T.robotize()
proc/add_autopsy_data(var/used_weapon, var/damage)
var/datum/autopsy_data/W = autopsy_data[used_weapon]
if(!W)
W = new()
W.weapon = used_weapon
autopsy_data[used_weapon] = W
W.hits += 1
W.damage += damage
W.time_inflicted = world.time
/datum/organ/external/chest
name = "chest"
icon_name = "chest"