refactor & add test.new_world

This commit is contained in:
MihailRis
2024-12-10 18:41:39 +03:00
parent 8f37704530
commit 9b4dd8f65e
9 changed files with 57 additions and 8 deletions
+6
View File
@@ -21,6 +21,7 @@
#include <vector>
#include <mutex>
class Level;
class Screen;
class EnginePaths;
class ResPaths;
@@ -71,6 +72,7 @@ class Engine : public util::ObjectsKeeper {
std::vector<std::string> basePacks;
std::unique_ptr<gui::GUI> gui;
Time time;
consumer<std::unique_ptr<Level>> levelConsumer;
void loadControls();
void loadSettings();
@@ -132,6 +134,8 @@ public:
/// @brief Get engine resource paths controller
ResPaths* getResPaths();
void onWorldOpen(std::unique_ptr<Level> level);
/// @brief Get current Content instance
const Content* getContent() const;
@@ -155,6 +159,8 @@ public:
PacksManager createPacksManager(const fs::path& worldFolder);
void setLevelConsumer(consumer<std::unique_ptr<Level>> levelConsumer);
SettingsHandler& getSettingsHandler();
network::Network& getNetwork();