diff options
author | paramat <paramat@users.noreply.github.com> | 2017-08-18 16:43:31 +0100 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2017-08-20 23:58:15 +0100 |
commit | 7657fe7a505425e82d9cab7ae5638f7927138fb0 (patch) | |
tree | fed13b884e8fff6b8dd43f86399400539c530115 /src/script/lua_api | |
parent | a3441638c67c9a9f626d7542a53fef6340d42751 (diff) | |
download | minetest-7657fe7a505425e82d9cab7ae5638f7927138fb0.tar.gz minetest-7657fe7a505425e82d9cab7ae5638f7927138fb0.tar.bz2 minetest-7657fe7a505425e82d9cab7ae5638f7927138fb0.zip |
Minimap: Add new HUD flag for minimap radar mode
Flag default is true to not change default behaviour.
The existing minimap HUD flag remains the master control for minimap.
Diffstat (limited to 'src/script/lua_api')
-rw-r--r-- | src/script/lua_api/l_object.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp index a65a5e88f..46ac61f27 100644 --- a/src/script/lua_api/l_object.cpp +++ b/src/script/lua_api/l_object.cpp @@ -60,12 +60,13 @@ struct EnumString es_HudElementStat[] = struct EnumString es_HudBuiltinElement[] = { - {HUD_FLAG_HOTBAR_VISIBLE, "hotbar"}, - {HUD_FLAG_HEALTHBAR_VISIBLE, "healthbar"}, - {HUD_FLAG_CROSSHAIR_VISIBLE, "crosshair"}, - {HUD_FLAG_WIELDITEM_VISIBLE, "wielditem"}, - {HUD_FLAG_BREATHBAR_VISIBLE, "breathbar"}, - {HUD_FLAG_MINIMAP_VISIBLE, "minimap"}, + {HUD_FLAG_HOTBAR_VISIBLE, "hotbar"}, + {HUD_FLAG_HEALTHBAR_VISIBLE, "healthbar"}, + {HUD_FLAG_CROSSHAIR_VISIBLE, "crosshair"}, + {HUD_FLAG_WIELDITEM_VISIBLE, "wielditem"}, + {HUD_FLAG_BREATHBAR_VISIBLE, "breathbar"}, + {HUD_FLAG_MINIMAP_VISIBLE, "minimap"}, + {HUD_FLAG_MINIMAP_RADAR_VISIBLE, "minimap_radar"}, {0, NULL}, }; @@ -1569,6 +1570,8 @@ int ObjectRef::l_hud_get_flags(lua_State *L) lua_setfield(L, -2, "breathbar"); lua_pushboolean(L, player->hud_flags & HUD_FLAG_MINIMAP_VISIBLE); lua_setfield(L, -2, "minimap"); + lua_pushboolean(L, player->hud_flags & HUD_FLAG_MINIMAP_RADAR_VISIBLE); + lua_setfield(L, -2, "minimap_radar"); return 1; } |