sorcery  Diff

Differences From Artifact [fc0276bae8]:

To Artifact [f457c3868d]:


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
...
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
...
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179

180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195




196
197
198
199
200
201
202
	minetest.register_craftitem('sorcery:' .. name, extra)
end

sorcery.register_potion('blood', 'Blood', 'A bottle of sacrificial blood, imbued\nwith stolen life force', u.color(219,19,14))
sorcery.register_potion('potion_water', 'Water Bottle', 'A bottle of plain water', u.color(43,90,162))
sorcery.register_potion('holy_water', 'Holy Water','A bottle of consecrated water',u.color(94,138,206),'sparkle',6)

local create_infusion_recipe = function(id,potion,default_basis)
	if potion.infusion then
		sorcery.data.register.infusion {
			infuse = potion.infusion;
			into = potion.basis or default_basis;
			output = 'sorcery:' .. id;

		}
	end
end

for n,v in pairs(sorcery.data.potions) do
	local color = u.color(v.color)
	local kind = v.style
	local glow = v.glow
	local id = 'potion_' .. string.lower(n)
	local desc = 'A ' .. ((glow and 'glowing ') or '') ..
		'bottle of ' .. string.lower(n) .. 
		((kind == 'sparkle' and ', fiercely bubbling') or '') ..
		' liquid'

	sorcery.register_potion(id, n .. ' Potion', desc, color, kind, glow, {
		_proto = v;
		groups = {
			sorcery_potion = 1;
			sorcery_magical = 1;
		};
	})
	create_infusion_recipe(id,v,'sorcery:potion_serene')
end

for n,potion in pairs(sorcery.data.draughts) do
	local name = 'draught_' .. n
	local behavior = {
		_proto = potion;
		groups = {
................................................................................
				else
					minetest.add_item(user.get_pos(), ret)
				end
			end
			return stack
		end
	}

	sorcery.register_potion(name, potion.name .. ' Draught',
		potion.desc,
		u.color(potion.color),
		potion.style or 'dull',
		potion.glow or 0,
		behavior)
	create_infusion_recipe(name,potion,'sorcery:potion_luminous')
end

for n,elixir in pairs(sorcery.data.elixirs) do
	local color = u.color(elixir.color)
	local id = 'elixir_' .. string.lower(n)

	sorcery.register_potion(id, 'Elixir of ' .. n, nil, color, 'dull', false, {
		_proto = elixir;
		groups = {
			sorcery_elixir = 1;
			sorcery_magical = 1;
		};
	})
	create_infusion_recipe(id,elixir,'sorcery:potion_misty')
end

for n,v in pairs(sorcery.data.oils) do
	local color = u.color(v.color)
	local kind = v.style
	local id = 'oil_' .. n
	n = v.name or u.str.capitalize(n)
................................................................................
	})
end

for n,v in pairs(sorcery.data.greases) do
	local color = u.color(v.color)
	local kind = v.style
	sorcery.register_oil('grease_' .. n, u.str.capitalize(n) .. ' Grease', nil, color, kind, {
		groups = { sorcery_grease = 2 }
	})
end

for n,v in pairs(sorcery.data.philters) do
	local color = u.color(v.color)
	local id = 'philter_' .. n
	local name = v.name or u.str.capitalize(n)

	sorcery.register_potion(id, name .. ' Philter', v.desc, color, 'sparkle',v.glow or 4, {
		_proto = v;
		_protoname = n;
		groups = {
			sorcery_magical = 1;
			sorcery_philter = 1;
		};
	})
	create_infusion_recipe(id,v,'sorcery:potion_viscous')
end

for n,v in pairs(sorcery.data.extracts) do
	local item = v[1]
	local color = u.color(v[2])
	local name = 'extract_' .. n
	sorcery.register_potion(name, u.str.capitalize(n) .. ' Extract', nil, color, 'sparkle', false)





	local add_alcohol = function(booze)
		minetest.register_craft {
			type = "shapeless";
			recipe = {
				booze;
				item, item, item;







|





>













>
|






|







 







>
|





|





>
|






|







 







|







>
|







|






|
>
>
>
>







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
...
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
...
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
	minetest.register_craftitem('sorcery:' .. name, extra)
end

sorcery.register_potion('blood', 'Blood', 'A bottle of sacrificial blood, imbued\nwith stolen life force', u.color(219,19,14))
sorcery.register_potion('potion_water', 'Water Bottle', 'A bottle of plain water', u.color(43,90,162))
sorcery.register_potion('holy_water', 'Holy Water','A bottle of consecrated water',u.color(94,138,206),'sparkle',6)

local create_infusion_recipe = function(id,potion,default_basis,proto)
	if potion.infusion then
		sorcery.data.register.infusion {
			infuse = potion.infusion;
			into = potion.basis or default_basis;
			output = 'sorcery:' .. id;
			_proto = proto;
		}
	end
end

for n,v in pairs(sorcery.data.potions) do
	local color = u.color(v.color)
	local kind = v.style
	local glow = v.glow
	local id = 'potion_' .. string.lower(n)
	local desc = 'A ' .. ((glow and 'glowing ') or '') ..
		'bottle of ' .. string.lower(n) .. 
		((kind == 'sparkle' and ', fiercely bubbling') or '') ..
		' liquid'
	local fullname = n .. ' Potion'
	sorcery.register_potion(id, fullname, desc, color, kind, glow, {
		_proto = v;
		groups = {
			sorcery_potion = 1;
			sorcery_magical = 1;
		};
	})
	create_infusion_recipe(id,v,'sorcery:potion_serene',{data=v,name=fullname})
end

for n,potion in pairs(sorcery.data.draughts) do
	local name = 'draught_' .. n
	local behavior = {
		_proto = potion;
		groups = {
................................................................................
				else
					minetest.add_item(user.get_pos(), ret)
				end
			end
			return stack
		end
	}
	local fullname = potion.name .. ' Draught'
	sorcery.register_potion(name, fullname,
		potion.desc,
		u.color(potion.color),
		potion.style or 'dull',
		potion.glow or 0,
		behavior)
	create_infusion_recipe(name,potion,'sorcery:potion_luminous',{data=potion,name=fullname})
end

for n,elixir in pairs(sorcery.data.elixirs) do
	local color = u.color(elixir.color)
	local id = 'elixir_' .. string.lower(n)
	local fullname = 'Elixir of ' .. n
	sorcery.register_potion(id, fullname, nil, color, 'dull', false, {
		_proto = elixir;
		groups = {
			sorcery_elixir = 1;
			sorcery_magical = 1;
		};
	})
	create_infusion_recipe(id,elixir,'sorcery:potion_misty',{data=elixir,name=fullname})
end

for n,v in pairs(sorcery.data.oils) do
	local color = u.color(v.color)
	local kind = v.style
	local id = 'oil_' .. n
	n = v.name or u.str.capitalize(n)
................................................................................
	})
end

for n,v in pairs(sorcery.data.greases) do
	local color = u.color(v.color)
	local kind = v.style
	sorcery.register_oil('grease_' .. n, u.str.capitalize(n) .. ' Grease', nil, color, kind, {
		groups = { sorcery_grease = 1 }
	})
end

for n,v in pairs(sorcery.data.philters) do
	local color = u.color(v.color)
	local id = 'philter_' .. n
	local name = v.name or u.str.capitalize(n)
	local fullname = name .. ' Philter'
	sorcery.register_potion(id, fullname, v.desc, color, 'sparkle',v.glow or 4, {
		_proto = v;
		_protoname = n;
		groups = {
			sorcery_magical = 1;
			sorcery_philter = 1;
		};
	})
	create_infusion_recipe(id,v,'sorcery:potion_viscous',{data=v,name=fullname})
end

for n,v in pairs(sorcery.data.extracts) do
	local item = v[1]
	local color = u.color(v[2])
	local name = 'extract_' .. n
	sorcery.register_potion(name, u.str.capitalize(n) .. ' Extract', nil, color, 'sparkle', false, {
		groups = {
			sorcery_extracts = 1;
		};
	})

	local add_alcohol = function(booze)
		minetest.register_craft {
			type = "shapeless";
			recipe = {
				booze;
				item, item, item;