diff options
author | kwolekr <kwolekr@minetest.net> | 2015-08-13 03:16:50 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2015-08-13 15:05:48 -0400 |
commit | be9024a397506dff1151b16e5f7a91e393b00d7e (patch) | |
tree | f68541add442e3f354e58778b5c41eb69c53f3fd /src/script | |
parent | a670ecfde4eccc0184089bac551b2c480ff35cda (diff) | |
download | minetest-be9024a397506dff1151b16e5f7a91e393b00d7e.tar.gz minetest-be9024a397506dff1151b16e5f7a91e393b00d7e.tar.bz2 minetest-be9024a397506dff1151b16e5f7a91e393b00d7e.zip |
minimap: Add ability to disable from server
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/lua_api/l_object.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp index fca69b996..3ac8eeefb 100644 --- a/src/script/lua_api/l_object.cpp +++ b/src/script/lua_api/l_object.cpp @@ -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; } |