Files
Bubberstation/code/datums/elements/mob_killed_tally.dm
T
tralezabandGitHub 0728fb3840 New Lavaland Monster: Bileworms (#68967)
Bileworms are a new lavaland monster, that has unique AI that should prove them.

Instead of moving normally, it periodically burrows underground and resurfaces nearby.
Its attack is an AOE acid spit.
2022-08-05 11:07:34 +02:00

30 lines
780 B
Plaintext

/**
* Mob Killed Tally; which ticks up a blackbox when the mob dies
*
* Used for all the mining mobs!
*/
/datum/element/mob_killed_tally
element_flags = ELEMENT_BESPOKE|ELEMENT_DETACH
id_arg_index = 2
/// Which tally needs to be ticked up in the blackbox
var/tally_string
/datum/element/mob_killed_tally/Attach(datum/target, tally_string)
. = ..()
if(!isliving(target))
return ELEMENT_INCOMPATIBLE
RegisterSignal(target, COMSIG_LIVING_DEATH, .proc/on_death)
src.tally_string = tally_string
/datum/element/mob_killed_tally/Detach(datum/target)
UnregisterSignal(target, COMSIG_LIVING_DEATH)
return ..()
/datum/element/mob_killed_tally/proc/on_death(mob/living/target, gibbed)
SIGNAL_HANDLER
SSblackbox.record_feedback("tally", tally_string, 1, target.type)