Add sim.CELL constant + some other change I made a while ago for some reason

This commit is contained in:
jacob1 2019-05-15 00:21:08 -04:00
parent c193e88c28
commit 20c98e9b48
2 changed files with 2 additions and 1 deletions

View File

@ -1369,7 +1369,7 @@ int luatpt_getscript(lua_State* l)
return luaL_error(l, http::StatusText(ret).ToUtf8().c_str());
}
if (!strcmp(scriptData.c_str(), "Invalid script ID\r\n"))
if (scriptData.Contains("Invalid script ID"))
{
return luaL_error(l, "Invalid Script ID");
}

View File

@ -789,6 +789,7 @@ void LuaScriptInterface::initSimulationAPI()
//Static values
SETCONST(l, XRES);
SETCONST(l, YRES);
SETCONST(l, CELL);
SETCONST(l, PT_NUM);
lua_pushinteger(l, 0); lua_setfield(l, -2, "NUM_PARTS");
SETCONST(l, R_TEMP);