static int l_csys_add_to_sector(lua_State *L) { CustomSystem **csptr = l_csys_check_ptr(L, 1); int x = luaL_checkinteger(L, 2); int y = luaL_checkinteger(L, 3); int z = luaL_checkinteger(L, 4); const vector3d *v = LuaVector::CheckFromLua(L, 5); (*csptr)->sectorX = x; (*csptr)->sectorY = y; (*csptr)->sectorZ = z; (*csptr)->pos = vector3f(*v); //Output("l_csys_add_to_sector: %s added to %d, %d, %d\n", (*csptr)->name.c_str(), x, y, z); s_activeCustomSystemsDatabase->AddCustomSystem(SystemPath(x, y, z), *csptr); *csptr = 0; return 0; }
static int l_csys_add_to_sector(lua_State *L) { CustomSystem **csptr = l_csys_check_ptr(L, 1); int x = luaL_checkinteger(L, 2); int y = luaL_checkinteger(L, 3); int z = luaL_checkinteger(L, 4); const vector3d *v = LuaVector::CheckFromLua(L, 5); (*csptr)->sectorX = x; (*csptr)->sectorY = y; (*csptr)->sectorZ = z; (*csptr)->pos = vector3f(*v); //printf("l_csys_add_to_sector: %s added to %d, %d, %d\n", (*csptr)->name.c_str(), x, y, z); s_sectorMap[SystemPath(x, y, z)].push_back(*csptr); *csptr = 0; return 0; }
static CustomSystem *l_csys_check(lua_State *L, int idx) { return *l_csys_check_ptr(L, idx); }