mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-22 18:39:46 +00:00
cleanup
This commit is contained in:
parent
c64659e06d
commit
08d9c843f8
1 changed files with 1 additions and 4 deletions
|
|
@ -70,10 +70,7 @@ static int l_get_def(lua::State* L) {
|
||||||
|
|
||||||
static int l_spawn(lua::State* L) {
|
static int l_spawn(lua::State* L) {
|
||||||
auto level = controller->getLevel();
|
auto level = controller->getLevel();
|
||||||
auto defname = lua::tostring(L, 1);
|
auto defname = lua::require_string(L, 1);
|
||||||
if (defname == nullptr) {
|
|
||||||
throw std::runtime_error("string expected, got nil");
|
|
||||||
}
|
|
||||||
auto& def = content->entities.require(defname);
|
auto& def = content->entities.require(defname);
|
||||||
auto pos = lua::tovec3(L, 2);
|
auto pos = lua::tovec3(L, 2);
|
||||||
dv::value args = nullptr;
|
dv::value args = nullptr;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue