add GeneratorScript

This commit is contained in:
MihailRis
2024-08-14 17:12:12 +03:00
parent 6f5eb6be48
commit 95cf451cc8
12 changed files with 196 additions and 51 deletions
+6
View File
@@ -32,6 +32,7 @@ class BlocksController;
class LevelController;
class Entity;
struct EntityDef;
class GeneratorScript;
namespace scripting {
extern Engine* engine;
@@ -50,6 +51,7 @@ namespace scripting {
scriptenv get_root_environment();
scriptenv create_pack_environment(const ContentPack& pack);
scriptenv create_environment();
scriptenv create_doc_environment(
const scriptenv& parent, const std::string& name
);
@@ -144,6 +146,10 @@ namespace scripting {
void load_entity_component(const std::string& name, const fs::path& file);
std::unique_ptr<GeneratorScript> load_generator(
const fs::path& file
);
/// @brief Load package-specific world script
/// @param env environment
/// @param packid content-pack id