mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-06-22 14:44:12 +01:00
16aef3a2fd
## About The Pull Request This is a port/revival of Kapu's https://github.com/DaedalusDock/daedalusdock/pull/883 By god, please TM this for a while, as HUDs are rather volatile and I might've missed something (also the original PR had harddel issues, so we should probably be on the lookout for those) Instead of being stored in a metric ton of separate variables, all HUD elements are now kept in a ``key -> element`` assoc list, and separate category lists have been turned into a single ``group_key -> list of elements`` assoc list for easier management. This massively simplifies HUD creation and management, and allows us to sanely dynamically modify HUDs without having to keep track of our elements ourselves (harddel fuel) I've also noticed that plasma vessels had... interesting, to say the least, way of managing their HUD and in humans were unable to display it, which I've changed (the element itself is displayed below stamina in non-aliens, as latter occupies the spot where you'd normally see it) Also fixes a bunch of minor unlikely to occur issues with HUD not updating when it should've sometimes. ## Why It's Good For The Game The two most important results of this is that A) we can fix the issue with items larger than 32x32 not displaying properly in inventories (in a separate PR) and B) this paves the way for datumized inventory slots, although that is a separate nightmare Some of this code is also actually over a decade old, and is an absolute nightmare to work with. ## Changelog 🆑 qol: Non-aliens with an implanted plasma vessel now see their plasma level in their HUD instead of just the stat panel refactor: Refactored the entirety of HUD management code, report if anything breaks! /🆑 --------- Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>