Page 1 of 1
Add liquids to pipe connectable
Posted: Fri Jun 06, 2014 7:04 am
by JamesOFarrell
I am looking for an interface for inserting liquids into a pipeconnectable. Maybe insertliquid({type,amount,temperature})? Thoughts?
Re: Add liquids to pipe connectable
Posted: Fri Jun 06, 2014 8:59 am
by Rahjital
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.
Re: Add liquids to pipe connectable
Posted: Sun Jun 08, 2014 2:22 pm
by nullvoid
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.
Re: Add liquids to pipe connectable
Posted: Mon Jun 09, 2014 6:25 am
by JamesOFarrell
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
Posted: Mon Jun 09, 2014 7:13 pm
by Rahjital
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.