-
Notifications
You must be signed in to change notification settings - Fork 299
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
Remove cruft from unit_buildmenu_config.lua
.
#3935
Remove cruft from unit_buildmenu_config.lua
.
#3935
Conversation
Table was not initialized nor referenced
Doesn't seem to be serving a purpose and complicates type annotations (to be added in a later commit)
unit_buildmenu_config.lua
unit_buildmenu_config.lua
unit_buildmenu_config.lua
and friends.
unit_buildmenu_config.lua
and friends.unit_buildmenu_config.lua
.
Looks fine, while doing this you could also rationalize usage of showWaterUnits inside Beyond-All-Reason/luaui/Widgets/gui_buildmenu.lua Lines 218 to 221 in 4801b4c
Beyond-All-Reason/luaui/Widgets/gui_gridmenu.lua Lines 295 to 296 in 4801b4c
the first one is checking the value just after setting it to false. |
Yes, I saw that. I've found strange stuff like that in most files I've looked at. There's really no end to it. It's much easier to clean up when adding types because you get all the static analysis and highlights. I might do that file in a later PR. For now I'd just like to get these merged. |
Imo since all of that looks like cleanup from the same original changes, they should be fixed in one go, but ok, your call :D. |
This reverts commit 38021ca.
Work done
Remove cruft and unused/uninitialized fields from
luaui\configs\unit_buildmenu_config.lua
.Each change is made in its own commit for ease of review.
This was all discovered while adding type annotations, but the PR was rejected for including both doc comments and cleanup. The docs are added separately in #3936 as per @WatchTheFort's request.
Test steps
No functional changes