update component 'ARGS' variable default value

This commit is contained in:
MihailRis
2024-07-30 19:52:04 +03:00
parent a2f79e979e
commit 10fa828bd7
3 changed files with 5 additions and 3 deletions
+5 -1
View File
@@ -334,9 +334,13 @@ void scripting::on_entity_spawn(
util::replaceAll(compfieldname, ":", "__");
if (auto datamap = args->map(compfieldname)) {
lua::pushvalue(L, datamap);
lua::setfield(L, "ARGS");
} else {
lua::createtable(L, 0, 0);
}
} else {
lua::createtable(L, 0, 0);
}
lua::setfield(L, "ARGS");
if (saved == nullptr) {
lua::createtable(L, 0, 0);