[Mod] Tubelib [tubelib]

User avatar
joe7575
Member
Posts: 387
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto
Location: Germany, in the deep south

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Post

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.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Minecart, Signs Bot.

FaceDeer
Member
Posts: 462
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Minetest-Tubelib [tubelib]

by FaceDeer » Post

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. :)

User avatar
joe7575
Member
Posts: 387
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto
Location: Germany, in the deep south

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Post

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.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Minecart, Signs Bot.

User avatar
DS-minetest
Member
Posts: 1137
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: DS-minetest
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Minetest-Tubelib [tubelib]

by DS-minetest » Post

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.
Note that I've recently renamed myself on github and co. to "Desour". (I'm bad at naming things.)
Feel free to call me DS.

User avatar
azekill_DIABLO
Member
Posts: 7494
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Minetest-Tubelib [tubelib]

by azekill_DIABLO » Post

xD

User avatar
joe7575
Member
Posts: 387
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto
Location: Germany, in the deep south

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Post

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
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Minecart, Signs Bot.

User avatar
joe7575
Member
Posts: 387
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto
Location: Germany, in the deep south

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Post

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
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Minecart, Signs Bot.

User avatar
Inocudom
Member
Posts: 3085
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Mod] Minetest-Tubelib [tubelib]

by Inocudom » Post

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.
You can now find my videos at BitChute: https://www.bitchute.com/channel/some_cheeky_jinuskian/

User avatar
joe7575
Member
Posts: 387
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto
Location: Germany, in the deep south

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Post

v0.09 is on GitHub with some modification and adjustments for tubelib_addons2.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Minecart, Signs Bot.

Chem871
Member
Posts: 947
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Post

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.
What is SCP-055 again? I forgot.

User avatar
joe7575
Member
Posts: 387
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto
Location: Germany, in the deep south

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Post

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?
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Minecart, Signs Bot.

Chem871
Member
Posts: 947
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Post

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.
What is SCP-055 again? I forgot.

Chem871
Member
Posts: 947
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Post

Could you add an auto-gravelsieve that tubelib tubes can carry stuff to/from?
What is SCP-055 again? I forgot.

User avatar
joe7575
Member
Posts: 387
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto
Location: Germany, in the deep south

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Post

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.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Minecart, Signs Bot.

Chem871
Member
Posts: 947
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Post

Awesome!
What is SCP-055 again? I forgot.

Chem871
Member
Posts: 947
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Post

How does the switch work?
What is SCP-055 again? I forgot.

User avatar
joe7575
Member
Posts: 387
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto
Location: Germany, in the deep south

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Post

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).
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Minecart, Signs Bot.

Chem871
Member
Posts: 947
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Post

Does the switch work for pushers/machines?
What is SCP-055 again? I forgot.

User avatar
joe7575
Member
Posts: 387
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto
Location: Germany, in the deep south

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Post

Chem871 wrote:Does the switch work for pushers/machines?
Yes, but please download the latest version, there was an issue with the pusher commands.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Minecart, Signs Bot.

Chem871
Member
Posts: 947
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Post

Can I use 1 switch for more than 1 pusher/machine, or just 1 switch per machine?
What is SCP-055 again? I forgot.

User avatar
joe7575
Member
Posts: 387
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto
Location: Germany, in the deep south

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Post

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.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Minecart, Signs Bot.

Chem871
Member
Posts: 947
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Post

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.
What is SCP-055 again? I forgot.

Chem871
Member
Posts: 947
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Post

What if you added a machine that grinds ore lumps into dust, and it needed biofuel to operate?
What is SCP-055 again? I forgot.

User avatar
joe7575
Member
Posts: 387
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto
Location: Germany, in the deep south

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Post

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)
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Minecart, Signs Bot.

whtemple1959
Member
Posts: 16
Joined: Sun Mar 01, 2015 19:56
Location: Columbus, Ohio, USA

Re: [Mod] Tubelib [tubelib]

by whtemple1959 » Post

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests