capturetheflag
capturetheflag copied to clipboard
Add the hudbars mod
This pull request adds the minetest_hudbars mod, along with the necessary changes to make the other mods play nicely with it.

I'm unfortunately not sure this will be a welcome change unless players can choose between the current look and the bars.
I've made sure that the old style of bars can be restored by removing the hudbars mod. Not sure how we could make it configurable, maybe add something to the settings menu?
On Wed, Sep 21, 2022, 10:14 PM LoneWolfHT @.***> wrote:
I'm unfortunately not sure this will be a welcome change unless players can choose between the current look and the bars.
— Reply to this email directly, view it on GitHub https://github.com/MT-CTF/capturetheflag/pull/1047#issuecomment-1254538370, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3LRIGQZ4SUW2IUPMMQEGLV7PTJXANCNFSM57RYUPPQ . You are receiving this because you authored the thread.Message ID: @.***>
I've made sure that the old style of bars can be restored by removing the hudbars mod. Not sure how we could make it configurable, maybe add something to the settings menu?
Sorry for the late reply, that would work
I've made sure that the old style of bars can be restored by removing the hudbars mod. Not sure how we could make it configurable, maybe add something to the settings menu?
I'm assuming "settings menu" refers to the in-game settings tab in the player's inv GUI, and not the server-side settings? i.e. the intention is to make it configurable per-player?
Yes. I'm thinking that there would be a toggle there between the old style bars and the new style. The old ones should probably be the default
I added the setting. Old bars are the default, and you need to disconnect and reconnect for the setting to take effect. That's not ideal, but it's better than nothing.
Sorry for the delay.
I get this crash when I enable hudbars, relog, disable the setting, and proceed to sprint
2022-12-03 19:03:26: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'sprint' in callback environment_Step(): ...t/bin/../games/capturetheflag/mods/other/sprint/init.lua:52: bad argument #1 to 'hud_change' (number expected, got nil)
2022-12-03 19:03:26: ERROR[Main]: stack traceback:
2022-12-03 19:03:26: ERROR[Main]: [C]: in function 'hud_change'
2022-12-03 19:03:26: ERROR[Main]: ...t/bin/../games/capturetheflag/mods/other/sprint/init.lua:52: in function 'updateHud'
2022-12-03 19:03:26: ERROR[Main]: ...t/bin/../games/capturetheflag/mods/other/sprint/init.lua:82: in function 'func'
2022-12-03 19:03:26: ERROR[Main]: .../lv/minetest/bin/../builtin/profiler/instrumentation.lua:107: in function <.../lv/minetest/bin/../builtin/profiler/instrumentation.lua:100>
2022-12-03 19:03:26: ERROR[Main]: /home/lv/minetest/bin/../builtin/game/register.lua:431: in function </home/lv/minetest/bin/../builtin/game/register.lua:417>```
It would be good if we can choose between the classic style and the hud bars.
It would be good if we can choose between the classic style and the hud bars.
That's a feature of this PR, choosable per-player
What is status of this PR?
Needs a crash fix that's probably possible for the merger to do