27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
...
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
...
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
...
325
326
327
328
329
330
331
332
333
334
335
336
337
338
|
}
end
paperburn('default:paper',1) paperburn('sorcery:recipe',1)
paperburn('default:book',3) paperburn('sorcery:cookbook',3)
paperburn('default:book_written',3)
minetest.register_craft {
type = "shapeless";
recipe = {"default:book_written", "bucket:bucket_water"};
output = "default:book";
replacements = {
{"bucket:bucket_water", "bucket:bucket_empty"}
}
}
minetest.register_craft {
type = 'shapeless';
recipe = {"default:book_written", "dye:black"};
output = 'default:book_written';
}
................................................................................
{metal.parts.fragment,''};
};
}
end
end
end
for _,name in pairs {
'bronze', 'steel', 'aluminum', 'tungsten', 'iridium'
} do -- :/
local metal = sorcery.data.metals[name]
local id = 'sorcery:scissors_' .. name
minetest.register_tool(id, {
description = sorcery.lib.str.capitalize(name) .. ' Scissors';
inventory_image = 'sorcery_scissors_' .. name .. '.png';
groups = { crafttool = metal.hardness * 15; scissors = 1 };
tool_capabilities = {
full_punch_interval = 1.5;
................................................................................
};
};
damage_groups = { fleshy = 1; };
};
_sorcery = {
material = {
metal = true, data = metal, name = name;
grindvalue = 3;
};
recipe = {
note = "An editor's best friend";
};
};
})
local frag = metal.parts.fragment;
local screw = metal.parts.screw;
local ingot = metal.parts.ingot;
minetest.register_craft {
output = id;
recipe = {
{frag,'screwdriver:screwdriver',frag};
{'basic_materials:plastic_strip',screw,'basic_materials:plastic_strip'};
{ingot,'',ingot};
};
replacements = {
{'screwdriver:screwdriver', 'screwdriver:screwdriver'};
};
}
end
-- the writing stand node allows books to be modified
-- in more complex ways than just inserting pages
local ws_props = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
................................................................................
local wsbox = {
type = 'fixed';
fixed = {
-0.5, -0.5, -0.43;
0.5, 0.05, 0.43;
};
}
minetest.register_node('sorcery:writing_stand', {
description = 'Writing Stand';
drawtype = 'mesh';
mesh = 'sorcery-writing-stand.obj';
sunlight_propagates = true;
paramtype = 'light';
|
|
|
>
|
>
>
|
|
|
<
<
>
>
>
|
<
|
>
|
>
>
>
|
<
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
...
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
...
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
...
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
|
}
end
paperburn('default:paper',1) paperburn('sorcery:recipe',1)
paperburn('default:book',3) paperburn('sorcery:cookbook',3)
paperburn('default:book_written',3)
-- minetest.register_craft {
-- type = "shapeless";
-- recipe = {
-- "default:book_written";
-- "bucket:bucket_water", 'sorcery:erasure_fluid';
-- };
-- output = "default:book";
-- replacements = {
-- {"bucket:bucket_water", "bucket:bucket_empty"};
-- {'sorcery:erasure_fluid', 'vessels:glass_bottle'};
-- }
-- }
minetest.register_craft {
type = 'shapeless';
recipe = {"default:book_written", "dye:black"};
output = 'default:book_written';
}
................................................................................
{metal.parts.fragment,''};
};
}
end
end
end
sorcery.register.metals.foreach('sorcery:mkscissors',{'sorcery:generate'},function(name,metal)
local oklist = { -- :/
bronze=true, steel=true, aluminum=true;
tungsten=true, iridium=true
} -- TODO: moar art
if not oklist[name] then return end
local id = 'sorcery:scissors_' .. name
minetest.register_tool(id, {
description = sorcery.lib.str.capitalize(name) .. ' Scissors';
inventory_image = 'sorcery_scissors_' .. name .. '.png';
groups = { crafttool = metal.hardness * 15; scissors = 1 };
tool_capabilities = {
full_punch_interval = 1.5;
................................................................................
};
};
damage_groups = { fleshy = 1; };
};
_sorcery = {
material = {
metal = true, data = metal, name = name;
grindvalue = 4;
};
recipe = {
note = "An editor's best friend";
};
};
})
local frag = metal.parts.fragment;
local screw = metal.parts.screw;
minetest.register_craft {
output = id;
recipe = {
{frag,'screwdriver:screwdriver',frag};
{'basic_materials:plastic_strip',screw,'basic_materials:plastic_strip'};
{frag,'',frag};
};
replacements = {
{'screwdriver:screwdriver', 'screwdriver:screwdriver'};
};
}
end)
sorcery.register.metals.foreach('create cutting recipes',{'sorcery:mkscissors'}, function(name,metal)
local sc = 'sorcery:scissors_' .. name
local mkcut = function(item,out)
minetest.register_craft {
output = out, type = 'shapeless';
recipe = {item,sc}, replacements = {{sc,sc}};
}
end
if minetest.registered_items[sc] then
mkcut('default:paper','sorcery:punchcard_blank 2')
mkcut('default:book','default:paper 3')
end
end)
-- the writing stand node allows books to be modified
-- in more complex ways than just inserting pages
local ws_props = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
................................................................................
local wsbox = {
type = 'fixed';
fixed = {
-0.5, -0.5, -0.43;
0.5, 0.05, 0.43;
};
}
minetest.register_craftitem('sorcery:pulp', {
description = 'Pulp';
inventory_image = 'sorcery_pulp.png';
group = {flammable = 1};
})
minetest.register_craftitem('sorcery:pulp_inky', {
description = 'Inky Pulp';
inventory_image = 'sorcery_pulp_inky.png';
group = {flammable = 1};
})
minetest.register_craft {
output = 'sorcery:pulp 6';
type = 'shapeless';
recipe = {
'bucket:bucket_water', 'sorcery:erasure_fluid';
'sorcery:pulp_inky'; 'sorcery:pulp_inky'; 'sorcery:pulp_inky';
'sorcery:pulp_inky'; 'sorcery:pulp_inky'; 'sorcery:pulp_inky';
};
replacements = {
{'sorcery:erasure_fluid', 'vessels:glass_bottle'};
{'bucket:bucket_water', 'bucket:bucket_empty'};
};
}
minetest.register_craft {
output = 'sorcery:punchcard_blank';
type = 'cooking';
recipe = 'sorcery:pulp';
cooktime = 6;
}
minetest.register_craftitem('sorcery:pulp_sheet', {
description = 'Pulp Sheet';
inventory_image = 'sorcery_pulp_sheet.png';
groups = {flammable = 1};
})
minetest.register_craft {
output = 'default:paper';
type = 'cooking';
recipe = 'sorcery:pulp_sheet';
cooktime = 8;
}
minetest.register_craft {
output = 'sorcery:pulp_sheet 2';
recipe = {
{'sorcery:pulp', 'sorcery:pulp'};
{'sorcery:pulp', 'sorcery:pulp'};
};
}
minetest.register_node('sorcery:writing_stand', {
description = 'Writing Stand';
drawtype = 'mesh';
mesh = 'sorcery-writing-stand.obj';
sunlight_propagates = true;
paramtype = 'light';
|