Skip to content

/datum/hud refactor to remove most vars#883

Open
Kapu1178 wants to merge 19 commits into
DaedalusDock:masterfrom
Kapu1178:hudrefac2
Open

/datum/hud refactor to remove most vars#883
Kapu1178 wants to merge 19 commits into
DaedalusDock:masterfrom
Kapu1178:hudrefac2

Conversation

@Kapu1178
Copy link
Copy Markdown
Member

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:

@Kapu1178
Copy link
Copy Markdown
Member Author

harddel issues, client transferring like aghosting bricking huds

@Kapu1178 Kapu1178 closed this Nov 20, 2024
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant