/datum/hud refactor to remove most vars#883
Open
Kapu1178 wants to merge 19 commits into
Open
Conversation
Member
Author
|
harddel issues, client transferring like aghosting bricking huds |
JohnFulpWillard
added a commit
to tgstation/tgstation
that referenced
this pull request
Apr 2, 2026
…UDs (#95119) ## About The Pull Request This is a port/revival of Kapu's DaedalusDock/daedalusdock#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 :cl: 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! /:cl: --------- Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
FlufflesTheDog
pushed a commit
to NovaSector/NovaSector
that referenced
this pull request
Apr 18, 2026
…UDs (#95119) This is a port/revival of Kapu's DaedalusDock/daedalusdock#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. 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. :cl: 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! /:cl: --------- Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
vinylspiders
pushed a commit
to NovaSector/NovaSector
that referenced
this pull request
Apr 18, 2026
…UDs (#95119) This is a port/revival of Kapu's DaedalusDock/daedalusdock#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. 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. :cl: 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! /:cl: --------- Co-Authored-By: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
vinylspiders
added a commit
to NovaSector/NovaSector
that referenced
this pull request
Apr 18, 2026
## PR Description from tgstation/tgstation#95119: This is a port/revival of Kapu's DaedalusDock/daedalusdock#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 Autochangelogs
Saukykouko
pushed a commit
to Saukykouko/FluffySTG
that referenced
this pull request
Apr 29, 2026
…UDs (#95119) This is a port/revival of Kapu's DaedalusDock/daedalusdock#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. 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. :cl: 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! /:cl: --------- Co-Authored-By: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
About The Pull Request
Refactors the hud datum to remove all screen vars, and handle everything uses lists. You can now call
add_screen_object()to add a managed screen object, so the only things that need to manage screen objects on their own are client screen objects like buildmode.🆑
/:cl: