mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
minimap: Add ability to disable from server
This commit is contained in:
parent
a670ecfde4
commit
be9024a397
5 changed files with 69 additions and 47 deletions
|
@ -68,6 +68,7 @@ struct EnumString es_HudBuiltinElement[] =
|
|||
{HUD_FLAG_CROSSHAIR_VISIBLE, "crosshair"},
|
||||
{HUD_FLAG_WIELDITEM_VISIBLE, "wielditem"},
|
||||
{HUD_FLAG_BREATHBAR_VISIBLE, "breathbar"},
|
||||
{HUD_FLAG_MINIMAP_VISIBLE, "minimap"},
|
||||
{0, NULL},
|
||||
};
|
||||
|
||||
|
@ -1384,6 +1385,8 @@ int ObjectRef::l_hud_get_flags(lua_State *L)
|
|||
lua_setfield(L, -2, "wielditem");
|
||||
lua_pushboolean(L, player->hud_flags & HUD_FLAG_BREATHBAR_VISIBLE);
|
||||
lua_setfield(L, -2, "breathbar");
|
||||
lua_pushboolean(L, player->hud_flags & HUD_FLAG_MINIMAP_VISIBLE);
|
||||
lua_setfield(L, -2, "minimap");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue