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