mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
add triggers
This commit is contained in:
parent
50c714692a
commit
5769be8ec8
15 changed files with 239 additions and 64 deletions
|
|
@ -322,9 +322,9 @@ void ContentLoader::loadEntity(EntityDef& def, const std::string& full, const st
|
|||
auto configFile = folder/fs::path("entities/"+name+".json");
|
||||
if (fs::exists(configFile)) loadEntity(def, full, configFile);
|
||||
|
||||
auto scriptfile = folder/fs::path("scripts/"+def.scriptName+".lua");
|
||||
auto scriptfile = folder/fs::path("scripts/components/"+def.scriptName+".lua");
|
||||
if (fs::is_regular_file(scriptfile)) {
|
||||
scripting::load_entity_script(env, def, scriptfile);
|
||||
scripting::load_entity_component(env, def, scriptfile);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue