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
Refactor builtin HUD #14346
Refactor builtin HUD #14346
Conversation
a88ea9e
to
9d4bb68
Compare
Rebased. |
9d4bb68
to
1fd30ef
Compare
Rebased again. |
1fd30ef
to
b00ee05
Compare
Thanks for reviewing it. I also rebased to make sure that it still works, since it is almost 2 months old. |
Hey @rollerozxa, can you do a zipgrep for |
Looking through the zipgrep kindly provided by rollerozxa, I can see at least one package relying on this default value (https://content.minetest.net/packages/epCode/what_were_you_expecting/). You have to re-add it for backwards compatibility (and it would be good to document and/or deprecate it). |
Fix grammar Co-authored-by: grorp <gregor.parzefall@posteo.de>
Fix grammar2 Co-authored-by: grorp <gregor.parzefall@posteo.de>
Co-authored-by: grorp <gregor.parzefall@posteo.de>
I resolved everything again, and re-added the undocumented Also, I fixed the duplicate breatbbar bug. |
…ckwards compat scaleToHudMax uses elem_def.item, so it must be set first to avoid a Lua error with mods that rely on the old behavior Remove "deprecated undocumented behavior" comment since it doesn't make much sense - how are modders supposed to know that something is deprecated if it's not documented?
…e_guidelines Specifically: - "Functions and variables should be named in lowercase_underscore_style" - "When breaking around a binary operator you should break after the operator."
For reference: cx384#2 |
Suggestions by grorp
Seams good, merged. Sorry for being a little late. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR looks OK to me now.
@sfan5 since there have been a lot of changes, you might want to have a look at this again.
I trust your judgement. |
Goal of the PR
(The statusbars behave the same as in the old version, the only difference is thatreaddedhud_replace_builtin
does not defaultdefinition.item
anymore, but this is not documented inlua_api.md
so it should be fine. However, I can re-add it if someone thinks it is needed.)Does this relate to a goal in the roadmap?
2.2 Internal code refactoring
To do
This PR is Ready for Review.
How to test
hud_replace_builtin
/hudtoggleflag breathbar
/hudtoggleflag healthbar