add required components check

This commit is contained in:
MihailRis 2026-07-26 15:57:41 +03:00
parent 28385f236c
commit ea0d23831f
3 changed files with 17 additions and 2 deletions

View file

@ -744,9 +744,10 @@ void scripting::load_entity_component(
const io::path& file,
const std::string& fileName
) {
logger.info() << "script (component) " << file.string();
auto L = lua::get_main_state();
std::string src = io::read_string(file);
logger.info() << "script (component) " << file.string();
lua::loadbuffer(L, *env, src, fileName);
lua::store_in_registry(L, lua::CHUNKS_TABLE, name);
}