mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add new world events: on_block_broken, on_block_placed
This commit is contained in:
parent
4952de4716
commit
ea765ffc0c
6 changed files with 49 additions and 10 deletions
|
|
@ -34,6 +34,7 @@ ContentLoader::ContentLoader(ContentPack* pack, ContentBuilder& builder)
|
|||
);
|
||||
stats = &runtime->getStatsWriteable();
|
||||
env = runtime->getEnvironment();
|
||||
this->runtime = runtime.get();
|
||||
builder.add(std::move(runtime));
|
||||
}
|
||||
|
||||
|
|
@ -408,7 +409,7 @@ void ContentLoader::load() {
|
|||
|
||||
fs::path scriptFile = folder/fs::path("scripts/world.lua");
|
||||
if (fs::is_regular_file(scriptFile)) {
|
||||
scripting::load_world_script(env, pack->id, scriptFile);
|
||||
scripting::load_world_script(env, pack->id, scriptFile, runtime->worldfuncsset);
|
||||
}
|
||||
|
||||
if (!fs::is_regular_file(pack->getContentFile()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue