sorcery  Check-in [0c88d214a8]

Overview
Comment:amulets are now made via powder intaglio
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0c88d214a8730ff78ca6f418e0e632f9004ce275c20e9d1aae00205c9674e808
User & Date: lexi on 2021-07-22 20:26:49
Other Links: manifest | tags
Context
2021-07-23
19:33
add shelter spell check-in: 65ce625814 user: lexi tags: trunk
2021-07-22
20:26
amulets are now made via powder intaglio check-in: 0c88d214a8 user: lexi tags: trunk
2021-07-14
15:42
add displacer sound effects, tweak astrolabe recipe to use new crafting items check-in: 67cefa38df user: lexi tags: trunk
Changes

Modified data/gems.lua from [bb2fee6e3c] to [003de48cde].

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
			{affinity = {'cognic'}, confluence = 1};
			{affinity = {'syncretic'}, confluence = 0.9};
		};
	};
	luxite = {
		tone = {189,255,236};
		rarity = 130;

	};
	ruby = {
		tone = {255,94,161};

		rarity = 150;
	};
	amethyst = {
		tone = {234,94,255};

		rarity = 190;
	};
	sapphire = {
		tone = {94,139,255};
		rarity = 260;

		wandprops = {
			sturdiness = 0.5;
			power = 2;
		};
	};
	emerald = {

		tone = {133,255,94};
		rarity = 320;
	};
}







>



>




>





>






>




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
			{affinity = {'cognic'}, confluence = 1};
			{affinity = {'syncretic'}, confluence = 0.9};
		};
	};
	luxite = {
		tone = {189,255,236};
		rarity = 130;
		hardness = 3;
	};
	ruby = {
		tone = {255,94,161};
		hardness = 5;
		rarity = 150;
	};
	amethyst = {
		tone = {234,94,255};
		hardness = 6;
		rarity = 190;
	};
	sapphire = {
		tone = {94,139,255};
		rarity = 260;
		hardness = 7;
		wandprops = {
			sturdiness = 0.5;
			power = 2;
		};
	};
	emerald = {
		hardness = 7;
		tone = {133,255,94};
		rarity = 320;
	};
}

Modified gems.lua from [266c01e80c] to [7d79adb54e].

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
...
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
				material = {
					gem = true, id = name, data = gem;
					value = (5 * shards_per_gem) + 4;
				};
				amulet = { base = name };
			};
		}) 






		sorcery.register.metals.foreach('sorcery:mk-amulet-frames-'..name,{'sorcery:generate'}, function(metalid,metal)
			if not metal.amulet then return end
			local framedid = string.format("%s_frame_%s", amuletname, metalid)
			local img_frame = img(string.format('sorcery_amulet_frame_%s.png',metalid))
			minetest.register_craftitem(framedid, {
				description = string.format("%s-framed %s amulet",sorcery.lib.str.capitalize(metalid), name);
				inventory_image = img_sparkle:blit(img_frame):blit(img_stone):render();
................................................................................
				wield_scale = { x = 0.6, y = 0.6, z = 0.6 };
				groups = { sorcery_amulet = 1 };
				on_use = useamulet;
				_sorcery = {
					amulet = { base = name, frame = metalid };
				};
			})
			local frag = metal.parts.fragment

			minetest.register_craft {
				output = framedid;
				recipe = {


					{'',  frag,''};
					{frag,amuletname,frag};
					{'',  frag,''};
				};
			}
		end)
	end
	minetest.register_craft {
		type = 'shapeless';
		recipe = (minetest.get_modpath('xdecor') and {
................................................................................
		recipe = {
			shardname, shardname, shardname;
			shardname, shardname, shardname;
			shardname, shardname, shardname;
		};
		output = itemname;
	};
	minetest.register_craft {
		recipe = {
			{shardname,itemname,shardname};
			{itemname,itemname,itemname};
			{shardname,itemname,shardname};
		};
		output = amuletname;
	};

	-- generate lenses and crafting recipes
	for _, kind in pairs { 'amplifier','rectifier','concave','convex' } do
		local id = 'sorcery:lens_' .. kind .. '_' .. name
		minetest.register_tool(id, {
			inventory_image = sorcery.lib.image('sorcery_lens_overlay_gold.png'):
				blit(sorcery.lib.image('sorcery_lens_' .. kind .. '.png'):







>
>
>
>
>
>







 







|
>



>
>
|
|
|







 







|
|
|
|
|
|
|
|







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
...
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
				material = {
					gem = true, id = name, data = gem;
					value = (5 * shards_per_gem) + 4;
				};
				amulet = { base = name };
			};
		}) 
		sorcery.lathe.register {
			input = itemname;
			output = amuletname;
			tech = 'intaglio';
			cost = 1;
		}
		sorcery.register.metals.foreach('sorcery:mk-amulet-frames-'..name,{'sorcery:generate'}, function(metalid,metal)
			if not metal.amulet then return end
			local framedid = string.format("%s_frame_%s", amuletname, metalid)
			local img_frame = img(string.format('sorcery_amulet_frame_%s.png',metalid))
			minetest.register_craftitem(framedid, {
				description = string.format("%s-framed %s amulet",sorcery.lib.str.capitalize(metalid), name);
				inventory_image = img_sparkle:blit(img_frame):blit(img_stone):render();
................................................................................
				wield_scale = { x = 0.6, y = 0.6, z = 0.6 };
				groups = { sorcery_amulet = 1 };
				on_use = useamulet;
				_sorcery = {
					amulet = { base = name, frame = metalid };
				};
			})
			--local frag = metal.parts.fragment
			local disc = metal.parts.disc
			minetest.register_craft {
				output = framedid;
				recipe = {
					{amuletname};
					{disc};
					-- {'',  frag,''};
					-- {frag,amuletname,frag};
					-- {'',  frag,''};
				};
			}
		end)
	end
	minetest.register_craft {
		type = 'shapeless';
		recipe = (minetest.get_modpath('xdecor') and {
................................................................................
		recipe = {
			shardname, shardname, shardname;
			shardname, shardname, shardname;
			shardname, shardname, shardname;
		};
		output = itemname;
	};
-- 	minetest.register_craft {
-- 		recipe = {
-- 			{shardname,itemname,shardname};
-- 			{itemname,itemname,itemname};
-- 			{shardname,itemname,shardname};
-- 		};
-- 		output = amuletname;
-- 	};

	-- generate lenses and crafting recipes
	for _, kind in pairs { 'amplifier','rectifier','concave','convex' } do
		local id = 'sorcery:lens_' .. kind .. '_' .. name
		minetest.register_tool(id, {
			inventory_image = sorcery.lib.image('sorcery_lens_overlay_gold.png'):
				blit(sorcery.lib.image('sorcery_lens_' .. kind .. '.png'):

Modified lathe.lua from [525693d594] to [2fbf5881b5].

1
2


3
4
5

6








7

8
9


10
11
12
13
14
15
16
..
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
..
55
56
57
58
59
60
61
62




63
64
65
66








67
68
69
70
71
72
73
...
216
217
218
219
220
221
222


223
224
225

226
227
228
229
230
231
232

233

234
235
236
237
238
239

240



241


242
243
244
245
246
247
248
-- the math basically needs to be rewritten from scratch by someone who isn't
-- dyscalculic but 


sorcery.lathe = {
	techs = {
		cut = {dmg = true};

		intaglio = {consume = true};








	};

	tools = {
		sword = 'cut', knife = 'cut', blade = 'cut';


	};
	recipes = {};
	register = function(def)
		local recipes = sorcery.lathe.recipes
		if not recipes[def.input] then recipes[def.input] = {} end
		local rs = recipes[def.input][def.tech]
		if not rs
................................................................................
			else rs[#rs+1] = def
		end
	end;
	register_metal = function(def)
		local parts = sorcery.data.metals[def.metal].parts
		local out = ItemStack(def.output)
		for _, ty in pairs {'ingot', 'block', 'fragment'} do
			local pt = parts[ty] 
			local ptc = sorcery.itemclass.get(pt, 'metal')
			if ptc and ptc.value then
				if def.mass <= ptc.value then
					local mass
					local vfc = ptc.value / def.mass
					if math.floor(vfc) ~= vfc then
						for i = 1, 50 do
................................................................................
					}
				end
			end
		end
	end;
	tooltech = function(tool)
		if type(tool) ~= 'string' then tool = tool:get_name() end
		for g,t in pairs(sorcery.lathe.tools) do




			if minetest.get_item_group(tool, g) ~= 0 then
				return t
			end
		end








	end;
}

local R = sorcery.lathe.recipes
sorcery.lathe.get = function(pos,idx,howmany)
	local inv = minetest.get_meta(pos):get_inventory()
	local tool = inv:get_stack('tool',1)
................................................................................

	allow_metadata_inventory_move = function() return 0 end;
	allow_metadata_inventory_put = function(pos, list, idx, stack, user)
		local inv = minetest.get_meta(pos):get_inventory()
		if list == 'tool' then
			local s_wkpc = inv:get_stack('workpiece', 1)
			local tech = sorcery.lathe.tooltech(stack)


			if tech and (s_wkpc:is_empty()
			or (R[s_wkpc:get_name()]       ~= nil and
				R[s_wkpc:get_name()][tech] ~= nil))

					then return stack:get_count() end
			for g,v in pairs(s_wkpc:get_definition().groups) do
				local gs = R['group:'..g..'='..tostring(v)] 
				local gg = R['group:'..g] 

				if (gs and gs[tech])
				or (gg and gg[tech]) then

					return stack:get_count()

				end
			end
		elseif list == 'workpiece' then
			local s_tool = inv:get_stack('tool', 1)
			if R[stack:get_name()] then
				if s_tool:is_empty()

				or R[stack:get_name()][sorcery.lathe.tooltech(s_tool)]



					then return stack:get_count() end


			end
		end

		return 0
	end;
	allow_metadata_inventory_take = function(pos, list, idx, stack, user)
		if list == 'preview' then


>
>



>
|
>
>
>
>
>
>
>
>
|
>

<
>
>







 







|







 







|
>
>
>
>
|



>
>
>
>
>
>
>
>







 







>
>

|
|
>







>
|
>





|
>
|
>
>
>
|
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

21
22
23
24
25
26
27
28
29
..
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
..
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
...
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
-- the math basically needs to be rewritten from scratch by someone who isn't
-- dyscalculic but 
local L = sorcery.lib
local M = function(i) return sorcery.itemclass.get(i, 'material') end
sorcery.lathe = {
	techs = {
		cut = {dmg = true};
		intaglio = {
			consume = true;
			toolpred = function(tool)
				if minetest.get_item_group(tool, 'sorcery_powder') == 0 then return false end
				local cl = sorcery.itemclass.get(tool, 'metal')
				return cl.data.hardness >= 3
			end;
			validate = function(tool, wkpc)
				return M(tool).data.hardness >= M(wkpc).data.hardness
			end;
		};
	};
	tools = {

		['group:sword'] = 'cut', ['group:knife'] = 'cut', ['group:blade'] = 'cut';
		['group:sorcery_intaglio_powder'] = 'intaglio';
	};
	recipes = {};
	register = function(def)
		local recipes = sorcery.lathe.recipes
		if not recipes[def.input] then recipes[def.input] = {} end
		local rs = recipes[def.input][def.tech]
		if not rs
................................................................................
			else rs[#rs+1] = def
		end
	end;
	register_metal = function(def)
		local parts = sorcery.data.metals[def.metal].parts
		local out = ItemStack(def.output)
		for _, ty in pairs {'ingot', 'block', 'fragment'} do
			local pt = parts[ty]
			local ptc = sorcery.itemclass.get(pt, 'metal')
			if ptc and ptc.value then
				if def.mass <= ptc.value then
					local mass
					local vfc = ptc.value / def.mass
					if math.floor(vfc) ~= vfc then
						for i = 1, 50 do
................................................................................
					}
				end
			end
		end
	end;
	tooltech = function(tool)
		if type(tool) ~= 'string' then tool = tool:get_name() end
		local ts = sorcery.lathe.tools
		if ts[tool] then return ts[tool] end

		for id,t in pairs(ts) do
			local q, g = L.str.beginswith(id, 'group:')
			if q and minetest.get_item_group(tool, g) ~= 0 then
				return t
			end
		end

		for tech, t in pairs(sorcery.lathe.techs) do
			if t.toolpred then
				if t.toolpred(tool) then return tech end
			end
		end

		return nil
	end;
}

local R = sorcery.lathe.recipes
sorcery.lathe.get = function(pos,idx,howmany)
	local inv = minetest.get_meta(pos):get_inventory()
	local tool = inv:get_stack('tool',1)
................................................................................

	allow_metadata_inventory_move = function() return 0 end;
	allow_metadata_inventory_put = function(pos, list, idx, stack, user)
		local inv = minetest.get_meta(pos):get_inventory()
		if list == 'tool' then
			local s_wkpc = inv:get_stack('workpiece', 1)
			local tech = sorcery.lathe.tooltech(stack)
			if not tech then return 0 end
			local vdtr = sorcery.lathe.techs[tech].validate
			if tech and (s_wkpc:is_empty()
						or (R[s_wkpc:get_name()]       ~= nil and
							R[s_wkpc:get_name()][tech] ~= nil and
							(vdtr == nil or vdtr(stack,s_wkpc) )))
					then return stack:get_count() end
			for g,v in pairs(s_wkpc:get_definition().groups) do
				local gs = R['group:'..g..'='..tostring(v)] 
				local gg = R['group:'..g] 

				if (gs and gs[tech])
				or (gg and gg[tech]) then
					if vdtr == nil or vdtr(stack, s_wkpc) then
						return stack:get_count()
					end
				end
			end
		elseif list == 'workpiece' then
			local s_tool = inv:get_stack('tool', 1)
			if R[stack:get_name()] then
				if s_tool:is_empty() then return stack:get_count() end

				local tech = sorcery.lathe.tooltech(s_tool)
				if tech and R[stack:get_name()][tech] then
					local vdtr = sorcery.lathe.techs[tech].validate
					if vdtr == nil or vdtr(s_tool, stack) then
						return stack:get_count()
					end
				end
			end
		end

		return 0
	end;
	allow_metadata_inventory_take = function(pos, list, idx, stack, user)
		if list == 'preview' then

Modified lib/str.lua from [345c990ba7] to [94cda47230].

12
13
14
15
16
17
18
19


20
21
22
23
24


25
26
27
28
29
30
31
return {
	capitalize = function(str)
		return string.upper(string.sub(str, 1,1)) .. string.sub(str, 2)
	end;

	beginswith = function(str,pfx)
		if #str < #pfx then return false end
		return string.sub(str,1,#pfx) == pfx


	end;

	endswith = function(str,sfx)
		if #str < #sfx then return false end
		return string.sub(str,#sfx) == sfx


	end;

	explode = function(str,delim,pat) -- this is messy as fuck but it works so im keeping it
		local i = 1
		local tbl = {}
		if pat == nil then pat = false end
		repeat







|
>
>




|
>
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
return {
	capitalize = function(str)
		return string.upper(string.sub(str, 1,1)) .. string.sub(str, 2)
	end;

	beginswith = function(str,pfx)
		if #str < #pfx then return false end
		if string.sub(str,1,#pfx) == pfx then
			return true, string.sub(str,1 + #pfx)
		end
	end;

	endswith = function(str,sfx)
		if #str < #sfx then return false end
		if string.sub(str,#sfx) == sfx then
			return true, string.sub(str,1,#sfx)
		end
	end;

	explode = function(str,delim,pat) -- this is messy as fuck but it works so im keeping it
		local i = 1
		local tbl = {}
		if pat == nil then pat = false end
		repeat

Modified metal.lua from [f2df9bf8e4] to [b8a7748341].

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
...
129
130
131
132
133
134
135










136
137
138
139
140
141
142
...
144
145
146
147
148
149
150

151
152
153
154
155
156
157
...
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
	if not metal.no_armor then for a,c in pairs(armors) do
		sorcery.matreg.lookup[(metal.items and metal.items[a]) or ('sorcery:' .. a .. '_' .. name)] = {
			metal = true;
			id = name; data = metal;
			value = c.cost * fragments_per_ingot;
		}
	end end
	sorcery.data.metallookup[ingot] = {
		id = name; data = metal;
		value = fragments_per_ingot;
	}
	sorcery.data.metallookup[block] = {
		id = name; data = metal;
		value = fragments_per_ingot * 9;
	}
	sorcery.data.metallookup[fragment] = {
		id = name; data = metal;
		value = 1;
	}
	sorcery.data.metallookup[disc] = {
		id = name; data = metal;
		value = 8/3;
	}
	if not metal.no_craftables then
		sorcery.data.metallookup[screw] = {
			id = name; data = metal;
			value = 0.5;
		}
		minetest.register_craftitem(screw, {
			description = sorcery.lib.str.capitalize(name) .. ' Screw';
			inventory_image = sorcery.lib.image('sorcery_screw.png'):multiply(sorcery.lib.color(metal.tone)):render();
			groups = { metal = 1; sorcery_screw = 1; sorcery_tech_component = 1; };
			_sorcery = {
				material = {
					id = name, data = metal;
................................................................................
				grindcost = 3;
				grindvalue = 2*4;
				value = 4 * (2/3);
			};
		};
	})











	sorcery.lathe.register {
		input = ingot, mass = 2;
		output = {name = disc, count = 3};
		tech = 'cut', cost = 5;
	}
	sorcery.lathe.register {
		input = block;
................................................................................
		leftover = ingot;
		tech = 'cut', cost = 5*7;
	}

	minetest.register_craftitem(powder, {
		description = sorcery.lib.str.capitalize(name) .. ' Powder';
		inventory_image = 'sorcery_' .. name .. '_powder.png';

	})
	if metal.dye then
		minetest.register_craft {
			output = 'dye:' .. metal.dye .. ' 4';
			recipe = {
				{'',     powder,                   ''};
				{powder,'basic_materials:paraffin',powder};
................................................................................
		type = 'cooking';
		recipe = ingot;
		cooktime = (metal.cooktime or 4) * 0.5;
		output = fragment .. ' ' .. tostring(fragments_per_ingot);
	}
	do local rec = {}
		for i=1,fragments_per_ingot do
			rec[#rec+1]=fragment 
		end
		minetest.register_craft {
			type = 'shapeless';
			recipe = rec;
			output = ingot;
		}
	end







|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<







 







>
>
>
>
>
>
>
>
>
>







 







>







 







|







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
...
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
...
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
...
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
	if not metal.no_armor then for a,c in pairs(armors) do
		sorcery.matreg.lookup[(metal.items and metal.items[a]) or ('sorcery:' .. a .. '_' .. name)] = {
			metal = true;
			id = name; data = metal;
			value = c.cost * fragments_per_ingot;
		}
	end end
	local install = function(part,amt)
			sorcery.data.metallookup[part] = { id = name, data = metal, value = amt }
	end
	install(ingot,    fragments_per_ingot)
	install(block,    fragments_per_ingot*9)
	install(fragment, 1)
	install(powder,   1)
	install(disc,     8/3)

	if not metal.no_craftables then
		install(screw, 0.5)










		minetest.register_craftitem(screw, {
			description = sorcery.lib.str.capitalize(name) .. ' Screw';
			inventory_image = sorcery.lib.image('sorcery_screw.png'):multiply(sorcery.lib.color(metal.tone)):render();
			groups = { metal = 1; sorcery_screw = 1; sorcery_tech_component = 1; };
			_sorcery = {
				material = {
					id = name, data = metal;
................................................................................
				grindcost = 3;
				grindvalue = 2*4;
				value = 4 * (2/3);
			};
		};
	})

	sorcery.lathe.register {
		input = ingot;
		output = {name = fragment; count = fragments_per_ingot};
		tech = 'cut', cost = 2;
	}
	sorcery.lathe.register {
		input = block;
		output = {name = fragment; count = fragments_per_ingot*9};
		tech = 'cut', cost = 2*7;
	}
	sorcery.lathe.register {
		input = ingot, mass = 2;
		output = {name = disc, count = 3};
		tech = 'cut', cost = 5;
	}
	sorcery.lathe.register {
		input = block;
................................................................................
		leftover = ingot;
		tech = 'cut', cost = 5*7;
	}

	minetest.register_craftitem(powder, {
		description = sorcery.lib.str.capitalize(name) .. ' Powder';
		inventory_image = 'sorcery_' .. name .. '_powder.png';
		groups = {sorcery_powder = 1; powder = 1};
	})
	if metal.dye then
		minetest.register_craft {
			output = 'dye:' .. metal.dye .. ' 4';
			recipe = {
				{'',     powder,                   ''};
				{powder,'basic_materials:paraffin',powder};
................................................................................
		type = 'cooking';
		recipe = ingot;
		cooktime = (metal.cooktime or 4) * 0.5;
		output = fragment .. ' ' .. tostring(fragments_per_ingot);
	}
	do local rec = {}
		for i=1,fragments_per_ingot do
			rec[#rec+1]=fragment
		end
		minetest.register_craft {
			type = 'shapeless';
			recipe = rec;
			output = ingot;
		}
	end

Modified recipes.lua from [7b05938d1e] to [c159082683].

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
...
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438

sorcery.lathe.register_metal {
	metal = 'aluminum';
	output = 'sorcery:pipe';
	tech = 'cut', cost = 8;
	mass = 4;
}














minetest.register_craft {
	output = 'sorcery:trough';
	recipe = {
		{ingot 'aluminum','',ingot 'aluminum'};
		{ingot 'aluminum','',ingot 'aluminum'};
		{ingot 'aluminum',ingot 'aluminum',ingot 'aluminum'};
	};
}

regtech('infuser_tube', 'Infusion Tube', {metal = 1}, {
	{"basic_materials:copper_strip",'sorcery:infuser_concentrator', "basic_materials:copper_strip"};
	{"", "basic_materials:copper_strip", "basic_materials:gold_wire"};
	{"", "basic_materials:copper_strip", ""};
}, 1, {
	{"basic_materials:gold_wire", "basic_materials:empty_spool"}
})
regtech('infuser_chamber', 'Infuser Chamber', nil, {
	{'default:clay_brick','sorcery:grease_sealant','default:clay_brick'};
	{'default:clay_brick','stairs:slab_steelblock','default:clay_brick'};
}, 1, {
	{'sorcery:grease_sealant','xdecor:bowl'};
})
regtech('infuser_concentrator', 'Infuser Concentrator', nil, {
	{'basic_materials:steel_wire'};
	{'default:obsidian_shard'};
	{'basic_materials:copper_wire'};
................................................................................
	{'basic_materials:gold_wire', 'basic_materials:empty_spool'};
	{'basic_materials:gold_wire', 'basic_materials:empty_spool'};
	{'basic_materials:gold_wire', 'basic_materials:empty_spool'};
	{'basic_materials:gold_wire', 'basic_materials:empty_spool'};
	{'basic_materials:gold_wire', 'basic_materials:empty_spool'};
})
regtech('ley_puncture', 'Ley Puncture', {metal = 1}, {
	{'default:flint','sorcery:tungsten_ingot','group:sorcery_ley_cable'};
	{'','group:sorcery_ley_cable',''};
	{'group:sorcery_ley_cable','sorcery:tungsten_ingot','default:flint'};
})
regtech('pulse_rectifier', 'Pulse Rectifier', {metal = 1})
regtech('current_felicitator', 'Current Felicitator', {metal = 1}, {
	{'basic_materials:silver_wire','basic_materials:silver_wire','basic_materials:silver_wire'};
	{'sorcery:cobalt_ingot','sorcery:inversion_matrix','sorcery:cobalt_ingot'};
	{'default:bronze_ingot','sorcery:platinum_ingot','default:bronze_ingot'};
},1,{







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












|
|





|







 







|

|







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
...
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451

sorcery.lathe.register_metal {
	metal = 'aluminum';
	output = 'sorcery:pipe';
	tech = 'cut', cost = 8;
	mass = 4;
}

sorcery.lathe.register_metal {
	metal = 'steel';
	output = 'basic_materials:steel_strip';
	tech = 'cut', cost = 2;
	mass = 0.5;
}
sorcery.lathe.register_metal {
	metal = 'copper';
	output = 'basic_materials:copper_strip';
	tech = 'cut', cost = 1;
	mass = 0.5;
}

minetest.register_craft {
	output = 'sorcery:trough';
	recipe = {
		{ingot 'aluminum','',ingot 'aluminum'};
		{ingot 'aluminum','',ingot 'aluminum'};
		{ingot 'aluminum',ingot 'aluminum',ingot 'aluminum'};
	};
}

regtech('infuser_tube', 'Infusion Tube', {metal = 1}, {
	{"basic_materials:copper_strip",'sorcery:infuser_concentrator', "basic_materials:copper_strip"};
	{"", mtlp('copper','disc'), "basic_materials:gold_wire"};
	{"", 'sorcery:pipe', ""};
}, 1, {
	{"basic_materials:gold_wire", "basic_materials:empty_spool"}
})
regtech('infuser_chamber', 'Infuser Chamber', nil, {
	{'default:clay_brick','sorcery:grease_sealant','default:clay_brick'};
	{'default:clay_brick',mtlp('steel','disc'),'default:clay_brick'};
}, 1, {
	{'sorcery:grease_sealant','xdecor:bowl'};
})
regtech('infuser_concentrator', 'Infuser Concentrator', nil, {
	{'basic_materials:steel_wire'};
	{'default:obsidian_shard'};
	{'basic_materials:copper_wire'};
................................................................................
	{'basic_materials:gold_wire', 'basic_materials:empty_spool'};
	{'basic_materials:gold_wire', 'basic_materials:empty_spool'};
	{'basic_materials:gold_wire', 'basic_materials:empty_spool'};
	{'basic_materials:gold_wire', 'basic_materials:empty_spool'};
	{'basic_materials:gold_wire', 'basic_materials:empty_spool'};
})
regtech('ley_puncture', 'Ley Puncture', {metal = 1}, {
	{'default:flint',mtlp('tungsten','disc'),'group:sorcery_ley_cable'};
	{'','group:sorcery_ley_cable',''};
	{'group:sorcery_ley_cable',mtlp('tungsten','disc'),'default:flint'};
})
regtech('pulse_rectifier', 'Pulse Rectifier', {metal = 1})
regtech('current_felicitator', 'Current Felicitator', {metal = 1}, {
	{'basic_materials:silver_wire','basic_materials:silver_wire','basic_materials:silver_wire'};
	{'sorcery:cobalt_ingot','sorcery:inversion_matrix','sorcery:cobalt_ingot'};
	{'default:bronze_ingot','sorcery:platinum_ingot','default:bronze_ingot'};
},1,{

Modified tree.lua from [26f773677c] to [e1ffea05f2].

38
39
40
41
42
43
44
45
46
47
48








49
50
51
52
53
54
55
56
57
58
59
60
61


62
63
64
65
66
67
68
		sorcery.lathe.register {
			input = t.node;
			tech = 'cut';
			output = 'default:stick 18';
			cost = 1;
		}

		if t.lathe then for tech, items in pairs(t.lathe) do
			for _, i in pairs(items) do
			for _, n in pairs(nodes) do
				if  minetest.registered_items[n]








				and minetest.registered_items[i[1]] then
					sorcery.lathe.register {
						input = n;
						tech = tech;
						output = {
							name = i[1];
							count = i[2];
						};
						cost = i[3];
					}
				end
			end end
		end end


	end

	if t.sap == false then return end
	if not t.sapliq then
		t.sapliq = string.format('sorcery:sap_%s', id)
		local sapdesc = t.sap or (t.desc .. ' Tree Sap')
		sorcery.liquid.register {







<
<
|
|
>
>
>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>







38
39
40
41
42
43
44


45
46
47
48
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
		sorcery.lathe.register {
			input = t.node;
			tech = 'cut';
			output = 'default:stick 18';
			cost = 1;
		}



		for _, n in pairs(nodes) do
			if minetest.registered_items[n] then
				sorcery.lathe.register {
					input = n, tech = 'cut';
					output = 'xdecor:table 2';
					cost = 2;
				}
				if t.lathe then
					for tech, items in pairs(t.lathe) do
					for _, i        in pairs(items)   do
						if minetest.registered_items[i[1]] then
							sorcery.lathe.register {
								input = n;
								tech = tech;
								output = {
									name = i[1];
									count = i[2];
								};
								cost = i[3];
							}
						end
					end end
				end
			end
		end
	end

	if t.sap == false then return end
	if not t.sapliq then
		t.sapliq = string.format('sorcery:sap_%s', id)
		local sapdesc = t.sap or (t.desc .. ' Tree Sap')
		sorcery.liquid.register {