Page 2 of 3

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Thu Oct 05, 2017 21:38
by joe7575
Thanks FaceDeer, I got it.
I will add the players name to the API. This should be sufficient for most times to check the rights.
I don't like the idea to create a fake player object each time an item is pushed, because it's only needed in special cases.

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Fri Oct 06, 2017 01:27
by FaceDeer
Rather than using a hard-coded table of node names to determine what's "fuel", I'd recommend something like this:

Code: Select all

    if minetest.get_craft_result({method="fuel", width=1, items={item}}).time ~= 0 then
        return tubelib.put_item(meta, "fuel", item)
That way it automatically includes any items that have had a fuel reaction defined for them.

Apologies for turning the thread about your mod into a digression about Minetest's API earlier. It's a subject I've grumbled about a lot when working on my own stuff so I kind of jumped on it. :)

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Fri Oct 06, 2017 10:09
by joe7575
Thanks FaceDeer
Your hints are very welcome. I will check and take over all hints which fulfil the initial objectives:
To have a Mod/Lib, which is easy to use (for players and modders), lean and efficient (for small servers), covering up to 80% of all requirements (which 20% of effort).

I changed the "fuel detection" code according to your proposal and I added the player_name to the API functions.
Version 0.05 is on GitHub.

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Fri Oct 06, 2017 14:34
by Desour
joe7575 wrote:
Byakuren wrote:Can it transport through unloaded blocks like pipeworks can?
Theoretically YES, but it is unlikely that this happens, because the maximum tube length is currently limited to about 50 blocks. It was no objective to allow the construction of huge plants.
50 blocks! That are 800 nodes! It's very likely to happen then.

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Fri Oct 06, 2017 15:10
by azekill_DIABLO
xD

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Fri Oct 06, 2017 16:01
by joe7575
DS-minetest wrote:
joe7575 wrote:
Byakuren wrote:Can it transport through unloaded blocks like pipeworks can?
Theoretically YES, but it is unlikely that this happens, because the maximum tube length is currently limited to about 50 blocks. It was no objective to allow the construction of huge plants.
50 blocks! That are 800 nodes! It's very likely to happen then.
OK, then 50 nodes (node blocks, not area blocks).
I try to be more precise in the future... :D

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Fri Oct 06, 2017 20:39
by joe7575
Byakuren wrote:Can it transport through unloaded blocks like pipeworks can?
I've added a Voxel Manipulator function to check tube connections and to push/pull items into/from inventories.
So, unloaded blocks should be no issue any more.
BTW: The maximum tube length is now 100 nodes

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Sat Oct 07, 2017 01:30
by Inocudom
I like how these nodes look. The wood and metal look that they have allows them to blend in with Minetest's general theme pretty well.

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Sun Nov 05, 2017 13:55
by joe7575
v0.09 is on GitHub with some modification and adjustments for tubelib_addons2.

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Mon Nov 06, 2017 17:15
by Chem871
I have a suggestion: you could make a new tube type, that's particular to furnaces. This tube would have 2 settings, 1 puts all items going into the furnace into the fuel slot, the other setting puts all items into the smelting slot.

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Mon Nov 06, 2017 19:51
by joe7575
Chem871 wrote:I have a suggestion: you could make a new tube type, that's particular to furnaces. This tube would have 2 settings, 1 puts all items going into the furnace into the fuel slot, the other setting puts all items into the smelting slot.
The tubelib distinguishes between flammable and not flammable items. All flammable items are going into the fuel slot. So what is the benefit of your suggestion?

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Mon Nov 06, 2017 20:34
by Chem871
I must not have seen that ability. Possible benefits? Some items that can be used as fuel can be cooked, too, so maybe having the ability to tell the items where to go would be useful.

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Tue Nov 07, 2017 16:49
by Chem871
Could you add an auto-gravelsieve that tubelib tubes can carry stuff to/from?

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Tue Nov 07, 2017 20:53
by joe7575
Chem871 wrote:Could you add an auto-gravelsieve that tubelib tubes can carry stuff to/from?
It's already available. You can push gravel into the automated Gravel Sieve and pull all items out.

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Tue Nov 07, 2017 21:03
by Chem871
Awesome!

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Wed Nov 08, 2017 19:05
by Chem871
How does the switch work?

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Thu Nov 09, 2017 19:10
by joe7575
Chem871 wrote:How does the switch work?
This node has to be configured via the formspec as button or as switch. For a button configuration different switching times from 2 to 16 seconds are possible. In addition, the node has to be configured with one or several destination numbers of the controlled/to be switched nodes (e.g. Lamps).

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Thu Nov 09, 2017 21:22
by Chem871
Does the switch work for pushers/machines?

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Fri Nov 10, 2017 06:19
by joe7575
Chem871 wrote:Does the switch work for pushers/machines?
Yes, but please download the latest version, there was an issue with the pusher commands.

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Fri Nov 10, 2017 13:35
by Chem871
Can I use 1 switch for more than 1 pusher/machine, or just 1 switch per machine?

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Fri Nov 10, 2017 23:39
by joe7575
Chem871 wrote:Can I use 1 switch for more than 1 pusher/machine, or just 1 switch per machine?
Yes, you can use one switch for several nodes. There is no limit in principle. But I would recommend to use Repeater nodes in addition for large structures.

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Sat Nov 11, 2017 00:37
by Chem871
I would just use 1 switch for all the machines involved in making Biofuel, 1 switch for auto-farming(btw, could you add support for farming redo as far as mining and planting?), and 1 switch for quarries.

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Mon Dec 10, 2018 19:03
by Chem871
What if you added a machine that grinds ore lumps into dust, and it needed biofuel to operate?

Re: [Mod] Minetest-Tubelib [tubelib]

Posted: Tue Dec 11, 2018 18:45
by joe7575
Chem871 wrote:What if you added a machine that grinds ore lumps into dust, and it needed biofuel to operate?
Sorry, I am currently already involved in several developments and improvements of my mods, I have no time to open another site. Maybe you could ask micu (viewtopic.php?f=9&t=21488)

Re: [Mod] Tubelib [tubelib]

Posted: Thu Apr 16, 2020 05:57
by whtemple1959
I am using Minetest 5.1.1, I have the Technic mod activated via the online content so I will infer that it is the most current version. Can some one explain why when I install the TechPack mod the Tubelib portion seems to interfere with the Technic mod and actually make Technic items disappear? I wish I could attach the screen shots. the Technic has 3 pages of inventory items to choose from but with Tubelib enabled that drops down to 2 pages of inventory items. I really need my Technic wrench. Any guidance would be greatly appreciated.