BeeStation / BeeStation-Hornet

99.95% station. 0.05% bees
https://beestation13.com
GNU Affero General Public License v3.0
200 stars 682 forks source link

Speeds up preferences menu, mob dummies, & Unit Tests outfits #11749

Closed Tsar-Salat closed 6 days ago

Tsar-Salat commented 1 month ago

About The Pull Request

This PR puts loading preferences menu stuff on a subsytem, SSwardrobe, which allows us to preload stuff like equipment clothing and organs of dummies, and load it when opening the menu, saving us a lot of time.

Additionally, we now unit test outfits

Ports:

Why It's Good For The Game

prequel to #11340

Loading dummies in the preference menu does not make them take an ungodly amount of time just because they have more gear on. (Looking at you, Chief Engineer)

If you want measurement specifics, go look at the TG pr.

Testing Photographs and Procedure

Screenshots&Videos Basically instant https://github.com/user-attachments/assets/85cdab9c-0117-48d3-943c-958bc43f7710

Changelog

:cl: rkz, Akrilla, Mothblocks, LemonInTheDark, Firecage, MrMelbert refactor: Preferences menu will now re-use shared wardrobe items, making previews update faster. code: Adds unit test for the wardrobe system refactor: Refactors survivalboxes to be less copypaste code: Standardizes storage holdability fix: Fixes runtime when loading dummies in prefs or select-equipment context verb /:cl:

github-actions[bot] commented 1 month ago

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Tsar-Salat commented 1 week ago

/obj/item/storage/belt/medical/ert/ComponentInitialize()

It just adds to its parent's list. The setter should work fine.

I took the opportunity to run it through the preloader though.

/obj/item/storage/belt/bandolier/western/ComponentInitialize()

Missed this one. Non-conventional naming. Fixed now.

/obj/item/storage/firstaid/medical/paramedic/ComponentInitialize()

Screenshot 2024-11-13 005554

Escaped my notice due to recent pr. Fixed

itsmeow commented 6 days ago

hold up