mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-30 23:46:43 +01:00
Ported autopsy.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user