Differences From
Artifact [76e0104e11]:
88 88 minetest.register_craftitem(id, {
89 89 short_description = e.name;
90 90 description = starlit.ui.tooltip {
91 91 title = e.name;
92 92 desc = e.desc;
93 93 props = props;
94 94 };
95 + stack_max = e.max or (e.mass and math.min(math.max(math.floor(500 / e.mass), 1), 500)) or 10;
95 96 inventory_image = e.img;
96 97 on_place = function(stack, luser, point)
97 98 local node = minetest.get_node(point.under)
98 99 local function tryBuild()
99 100 local p = B.path[node.name]
100 101 if not p then return nil end
101 102 if (not p.part) or (not p.part[id]) then return nil end
................................................................................
176 177 local grp = e.groups and table.copy(e.groups) or {}
177 178 grp.stage = 1
178 179 minetest.register_node(id, {
179 180 description = 'Construction';
180 181 drawtype = (e.box and 'nodebox')
181 182 or (e.mesh and 'mesh')
182 183 or 'regular';
183 - paramtype = (e.box or e.mesh or e.light) and 'light' or nil;
184 - paramtype2 = e.stateful or 'none';
184 + paramtype = e.paramtype or (e.box or e.mesh or e.light) and 'light' or nil;
185 + paramtype2 = e.paramtype2 or 'none';
185 186 tiles = e.tex;
186 187 node_box = e.box;
187 188 mesh = e.mesh;
188 189 groups = grp;
189 190 _starlit = {
190 191 stage = id;
192 + recover = e.recover;
191 193 };
192 194 })
193 195 if e.begin then
194 196 for _, kind in ipairs {'part', 'tool'} do
195 197 for i, v in ipairs(e.begin[kind] or {}) do
196 198 assert(B.begin[kind][v] == nil, 'attempted to overwrite buildpath beginning')
197 199 B.begin[kind][v] = id
................................................................................
205 207 end
206 208 end
207 209 end
208 210 end)
209 211
210 212
211 213 starlit.include 'parts'
212 -starlit.include 'stages'
214 +starlit.include 'stages/arch'