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