mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
parent
0891975ad6
commit
7b74f04a61
5 changed files with 18 additions and 17 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue