sorcery  Diff

Differences From Artifact [c25534932e]:

To Artifact [994388d832]:


143
144
145
146
147
148
149


150
151
152
153
154
155
156
...
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
	-- for i=0,4 do
		spawn('sorcery_spark.png^[multiply:#FF8FDD', 1, 32 * 4)
	-- end
	-- for i=0,4 do
		spawn('sorcery_spark.png^[multiply:#FFB1F6', 0.5, 64 * 4)
	-- end
	


	if newtime >= infusion_time then
		-- finished
		local ingredient = infusion[1]:get_name()
		for i = 1,#potions do
			if potions[i]:is_empty() then goto skip end
			local base = potions[i]:get_name()
			local potion = potions[i]:get_definition()
................................................................................
				elixir._proto.apply(newstack, potion._proto)
				newstack:get_meta():set_string('description', sorcery.lib.ui.tooltip {
					title = potion._proto.name .. ' Draught';
					desc = potion._proto.desc;
					color = sorcery.lib.color(potion._proto.color):readable();
					props = effects_table(newstack);
				});
				inv:set_stack('potions',i,newstack)
			else
				for _,v in pairs(sorcery.data.infusions) do
					if v.infuse == ingredient and v.into == base then
						-- transform the base into the infusion
						inv:set_stack('potions',i,ItemStack(v.output))
					end
				end
			end
		::skip:: end

		inv:set_stack('infusion',1,ItemStack(sorcery.data.infusion_leftovers[ingredient]))








>
>







 







|




|







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
...
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
	-- for i=0,4 do
		spawn('sorcery_spark.png^[multiply:#FF8FDD', 1, 32 * 4)
	-- end
	-- for i=0,4 do
		spawn('sorcery_spark.png^[multiply:#FFB1F6', 0.5, 64 * 4)
	-- end
	
	local discharge = sorcery.lib.node.discharger(pos)
	
	if newtime >= infusion_time then
		-- finished
		local ingredient = infusion[1]:get_name()
		for i = 1,#potions do
			if potions[i]:is_empty() then goto skip end
			local base = potions[i]:get_name()
			local potion = potions[i]:get_definition()
................................................................................
				elixir._proto.apply(newstack, potion._proto)
				newstack:get_meta():set_string('description', sorcery.lib.ui.tooltip {
					title = potion._proto.name .. ' Draught';
					desc = potion._proto.desc;
					color = sorcery.lib.color(potion._proto.color):readable();
					props = effects_table(newstack);
				});
				inv:set_stack('potions',i,discharge(newstack))
			else
				for _,v in pairs(sorcery.data.infusions) do
					if v.infuse == ingredient and v.into == base then
						-- transform the base into the infusion
						inv:set_stack('potions',i,discharge(ItemStack(v.output)))
					end
				end
			end
		::skip:: end

		inv:set_stack('infusion',1,ItemStack(sorcery.data.infusion_leftovers[ingredient]))