This commit is contained in:
Astazium 2026-06-01 21:18:33 +03:00
parent 0104585e10
commit 77d9ca1d86
2 changed files with 5 additions and 2 deletions

View file

@ -62,6 +62,9 @@ static int l_get_def(lua::State* L) {
static int l_spawn(lua::State* L) {
auto level = controller->getLevel();
auto defname = lua::tostring(L, 1);
if (defname == nullptr) {
throw std::runtime_error("empty string");
}
auto& def = content->entities.require(defname);
auto pos = lua::tovec3(L, 2);
dv::value args = nullptr;