mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-13 10:23:15 +00:00
* New Lavaland Monster: Bileworms * Update living.dm * Update space_dragon.dm * Update mining_mobs.dm * Update kinetic_crusher.dm Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com> Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
30 lines
780 B
Plaintext
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)
|