Add liquids to pipe connectable
-
- Filter Inserter
- Posts: 402
- Joined: Fri May 23, 2014 8:54 am
- Contact:
Add liquids to pipe connectable
I am looking for an interface for inserting liquids into a pipeconnectable. Maybe insertliquid({type,amount,temperature})? Thoughts?
Re: Add liquids to pipe connectable
What PipeConnectable should have is a read/write liquid property, where the type, amount and temperature fields would be editable. This alone would be enough to make pretty much anything possible, from train liquid carriages to water-cooled nuclear powerplants and such.
It's probably too late to see it in 10.0, but I really hope it can be included in one of the later bugfix versions. I'm not sure what the codebase of the game looks like, but hopefully it wouldn't require too much changing to implement this.
It's probably too late to see it in 10.0, but I really hope it can be included in one of the later bugfix versions. I'm not sure what the codebase of the game looks like, but hopefully it wouldn't require too much changing to implement this.
Re: Add liquids to pipe connectable
shouldn't this go on the fluid box(es) rather than the pipeconnectable itself? (Not that we have access to the fluid box either.)
This would allow proper querying of liquids in things like assemblers as well as plain old pipes.
This would allow proper querying of liquids in things like assemblers as well as plain old pipes.
-
- Filter Inserter
- Posts: 402
- Joined: Fri May 23, 2014 8:54 am
- Contact:
Re: Add liquids to pipe connectable
That makes more sense. Maybe adding a function getfluidbox(number) to the entity abstract class that errors when there is no fluidbox supported, just like the inventory. Then the fluidbox object can have functions for dealing with liquid.
Re: Add liquids to pipe connectable
There are quite a few changes required in the entire liquid and item handling, including things like allowing burners to use liquids and so on. That's likely to take some time, though. The proposed setLiquid method or a read/write liquid property for PipeConnectable would be much quicker to implement and would give modders the ability to work with liquids without having to wait ages for a version of the game where the liquid handling is more refined.