ZenonSeth / logistica

A Minetest item transport and storage mod
Other
1 stars 4 forks source link

add way to automate filling/emptying reservoirs from buckets #4

Closed programmerjake closed 5 months ago

programmerjake commented 8 months ago

as described in title -- it would be nice to automate getting full buckets from a reservoir and putting full buckets in a reservoir, I'm fine with the empty buckets having to be stored in item storage in the network since they can be removed and recycled/refilled by other mods if necessary.

ZenonSeth commented 8 months ago

Ha, you read my mind - this was something I was considering when I added reservoirs - and also as a solution for https://github.com/ZenonSeth/logistica/issues/2.

The two use cases I see are basically:

There's the question if the reverse (on-demand bucket emptying, and autocrafting filled buckets) is necessary - and there's some issues with the best way to cover all the use cases, which I'm not sure of yet.

If you have specific use cases you need this for, please let me know, I will have to think about the best way to allow for these features.

programmerjake commented 8 months ago

I had been using it with exchangeclone -- actually the dev version https://github.com/ThePython10110/ExchangeClone/tree/dev which has machines that allow converting energy into buckets of lava (the constructor) and empty buckets into a bit less energy (the deconstructor), so it would be nice to have that automated.

(both of those can actually convert any item with an energy value that you've learned, assuming you have enough energy)

backdaniel commented 6 months ago

i got a better solution for filling and deloading buckets from within the access point interface (don't like the idea of having to place a bunch of new nodes for that)...

basically add a new "liquids" tab to access point, so there would be "storage" and "liquids" (i need to handle "energy" in the future so in this arrangement i could add a tab for types of energy after).

this also helps decluter the current "storage" interface of the access point.

liquids tab has the current liquid interface, but it now shows every registered liquid from start and available storage (empty + partially filled reservoir with those liquids), it has two sliders with a button to fill X available empty buckets or load Y full buckets of selected liquid from storage to the reservoirs.

the sliders should already take into account if it has the storage space to alocate the filled buckets.

are any of you guys working on it? if not i think i could handle this.

ZenonSeth commented 6 months ago

A separate tab for liquids in the Access Point interface is a good idea, I agree it would declutter the current UI a bit.

But as for automated filing/emptying, I have started work on two machines to do that - I think those are perhaps a better solution for this particular request, as they are the equivalent of auto-crafting in a way, and there's machines for that.

But @backdaniel if you want to add another tab to the Access Point to display all liquids and liquid levels in a more easy-to-show format, I agree that's a good idea.

backdaniel commented 6 months ago

ok, ill see some references from other games and make a tab for liquids, it will be mostly an info tab with half of it empty for now, but this is crucial if i want to implement my energy expansion...

my idea for energy differs from liquids in that its not evaluated by buckets (integers) but a total float capacity, i want to be able to modify, from the energy tab in access point, limits for each "consumer nodes", "producer nodes" just feed the network direcly, and "battery nodes" are similar to reservoir.

ZenonSeth commented 6 months ago

I'm not sure what 'energy' you mean, but since Logistica doesn't natively have the concept of energy, I assume it's from some other mod?

It sounds like what is needed is for the Access Point API to provide a tabs API, one of which would be the built-in liquids as you said. While you can theoretically write your own machines that connect to a logistics network, unfortunately at the moment, the network only has the concept of a misc category where you can put them (the other categories being things like requesters, mass_storage, inserters etc). That may also need to be expanded if you want to add add-ons to Logistica - which I'm sorry to say I had not considered the possibility of when I started writing this mod.

Maybe open a separate issue with feature request or PR once you have a better idea of what it is you want, or what if you write any code, where these ideas can be fleshed out more.

backdaniel commented 6 months ago

well if i have a tabs API and another simple to send and read messages through the network i can handle the logic from another mod, but ill open a separate issue for that later

ZenonSeth commented 5 months ago

Alright @programmerjake - finally got around to this, published Release 0.9.12 which, amongst other things, addresses this request by adding two new machines: Bucket Filler and Bucket Emptier.

That release also adds a Pump machine that can fill reservoirs from the liquid nodes in the world.

That should cover almost all use cases for liquids that I can think of for now.

programmerjake commented 5 months ago

Alright @programmerjake - finally got around to this, published Release 0.9.12

That should cover almost all use cases for liquids that I can think of for now.

nice! I'll have to try it out soon...