Skip to content

[CHERRY-PICK] Repaths sprite accessory lists to be on a subsystem instead of global#757

Merged
MrMelbert merged 9 commits into
MrMelbert:masterfrom
Wollywoger:sprite-accesory-repath
Sep 8, 2025
Merged

[CHERRY-PICK] Repaths sprite accessory lists to be on a subsystem instead of global#757
MrMelbert merged 9 commits into
MrMelbert:masterfrom
Wollywoger:sprite-accesory-repath

Conversation

@Wollywoger

Copy link
Copy Markdown
Contributor

This is a cherry pick of tgstation/tgstation#82847 with attempts to update our own stuff to it as well. I am doing this as part of a later cherry pick from timegreen and ghommie which kills off mutant, internal, and external organs

This is being done first as it is not only a dependency, but a notable refactor, and i'd like to save the headache of juggling refactor errors
mirroring the original, this should have no visual changes

tgstation-ci Bot and others added 3 commits August 11, 2025 17:26
…om `GLOB` to a datasystem (#82847)

This is just a revitalization of #80275.

On the tin, basically demotes everything related to setting up and
storing these bulky lists generated from reading
`/datum/sprite_accessory` subtypes from living in a global space that
will instead be in a compartmentalized subsystem for accesses. Also a
lot of code modernization and micro-improvements (unquantifiable)

Same exact expected results, just accessed in a different way.

![image](https://github.com/tgstation/tgstation/assets/34697715/14627773-c9fb-45bd-8ce0-dee33cdd1d27)

There's a few reasons why I want this to happen.
* The `GLOB` space is too clogged. There are at least a thousand
variables on `GLOB`, and it's extremely painful to access stuff on
production/local through view variables when you're debugging stuff like
this. It's also painful when there is stuff that _should_ live on `GLOB`
that you might want to see in VV/Debugger but are forced to either have
to scroll a mile to find what you want or wait a long while for it to
load. The less bulky lists we have of stored initialized datums, the
better.

* `make_datum_reference_lists()` is a consequence of wack stuff like
this where we're reliant on certain things being initialized in the
`GLOB` portion of world initialization _before_ subsystems/static
variables load - most of these datum lists in the aforementioned proc
doesn't _really_ need to be ready to go before `world.New()` for
example. We'll sadly have to abuse `PreInit()` for now, but it really is
something that has to be ready to go due the critical dependence that
stuff like Preferences has on it.

* We don't have to have the procs live in a global namespace either.
Instead of passing in `GLOB.XList` or `DSstorage.XList` every single
time, we can instead just move the proc setup on the subsystem and use
`XList` in a more native fashion.

* It's easier to find what you need. To me, it's a lot nicer to
ctrl+click the DS and go to the variables to find something I'm looking
for instead of having to scavenge around for any footprint/trace of the
global I want to look for. This is more trivial than the other two, but
that's something I like to think about when I go to bed.

I also had to refactor a bit of the code to accommodate the limitations
of the new DS system, but it should be a lot cleaner anyways.

Not relevant

---

Also nothing should have broken but it's a good thing we have screenshot
unit tests to prove me wrong.
@github-actions github-actions Bot added Cherry Picked We're behind on schedule; and this is something we fucking need Non-Module Code Touches main files. Proceed with caution labels Aug 13, 2025
@Wollywoger

Copy link
Copy Markdown
Contributor Author

oh boy more conflicts

@MrMelbert MrMelbert merged commit 2694031 into MrMelbert:master Sep 8, 2025
45 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Cherry Picked We're behind on schedule; and this is something we fucking need Non-Module Code Touches main files. Proceed with caution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants