mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
@@ -118,17 +118,21 @@ int LuaMinimap::l_toggle_shape(lua_State *L)
|
||||
|
||||
int LuaMinimap::l_show(lua_State *L)
|
||||
{
|
||||
Client *client = getClient(L);
|
||||
assert(client);
|
||||
client->setMinimapShownByMod(true);
|
||||
LuaMinimap *ref = checkobject(L, 1);
|
||||
Minimap *m = getobject(ref);
|
||||
|
||||
if (m->getMinimapMode() == MINIMAP_MODE_OFF)
|
||||
m->setMinimapMode(MINIMAP_MODE_SURFACEx1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int LuaMinimap::l_hide(lua_State *L)
|
||||
{
|
||||
Client *client = getClient(L);
|
||||
assert(client);
|
||||
client->setMinimapShownByMod(false);
|
||||
LuaMinimap *ref = checkobject(L, 1);
|
||||
Minimap *m = getobject(ref);
|
||||
|
||||
if (m->getMinimapMode() != MINIMAP_MODE_OFF)
|
||||
m->setMinimapMode(MINIMAP_MODE_OFF);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user