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

Datumizes storage from a component #11894

Open Tsar-Salat opened 5 days ago

Tsar-Salat commented 5 days ago

About The Pull Request

This PR moves storage from being a component to being a datum.

We kill /datum/component and its handler GetComponent(), and replace it with atom_storage and proc/create_storage(. . .)

Entirely removes signal overhead.

Included are some minor additional QOL/fixes for storage. (and some very not-minor fixes from the original tg pr)

Ports:

Why It's Good For The Game

We are making literal hundreds (maybe thousand) of GetComponent calls during initialize whenever we want to handle or modify the storage component. This is for every item.

This and the signal use contribute some not-so-insignificant overhead.

This makes that not happen. Yay.

The cool thing about atom storage is that, like the atomized integrity pr, you can now put it on nearly anything.

Testing Photographs and Procedure

Screenshots&Videos

Changelog

:cl: rkz, magatsuchi, JohnFulpWillard, GuillaumePrata, Vishenka0704 refactor: refactored storage component to be datumized tweak: tweaked overall weight of items so all the outfits fit again. TELL ME IF IT IS A SIGNIFICANT DEPARTURE FROM BEFORE, it should be about the same. Most of them were relating to ERT. balance: increased the slots of ERT/Abductor bags because trying to fit all those items that featurecoders like to put in them was causing errors during outfit init. tweak: decreased storage notification spam for ore bags add: adds storage mass transferring to griddles /:cl:

EvilDragonfiend commented 5 days ago

ye, get this shit out quickly

Tsar-Salat commented 5 days ago

I swore I had a testing evidence. This was like 2 weeks ago I was just waiting for pref speedup pr lol

Time to dig :(

Tsar-Salat commented 5 days ago

https://github.com/user-attachments/assets/95b89d33-d658-45e3-b6b3-c2454ed054d5

yea.

Time to learn how actions work

EvilDragonfiend commented 4 days ago

it seems action holder PR might be good to go with