Improvements to the pretty-printer

This commit is contained in:
2021-11-26 12:28:59 -05:00
parent 63bca62edd
commit c02109699e
7 changed files with 75 additions and 52 deletions

View File

@@ -188,7 +188,11 @@ LuaDefine(tangible_id, "c") {
LuaArg tanobj;
LuaRet id;
LuaStack LS(L, tanobj, id);
LS.set(id, World::tangible_id(LS, tanobj));
int64_t tid = LS.tanid(tanobj);
if (tid == 0) {
luaL_error(L, "Not a tangible");
}
LS.set(id, tid);
return LS.result();
}