-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MDB IGNORE] Reagent container code cutdown #36398
[MDB IGNORE] Reagent container code cutdown #36398
Conversation
we have unit tests? |
i wonder what that compile and run tests thing in the checks is for |
yeah, those |
the tests don't really cover everything |
This PR actually costs additional memory and startup time. Any lists defined in an object's defintion cause an invisible /New() to be made which initalizes the list and stores it to memory, vs normal static variables. These lists as implemented are also permanently inside of the object, where they can be VV'd even after creation. The file sizes are slightly smaller and more compact, but it's harder on the server. The file cleanup is nice at least. |
reading that thread, lummox says the armor() list on /obj/item is bad? |
This is a major revision beyond simple bug fixes and is technically a parole violation. There was weeks of discussion on if this is to be allowed and there was no consensus so I will err to the side of not merging this. I'm not a fan of keeping a list of the initial reagents permanently in each object. |
What this does
takes ALL of the add_reagent stuff in new() from reagent container objects and makes it automatic with the reagents_to_add variable, as seen in lollipops
gives that var a proper unit test
compresses some food into subtypes
splits some food and drink into separate files like chemicals were#
moves reagent_refill() down from hyposprays to the general container level, making them work with them all, and renames it refill() (currently not used by anything but admin hyposprays still)
Closes #35989.
Closes #16054.
Why it's good
much less code to write, easier to sift through files
Changelog
🆑