fix entity component script source path in lua traceback
This commit is contained in:
@@ -814,7 +814,7 @@ void ContentLoader::load() {
|
|||||||
scripting::load_entity_component(
|
scripting::load_entity_component(
|
||||||
name,
|
name,
|
||||||
file,
|
file,
|
||||||
pack->id + ":scripts/components/" + file.stem().u8string()
|
pack->id + ":scripts/components/" + file.filename().u8string()
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -700,7 +700,7 @@ void scripting::load_entity_component(
|
|||||||
auto L = lua::get_main_state();
|
auto L = lua::get_main_state();
|
||||||
std::string src = files::read_string(file);
|
std::string src = files::read_string(file);
|
||||||
logger.info() << "script (component) " << file.u8string();
|
logger.info() << "script (component) " << file.u8string();
|
||||||
lua::loadbuffer(L, 0, src, "C!" + name);
|
lua::loadbuffer(L, 0, src, fileName);
|
||||||
lua::store_in(L, lua::CHUNKS_TABLE, name);
|
lua::store_in(L, lua::CHUNKS_TABLE, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user