add app.reset_content()
This commit is contained in:
@@ -38,6 +38,7 @@ local function complete_app_lib(app)
|
|||||||
app.get_version = core.get_version
|
app.get_version = core.get_version
|
||||||
app.get_setting_info = core.get_setting_info
|
app.get_setting_info = core.get_setting_info
|
||||||
app.load_content = core.load_content
|
app.load_content = core.load_content
|
||||||
|
app.reset_content = core.reset_content
|
||||||
|
|
||||||
function app.config_packs(packs_list)
|
function app.config_packs(packs_list)
|
||||||
-- Check if packs are valid and add dependencies to the configuration
|
-- Check if packs are valid and add dependencies to the configuration
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ static int l_load_content(lua::State* L) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int l_reset_content(lua::State* L) {
|
||||||
|
engine->resetContent();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/// @brief Creating new world
|
/// @brief Creating new world
|
||||||
/// @param name Name world
|
/// @param name Name world
|
||||||
/// @param seed Seed world
|
/// @param seed Seed world
|
||||||
@@ -249,6 +254,7 @@ const luaL_Reg corelib[] = {
|
|||||||
{"blank", lua::wrap<l_blank>},
|
{"blank", lua::wrap<l_blank>},
|
||||||
{"get_version", lua::wrap<l_get_version>},
|
{"get_version", lua::wrap<l_get_version>},
|
||||||
{"load_content", lua::wrap<l_load_content>},
|
{"load_content", lua::wrap<l_load_content>},
|
||||||
|
{"reset_content", lua::wrap<l_reset_content>},
|
||||||
{"new_world", lua::wrap<l_new_world>},
|
{"new_world", lua::wrap<l_new_world>},
|
||||||
{"open_world", lua::wrap<l_open_world>},
|
{"open_world", lua::wrap<l_open_world>},
|
||||||
{"reopen_world", lua::wrap<l_reopen_world>},
|
{"reopen_world", lua::wrap<l_reopen_world>},
|
||||||
|
|||||||
Reference in New Issue
Block a user