flags |= SCHEM_CIDS_UPDATED;
- for (int i = 0; i != size.X * size.Y * size.Z; i++)
+ for (size_t i = 0; i != size.X * size.Y * size.Z; i++)
schemdata[i].setContent(c_nodes[schemdata[i].getContent()]);
}
lua_getfield(L, index, "on_rightclick");
f.rightclickable = lua_isfunction(L, -1);
lua_pop(L, 1);
-
+
/* Name */
getstringfield(L, index, "name", f.name);
//// Get schematic data
lua_getfield(L, index, "data");
luaL_checktype(L, -1, LUA_TTABLE);
-
+
int numnodes = size.X * size.Y * size.Z;
MapNode *schemdata = new MapNode[numnodes];
int i = 0;
schemdata[i] = MapNode(ndef, name, param1, param2);
}
-
+
i++;
lua_pop(L, 1);
}
}
}
- schem->flags = 0;
+ // Here, we read the nodes directly from the INodeDefManager - there is no
+ // need for pending node resolutions so we'll mark this schematic as updated
+ schem->flags = SCHEM_CIDS_UPDATED;
+
schem->size = size;
schem->schemdata = schemdata;
schem->slice_probs = slice_probs;