mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Audits wash/cleaning signals + refactors wash() to ensure no needless mob updates occur (#91259)
## About The Pull Request This has the potential to create a lot of needless mob updates which is not great. Now should only update a mob's clothing if it was actually washed. This PR 1) ensures that all wash() procs return a bitflag. 2) ensures that `wash()` proccalls which result in expensive operations like icon updates only do so when it is necessary ## Why It's Good For The Game Updating mob sprites is expensive, and doing it when nothing has been changed is bad. ## Changelog Nothing really player facing
This commit is contained in:
@@ -143,12 +143,12 @@
|
||||
///What layer we set it to
|
||||
var/target_layer = DUCT_LAYER_DEFAULT
|
||||
|
||||
/obj/item/plunger/attack_atom(obj/O, mob/living/user, list/modifiers, list/attack_modifiers)
|
||||
/obj/item/plunger/attack_atom(obj/attacked_obj, mob/living/user, list/modifiers, list/attack_modifiers)
|
||||
if(layer_mode)
|
||||
SEND_SIGNAL(O, COMSIG_MOVABLE_CHANGE_DUCT_LAYER, O, target_layer)
|
||||
SEND_SIGNAL(attacked_obj, COMSIG_MOVABLE_CHANGE_DUCT_LAYER, attacked_obj, target_layer)
|
||||
return ..()
|
||||
else
|
||||
if(!O.plunger_act(src, user, reinforced))
|
||||
if(!attacked_obj.plunger_act(src, user, reinforced))
|
||||
return ..()
|
||||
|
||||
/obj/item/plunger/throw_impact(atom/hit_atom, datum/thrownthing/tt)
|
||||
|
||||
Reference in New Issue
Block a user