Experimental #saveoptions command
Add a #saveoptions extended command, to allow saving configuration settings from within the game. This is still highly experimental, and gives plenty of warnings before asking to overwrite the file. Lack of option saving is one of the biggest complaints new players have, so this should help with it. More experienced players with highly customized config file should not use this feature, as it completely rewrites the file, removing all comments and non-config lines.
This commit is contained in:
@@ -631,7 +631,7 @@ nhl_get_config(lua_State *L)
|
||||
int argc = lua_gettop(L);
|
||||
|
||||
if (argc == 1) {
|
||||
lua_pushstring(L, get_option_value(luaL_checkstring(L, 1)));
|
||||
lua_pushstring(L, get_option_value(luaL_checkstring(L, 1), TRUE));
|
||||
return 1;
|
||||
} else
|
||||
nhl_error(L, "Wrong args");
|
||||
|
||||
Reference in New Issue
Block a user