cleanup
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "constants.hpp"
|
||||
#include "assets/Assets.hpp"
|
||||
#include "content/Content.hpp"
|
||||
#include "content/ContentControl.hpp"
|
||||
#include "debug/Logger.hpp"
|
||||
#include "engine/Engine.hpp"
|
||||
#include "io/engine_paths.hpp"
|
||||
@@ -30,7 +31,7 @@ static int l_get_version(lua::State* L) {
|
||||
}
|
||||
|
||||
static int l_load_content(lua::State* L) {
|
||||
engine->loadContent();
|
||||
content_control->loadContent();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -38,7 +39,7 @@ static int l_reset_content(lua::State* L) {
|
||||
if (level != nullptr) {
|
||||
throw std::runtime_error("world must be closed before");
|
||||
}
|
||||
engine->resetContent();
|
||||
content_control->resetContent();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "assets/AssetsLoader.hpp"
|
||||
#include "content/Content.hpp"
|
||||
#include "content/ContentControl.hpp"
|
||||
#include "content/PacksManager.hpp"
|
||||
#include "engine/Engine.hpp"
|
||||
#include "graphics/ui/gui_util.hpp"
|
||||
#include "graphics/ui/elements/Menu.hpp"
|
||||
@@ -44,10 +45,6 @@ static int l_pack_get_installed(lua::State* L) {
|
||||
|
||||
/// @brief pack.get_available() -> array<string>
|
||||
static int l_pack_get_available(lua::State* L) {
|
||||
io::path worldFolder;
|
||||
if (level) {
|
||||
worldFolder = level->getWorld()->wfile->getFolder();
|
||||
}
|
||||
PacksManager manager;
|
||||
manager.setSources(content_control->getDefaultSources());
|
||||
manager.scan();
|
||||
@@ -150,10 +147,6 @@ static int pack_get_infos(lua::State* L) {
|
||||
}
|
||||
}
|
||||
if (!ids.empty()) {
|
||||
io::path worldFolder;
|
||||
if (level) {
|
||||
worldFolder = level->getWorld()->wfile->getFolder();
|
||||
}
|
||||
PacksManager manager;
|
||||
manager.setSources(content_control->getDefaultSources());
|
||||
manager.scan();
|
||||
|
||||
Reference in New Issue
Block a user