Page 1 of 1

[1.1.77] Loader fluid energy source, TO fluid change problem

Posted: Sat Mar 04, 2023 7:24 am
by Honktown
(was requested to split from another post)
Expected: an existing loader to migrate from electric / heat source to fluid (I think it affected both)
Following this post: viewtopic.php?f=7&t=105438

It doesn't:
One of the original states:

Code: Select all

local es = {
	type = "electric",
	usage_priority = "primary-input",
--	drain = "0W",
	buffer_capacity = "1MJ",
	input_flow_limit = "10kW",
}
for _, loaders in pairs({data.raw["loader"], data.raw["loader-1x1"]}) do
	for name, prototype in pairs(loaders) do
		prototype.energy_per_item = "13kJ"
		prototype.energy_source = table.deepcopy(es)
	end
end
fluid source to try instead:

Code: Select all

local fluid_box = table.deepcopy(data.raw["generator"]["steam-engine"].fluid_box)
fluid_box.pipe_connections = {
	{position = {1, 0}, type = "input-output"},
	{position = {-1, 0}, type = "input-output"},
}
local fluid = {
	type = "fluid",
	--burns_fluid = false,
	--scale_fluid_usage = true,
	--fluid_usage_per_tick = 60,
	fluid_box = fluid_box,
}
Top, newly placed loader works. Bottom, from before the change, does not work:
loader-fluid.jpg
loader-fluid.jpg (123.49 KiB) Viewed 1882 times

Re: [1.1.77] Loader fluid energy source, TO fluid change problem

Posted: Sat Mar 04, 2023 12:09 pm
by boskid
Thanks for the report. Issue is now fixed for 1.1.78.