mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-02 21:11:57 +00:00
* Refactor on_mob_death, death implants, implant permission (#55862) * Refactor on_mob_death and death implants There is a proc on `/obj/item` called `on_mob_death` called on all items in the contents of a mob on that mob's death. It is currently used for explosive implant detonation, and the deactivation of the Peaceborg's projectile dampener. Instead of using this old proc, both of them now instad use the COMSIG_LIVING_DEATH signal, already emitted when their owner dies. The activation of an explosive implant will now occur after the rest of the death code has run, since it activates with an async applied function, since some other implants may still want the mob's body intact, and you shouldn't use `sleep()` (which it does in the "slow explosion mode") in signal handlers. In addition, the "can_be_implanted" proc for /mob/living (and overriden for silicons, slimes and simple animals) has been folded into the `/obj/item/implant/proc/can_be_implanted_to` proc. Some future implants may want to be more permissive than the current permissions, but that isn't possible when checking both procs. * Refactor on_mob_death, death implants, implant permission Co-authored-by: coiax <yellowbounder@gmail.com>