1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 08:35:20 +02:00

minimap: Add ability to disable from server

This commit is contained in:
kwolekr
2015-08-13 03:16:50 -04:00
parent a670ecfde4
commit be9024a397
5 changed files with 69 additions and 47 deletions

View File

@@ -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;
}