mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 09:05:11 +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:
@@ -175,10 +175,12 @@ GLOBAL_LIST_EMPTY(virtual_pets_list)
|
||||
/datum/computer_file/program/virtual_pet/proc/post_cleaned(mob/source, mob/user)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
. = NONE
|
||||
source.spin(spintime = 2 SECONDS, speed = 1) //celebrate!
|
||||
happiness = min(happiness + PET_CLEAN_BONUS, max_happiness)
|
||||
COOLDOWN_START(src, on_clean_cooldown, 1 MINUTES)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
. |= COMPONENT_CLEANED|COMPONENT_CLEANED_GAIN_XP
|
||||
|
||||
///manage the pet's hat offsets when he changes direction
|
||||
/datum/computer_file/program/virtual_pet/proc/on_change_dir(datum/source, old_dir, new_dir)
|
||||
|
||||
Reference in New Issue
Block a user