projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b605b95
)
l_minimap: don't show minimap if configuration doesn't allow it
author
Loïc Blot
<loic.blot@unix-experience.fr>
Wed, 29 Mar 2017 13:50:22 +0000
(15:50 +0200)
committer
Loïc Blot
<loic.blot@unix-experience.fr>
Wed, 29 Mar 2017 13:50:22 +0000
(15:50 +0200)
src/script/lua_api/l_minimap.cpp
patch
|
blob
|
history
diff --git
a/src/script/lua_api/l_minimap.cpp
b/src/script/lua_api/l_minimap.cpp
index 8e03936a751c15c706fe9f2780da4cb1e6e28fb5..182894f4f72eb3cdd218fb6200a7b9bffa63cac3 100644
(file)
--- a/
src/script/lua_api/l_minimap.cpp
+++ b/
src/script/lua_api/l_minimap.cpp
@@
-22,6
+22,7
@@
with this program; if not, write to the Free Software Foundation, Inc.,
#include "lua_api/l_internal.h"
#include "common/c_converter.h"
#include "minimap.h"
+#include "settings.h"
LuaMinimap::LuaMinimap(Minimap *m)
{
@@
-118,6
+119,10
@@
int LuaMinimap::l_toggle_shape(lua_State *L)
int LuaMinimap::l_show(lua_State *L)
{
+ // If minimap is disabled by config, don't show it.
+ if (!g_settings->getBool("enable_minimap"))
+ return 1;
+
Client *client = getClient(L);
assert(client);