mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
add support for saving settings by lua command (server doesn't autosave on exit)
This commit is contained in:
parent
b52dfbe510
commit
d8a0efa6af
2 changed files with 9 additions and 0 deletions
|
@ -4881,6 +4881,13 @@ static int l_setting_getbool(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
// setting_save()
|
||||
static int l_setting_save(lua_State *L)
|
||||
{
|
||||
get_server(L)->saveConfig();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// chat_send_all(text)
|
||||
static int l_chat_send_all(lua_State *L)
|
||||
{
|
||||
|
@ -5350,6 +5357,7 @@ static const struct luaL_Reg minetest_f [] = {
|
|||
{"setting_set", l_setting_set},
|
||||
{"setting_get", l_setting_get},
|
||||
{"setting_getbool", l_setting_getbool},
|
||||
{"setting_save",l_setting_save},
|
||||
{"chat_send_all", l_chat_send_all},
|
||||
{"chat_send_player", l_chat_send_player},
|
||||
{"get_player_privs", l_get_player_privs},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue