I have a problem whit the new fluid mechanic. The game crashes due to the new fluid mix check.
I have a Solar Boiler in my MOD. The way it works, is that I create a hidden boiler unit when you place a solar panel.
Code: Select all
--- Bio Solar Boiler / Solar Plant has been built
if entity.valid and entity.name == "bi-solar-boiler-panel" then
local solar_plant = entity
local boiler_solar = "bi-solar-boiler"
local create_solar_boiler = surface.create_entity({name = boiler_solar, position = position, force = force}) -- Hidden Solar Paner
create_solar_boiler.minable = false
create_solar_boiler.destructible = false
-- Group Multiple Entities Together
global.bi_solar_boiler_table[solar_plant.unit_number] = {base=solar_plant, boiler=create_solar_boiler, pole=create_sm_pole}
end
As you can see on the image below, the inage on the right shows that the created solar boiler has a water input and a steam output. If you build the solar boiler to anb existing pipe, like on the left, it crashes.

I think I somehow need to put in a check to see if it's possible to build the solar boiler before you place it, just like pipe, so it will tell you if it's legal.
Anyone know how to do this?
Thanks.
