Turning Fluid Mixing Logic Off For Fluid Inputs

Place to get help with not working mods / modding interface.
Post Reply
TreefrogGreaken
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Thu May 04, 2017 12:07 pm
Contact:

Turning Fluid Mixing Logic Off For Fluid Inputs

Post by TreefrogGreaken »

Hey hope I can get some help here.

My mod has an entity based on an offshore pump, the inverse, an offshore drain.

The entity is setup using the same details as the offshore pump, with 2 differences its fluid is called "Fluid", a dummy fluid to allow the entity to work and the output is inverted to be an input.

In 0.16, the entity could be placed no problem and the mod would pickup what fluid was in the pipe connected to the offshore drain, and then output this into the lake bed, e.g water in pipe, water lake / oil in pipe, oil lake. When the pipe was empty, the drain would show the dummy fluid in its input.

In 0.17, the entity can be placed no problem and the mod picks up the fluid before hand as before. But now, because the dummy fluid becomes active when the drain has nothing to empty, the pipes connected to the drain now lock on the dummy fluid, meaning the player can no longer use the pipes and has to dig them up and relay them. If you place the drain and put a pipe on it, then it locks to the dummy fluid.

First of all, is this a bug? Should the fluid mixing prevention be active if a pipe is connected to an input? (Prob not)

Second, is there a way around this ?

I've tried doing the clear_fluid_inside() on the entity when the pipe reaches 0, but this has no effect. I may need to do this before reaching 0?

Is there a flag to turn the fluid mixing logic off for a connected entity?

Would I need the devs to think about either adding in a flag for this or making offshore pumps be allowed to have a nil fluid type, which would also fix this?

Any help much appreciated.

Post Reply

Return to “Modding help”