sorcery  Diff

Differences From Artifact [41529558e5]:

  • File recipes.lua — part of check-in [3f6a913e4e] at 2020-09-29 12:40:28 on branch trunk — * remove former hacky registration system, replace with consistent and flexible API; rewrite metal/gem generation to take advantage of this new API; tweaks to init system to enable world-local tweaks to lore and sorcery behavior * initial documentation commit * initial steps towards calendar - add default date format, astrolabe; prepare infra for division/melding/transmutation spells, various tweaks and fixes (user: lexi, size: 20879) [annotate] [blame] [check-ins using]

To Artifact [ef0242a63b]:

  • File recipes.lua — part of check-in [ea6e475e44] at 2020-10-19 09:52:11 on branch trunk — continue dev on celestial mechanics, add melding+division spells (resonance), refine itemclasses, add keypunch and punchcards, add paper pulp, add a shitload of visuals, add convenience scripts for working with the wiki, make the flamebolt spell actually useful instead of just a pretty lightshow, add essences, inferno crystal, and other goodies; iterate on wands, lots of shit i can't remember, various bugfixes (user: lexi, size: 21421) [annotate] [blame] [check-ins using]

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
...
186
187
188
189
190
191
192

193
194
195
196
197
198
199
...
205
206
207
208
209
210
211

212
213
214
215
216
217
218
...
223
224
225
226
227
228
229

230
231
232
233
234
235
236
...
391
392
393
394
395
396
397
398






















































399
400
401
402
403

404
405
406
407
408
409
410
411

412
413
414
415
416
417
418
419

420
421
422
423
424
425
426
427

428
429
430
431
432
433
434
435

436
437
438
439
440
441
442
443

444
445
446
447
448
449
450
451

452
453
454
455
456
457
458
459

460
461
462
463
464
465
466
467

468
469
470
471
472
473
474
475

476
477















478
479
480
481
482
483
484
...
690
691
692
693
694
695
696

































697
698
699
700
701
702
703
	};
	output = 'basic_materials:plastic_strip 3';
	replacements = {
		{'group:scissors','group:scissors'};
	};
}

--[[
minetest.register_craft {
	type = "shapeless";
	recipe = {
		"farming:mortar_pestle",
		"farming:sugar",
		"group:food_blueberries",
		"group:food_raspberries",
		"sorcery:extract_wheat",
		"sorcery:extract_wheat",
		"xdecor:bowl"
	};
	output = "sorcery:oil_mystic";
	replacements = {
		{ "farming:mortar_pestle", "farming:mortar_pestle" },
		{ "sorcery:extract_wheat", "vessels:glass_bottle" },
		{ "sorcery:extract_wheat", "vessels:glass_bottle" }
	};
}

minetest.register_craft {
	type = "shapeless";
	recipe = {
		"farming:mortar_pestle",
		"group:food_berry",
		"group:food_berry",
		"group:food_berry",
		"xdecor:bowl"
	};
	output = "sorcery:oil_berry";
	replacements = {
		{ "farming:mortar_pestle", "farming:mortar_pestle" }
	};
}

minetest.register_craft {
	type = "shapeless";
	recipe = {
		"farming:mortar_pestle",
		"group:food_mushroom",
		"group:food_mushroom",
		"group:food_mushroom",
		"xdecor:bowl"
	};
	output = "sorcery:oil_mushroom";
	replacements = {
		{ "farming:mortar_pestle", "farming:mortar_pestle" }
	};
}
]]
--[[
minetest.register_craft {
	type = "shapeless";
	recipe = {
		"farming:mixing_bowl",
		"sorcery:grease_pine",
		"sorcery:extract_cotton",
		"sorcery:extract_cotton",
		"sorcery:extract_cotton"
	};
	output = "sorcery:oil_whisper";
	replacements = {
		{'farming:mixing_bowl', 'farming:mixing_bowl'};
		{'sorcery:extract_cotton', 'vessels:glass_bottle'};
		{'sorcery:extract_cotton', 'vessels:glass_bottle'};
		{'sorcery:extract_cotton', 'vessels:glass_bottle'};
	};
}

minetest.register_craft {
	type = "shapeless";
	recipe = {
		"farming:mixing_bowl";
		"sorcery:oil_whisper";
		"sorcery:pine_grease";
		"sorcery:extract_rye";
		"sorcery:extract_rye";
		"sorcery:extract_barley";
		"farming:salt";
	};
	output = "sorcery:oil_wind 2";
	replacements = {
		{'farming:mixing_bowl', 'farming:mixing_bowl'};
		{'sorcery:extract_rye', 'vessels:glass_bottle'};
		{'sorcery:extract_rye', 'vessels:glass_bottle'};
		{'sorcery:extract_barley', 'vessels:glass_bottle'};
	};
}

minetest.register_craft {
	type = 'shapeless';
	recipe = {
		"farming:mixing_bowl";
		'sorcery:oil_fog';
		'sorcery:oil_wind';
		'sorcery:blood';
		'sorcery:blood';
		'sorcery:blood';
	};
	output = 'sorcery:grease_storm 2';
	replacements = {
		{'farming:mixing_bowl', 'farming:mixing_bowl'};
		{'sorcery:blood', 'vessels:glass_bottle' }
	}
}

minetest.register_craft {
	type = "shapeless";
	recipe = {
		"farming:mixing_bowl";
		'sorcery:extract_rice',
		'sorcery:oil_berry',
	};
	output = 'sorcery:oil_fog';
	replacements = {
		{'farming:mixing_bowl', 'farming:mixing_bowl'};
		{ 'sorcery:extract_rice', 'vessels:glass_bottle' }
	};
}
]]

minetest.register_craft {
	recipe = {
		{"", "default:gold_ingot"},
		{"default:bronze_ingot",""}
	};
	output = "sorcery:dagger";
}
................................................................................

-- infuser
minetest.register_craftitem('sorcery:infuser_tube', {
	inventory_image = 'sorcery_infuser_tube.png';
	description = 'Infusion Tube';
	groups = {
		sorcery_magitech = 1; metal = 1;

	};
})
minetest.register_craft {
	recipe = {
		{"basic_materials:copper_strip",'sorcery:infuser_concentrator', "basic_materials:copper_strip"};
		{"", "basic_materials:copper_strip", "basic_materials:gold_wire"};
		{"", "basic_materials:copper_strip", ""};
................................................................................
}

minetest.register_craftitem('sorcery:infuser_chamber', {
	inventory_image = 'sorcery_infuser_chamber.png';
	description = 'Infusion Chamber';
	groups = {
		sorcery_magitech = 1;

	};
})
minetest.register_craft {
	recipe = {
		{'default:clay_brick','sorcery:grease_sealant','default:clay_brick'};
		{'default:clay_brick','stairs:slab_steelblock','default:clay_brick'};
	};
................................................................................
}

minetest.register_craftitem('sorcery:infuser_concentrator', {
	inventory_image = 'sorcery_infuser_concentrator.png';
	description = 'Infusion Concentrator';
	groups = {
		sorcery_magitech = 1;

	};
})

minetest.register_craft {
	recipe = {
		{'basic_materials:steel_wire'};
		{'default:obsidian_shard'};
................................................................................
	output = 'sorcery:gravitator_off';
	recipe = {
		{'sorcery:platinum_ingot','basic_materials:plastic_sheet','sorcery:platinum_ingot'};
		{'xpanes:pane_flat','sorcery:gravity_manipulator','basic_materials:plastic_sheet'};
		{'sorcery:platinum_ingot','basic_materials:plastic_sheet','sorcery:platinum_ingot'};
	};
}























































minetest.register_craftitem('sorcery:gravity_manipulator', {
	description = 'Gravity Manipulator';
	inventory_image = 'sorcery_gravity_manipulator.png';
	groups = {
		sorcery_magitech = 1;

	};
})

minetest.register_craftitem('sorcery:tuning_disc',{
	description = 'Tuning Disc';
	inventory_image = 'sorcery_tuning_disc.png';
	groups = {
		sorcery_magitech = 1; metal = 1;

	};
});

minetest.register_craftitem('sorcery:core_counterpraxic',{
	description = 'Counterpraxis Core';
	inventory_image = 'sorcery_core_counterpraxic.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;

	};
});

minetest.register_craftitem('sorcery:core_mandatic',{
	description = 'Mandatic Core';
	inventory_image = 'sorcery_core_mandatic.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;

	};
});

minetest.register_craftitem('sorcery:core_syncretic',{
	description = 'Syncresis Core';
	inventory_image = 'sorcery_core_syncretic.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;

	};
});

minetest.register_craftitem('sorcery:suppression_matrix',{
	description = 'Suppression Matrix';
	inventory_image = 'sorcery_suppression_matrix.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;

	};
});

minetest.register_craftitem('sorcery:inverter_coil',{
	description = 'Inverter Coil';
	inventory_image = 'sorcery_inverter_coil.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;

	};
});

minetest.register_craftitem('sorcery:beam_generator',{
	description = 'Beam Generator';
	inventory_image = 'sorcery_beam_generator.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;

	};
});

minetest.register_craftitem('sorcery:leyline_stabilizer',{
	description = 'Leyline Stabilizer';
	inventory_image = 'sorcery_leyline_stabilizer.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;

	};
});

minetest.register_craftitem('sorcery:field_emitter',{
	description = 'Field Emitter';
	inventory_image = 'sorcery_field_emitter.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;

	};
})
















minetest.register_craft {
	output = 'sorcery:leyline_stabilizer';
	recipe = {
		{'basic_materials:copper_wire','group:sorcery_ley_cable','basic_materials:copper_wire'};
		{'sorcery:grease_neutralizing','group:sorcery_ley_cable','sorcery:grease_neutralizing'};
		{'basic_materials:copper_wire','group:sorcery_ley_cable','basic_materials:copper_wire'};
................................................................................
		{'xpanes:pane_flat', 'basic_materials:copper_wire', 'xpanes:pane_flat'};
	};
	replacements = {
		{'basic_materials:copper_wire', 'basic_materials:empty_spool'};
	};
	output = 'morelights:bulb 4';
}


































local potion_auto_recipe = function(id, substance, tools, container)
	local recipe = tools
	local replace = {}
	local batches = 1
	for _,v in pairs(tools) do
		replace[#replace + 1] = {v,v}







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







>







 







>







 







>







 








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





>








>








>








>








>








>








>








>








>








>


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







49
50
51
52
53
54
55

























































































































56
57
58
59
60
61
62
..
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
..
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
...
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
...
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
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
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
...
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
	};
	output = 'basic_materials:plastic_strip 3';
	replacements = {
		{'group:scissors','group:scissors'};
	};
}


























































































































minetest.register_craft {
	recipe = {
		{"", "default:gold_ingot"},
		{"default:bronze_ingot",""}
	};
	output = "sorcery:dagger";
}
................................................................................

-- infuser
minetest.register_craftitem('sorcery:infuser_tube', {
	inventory_image = 'sorcery_infuser_tube.png';
	description = 'Infusion Tube';
	groups = {
		sorcery_magitech = 1; metal = 1;
		sorcery_tech_component = 1;
	};
})
minetest.register_craft {
	recipe = {
		{"basic_materials:copper_strip",'sorcery:infuser_concentrator', "basic_materials:copper_strip"};
		{"", "basic_materials:copper_strip", "basic_materials:gold_wire"};
		{"", "basic_materials:copper_strip", ""};
................................................................................
}

minetest.register_craftitem('sorcery:infuser_chamber', {
	inventory_image = 'sorcery_infuser_chamber.png';
	description = 'Infusion Chamber';
	groups = {
		sorcery_magitech = 1;
		sorcery_tech_component = 1;
	};
})
minetest.register_craft {
	recipe = {
		{'default:clay_brick','sorcery:grease_sealant','default:clay_brick'};
		{'default:clay_brick','stairs:slab_steelblock','default:clay_brick'};
	};
................................................................................
}

minetest.register_craftitem('sorcery:infuser_concentrator', {
	inventory_image = 'sorcery_infuser_concentrator.png';
	description = 'Infusion Concentrator';
	groups = {
		sorcery_magitech = 1;
		sorcery_tech_component = 1;
	};
})

minetest.register_craft {
	recipe = {
		{'basic_materials:steel_wire'};
		{'default:obsidian_shard'};
................................................................................
	output = 'sorcery:gravitator_off';
	recipe = {
		{'sorcery:platinum_ingot','basic_materials:plastic_sheet','sorcery:platinum_ingot'};
		{'xpanes:pane_flat','sorcery:gravity_manipulator','basic_materials:plastic_sheet'};
		{'sorcery:platinum_ingot','basic_materials:plastic_sheet','sorcery:platinum_ingot'};
	};
}

minetest.register_craft {
	output = 'sorcery:powder_firestorm 4';
	type = 'shapeless';
	recipe = {
		'sorcery:powder_lithium', 'sorcery:powder_lithium';
		'sorcery:powder_silver';
		'basic_materials:oil_extract';
		'sorcery:flame_oil';
		'tnt:gunpowder';
		'farming:mixing_bowl';
	};
	replacements = {
		{'sorcery:flame_oil', 'xdecor:bowl'};
		{'farming:mixing_bowl', 'farming:mixing_bowl'};
	};
}

for _,e in pairs{'flame','frost','force'} do
	minetest.register_craftitem('sorcery:essence_'..e, {
		description = sorcery.lib.str.capitalize(e) .. ' Essence';
		inventory_image = 'sorcery_essence_'..e..'.png';
		group = { sorcery_elemental_essence = 1 };
	})
end

minetest.register_craftitem('sorcery:inferno_crystal', {
	-- made with melding wand from ruby, lithium ingot, and gunpowder
	-- under sign of the wyvern or the winged serpent
	inventory_image = 'sorcery_inferno_crystal.png';
	description = 'Inferno Crystal';
})

minetest.register_craftitem('sorcery:powder_firestorm', {
	inventory_image = 'sorcery_powder_firestorm.png';
	description = 'Firestorm Powder';
})

minetest.register_craft {
	type = 'fuel', burntime = 8 * 15;
	recipe = 'sorcery:powder_firestorm';
};

minetest.register_craft {
	type = 'fuel', burntime = 8 * 85;
	recipe = 'sorcery:inferno_crystal';
	replacement = {{'sorcery:inferno_crystal', 'sorcery:shard_ruby 6'}};
};

minetest.register_craftitem('sorcery:essence_flame', {
	inventory_image = 'sorcery_essence_flame.png';
	description = 'Flame Essence';
})


minetest.register_craftitem('sorcery:gravity_manipulator', {
	description = 'Gravity Manipulator';
	inventory_image = 'sorcery_gravity_manipulator.png';
	groups = {
		sorcery_magitech = 1;
		sorcery_tech_component = 1;
	};
})

minetest.register_craftitem('sorcery:tuning_disc',{
	description = 'Tuning Disc';
	inventory_image = 'sorcery_tuning_disc.png';
	groups = {
		sorcery_magitech = 1; metal = 1;
		sorcery_tech_component = 1;
	};
});

minetest.register_craftitem('sorcery:core_counterpraxic',{
	description = 'Counterpraxis Core';
	inventory_image = 'sorcery_core_counterpraxic.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
		sorcery_tech_component = 1;
	};
});

minetest.register_craftitem('sorcery:core_mandatic',{
	description = 'Mandatic Core';
	inventory_image = 'sorcery_core_mandatic.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
		sorcery_tech_component = 1;
	};
});

minetest.register_craftitem('sorcery:core_syncretic',{
	description = 'Syncresis Core';
	inventory_image = 'sorcery_core_syncretic.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
		sorcery_tech_component = 1;
	};
});

minetest.register_craftitem('sorcery:suppression_matrix',{
	description = 'Suppression Matrix';
	inventory_image = 'sorcery_suppression_matrix.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
		sorcery_tech_component = 1;
	};
});

minetest.register_craftitem('sorcery:inverter_coil',{
	description = 'Inverter Coil';
	inventory_image = 'sorcery_inverter_coil.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
		sorcery_tech_component = 1;
	};
});

minetest.register_craftitem('sorcery:beam_generator',{
	description = 'Beam Generator';
	inventory_image = 'sorcery_beam_generator.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
		sorcery_tech_component = 1;
	};
});

minetest.register_craftitem('sorcery:leyline_stabilizer',{
	description = 'Leyline Stabilizer';
	inventory_image = 'sorcery_leyline_stabilizer.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
		sorcery_tech_component = 1;
	};
});

minetest.register_craftitem('sorcery:field_emitter',{
	description = 'Field Emitter';
	inventory_image = 'sorcery_field_emitter.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
		sorcery_tech_component = 1;
	};
})

--- possible other components
-- felicitator
-- flux rectifier
-- flux suppressor
-- flux amplifier
-- tacit web
-- radiatic filament
-- radia transducer
-- transductive coil
-- affine macerator
-- state extender
-- state disruptor
-- axial dispulsor
-- aether coruscator

minetest.register_craft {
	output = 'sorcery:leyline_stabilizer';
	recipe = {
		{'basic_materials:copper_wire','group:sorcery_ley_cable','basic_materials:copper_wire'};
		{'sorcery:grease_neutralizing','group:sorcery_ley_cable','sorcery:grease_neutralizing'};
		{'basic_materials:copper_wire','group:sorcery_ley_cable','basic_materials:copper_wire'};
................................................................................
		{'xpanes:pane_flat', 'basic_materials:copper_wire', 'xpanes:pane_flat'};
	};
	replacements = {
		{'basic_materials:copper_wire', 'basic_materials:empty_spool'};
	};
	output = 'morelights:bulb 4';
}

local auxdyes = {
	[{'vidrium','iridium','vidrium'}]= 'violet';
	[{'iridium','vidrium','iridium'}]= 'mulberry';
	[{'cobalt','iridium','cobalt'}  ]= 'magenta';
	[{'iridium','cobalt','iridium'} ]= 'fuchsia';
	[{'iridium','gold','iridium'}   ]= 'rose';
	[{'iridium','copper','iridium'} ]= 'crimson';
	[{'aluminum','tin','aluminum'}  ]= 'pink';
	[{'copper','gold','copper'}     ]= 'orange';
	[{'bronze','gold','bronze'}     ]= 'amber';
	[{'bronze','copper','bronze'}   ]= 'brown';
	[{'vidrium','gold','vidrium'}   ]= 'lime';
	[{'vidrium','cobalt','vidrium'} ]= 'cerulean';
	[{'vidrium','cobalt','levitanium'}] = 'azure';
}

for metals,color in pairs(auxdyes) do
	local dye = 'dye:' .. color
	if minetest.registered_items[dye] then
		local pd = {} for i=1,3 do
			pd[i] = sorcery.data.metals[metals[i]].parts.powder
		end
		minetest.register_craft {
			output = dye .. ' 4';
			recipe = {
				{'',    pd[2],                     ''};
				{pd[1],'basic_materials:paraffin', pd[3]};
				{'',   'bucket:bucket_water',      ''};
			};
		}
	end
end

local potion_auto_recipe = function(id, substance, tools, container)
	local recipe = tools
	local replace = {}
	local batches = 1
	for _,v in pairs(tools) do
		replace[#replace + 1] = {v,v}