[Mod] Tubelib [tubelib]

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

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Thu Oct 05, 2017 21:38

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. My Mods: TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Entrance, Minecart, Signs Bot.
 

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

Re: [Mod] Minetest-Tubelib [tubelib]

by FaceDeer » Fri Oct 06, 2017 01:27

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: 310
Joined: Mon Apr 24, 2017 20:38
Location: Germany, in the deep south
GitHub: joe7575
In-game: JoSto

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Fri Oct 06, 2017 10:09

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. My Mods: TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Entrance, Minecart, Signs Bot.
 

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

Re: [Mod] Minetest-Tubelib [tubelib]

by DS-minetest » Fri Oct 06, 2017 14:34

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.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

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

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

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Fri Oct 06, 2017 16:01

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. My Mods: TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Entrance, Minecart, Signs Bot.
 

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

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Fri Oct 06, 2017 20:39

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. My Mods: TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Entrance, Minecart, Signs Bot.
 

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

Re: [Mod] Minetest-Tubelib [tubelib]

by Inocudom » Sat Oct 07, 2017 01:30

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.
The comedic value of my videos is how abysmal they are: https://www.youtube.com/channel/UC5cyeM ... YTfYFlih_A
 

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

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Sun Nov 05, 2017 13:55

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

Chem871
Member
 
Posts: 937
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Dwaba_Kukai

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Mon Nov 06, 2017 17:15

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: 310
Joined: Mon Apr 24, 2017 20:38
Location: Germany, in the deep south
GitHub: joe7575
In-game: JoSto

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Mon Nov 06, 2017 19:51

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. My Mods: TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Entrance, Minecart, Signs Bot.
 

Chem871
Member
 
Posts: 937
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Dwaba_Kukai

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Mon Nov 06, 2017 20:34

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: 937
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Dwaba_Kukai

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Tue Nov 07, 2017 16:49

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: 310
Joined: Mon Apr 24, 2017 20:38
Location: Germany, in the deep south
GitHub: joe7575
In-game: JoSto

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Tue Nov 07, 2017 20:53

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. My Mods: TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Entrance, Minecart, Signs Bot.
 

Chem871
Member
 
Posts: 937
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Dwaba_Kukai
 

Chem871
Member
 
Posts: 937
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Dwaba_Kukai

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Wed Nov 08, 2017 19:05

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

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

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Thu Nov 09, 2017 19:10

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. My Mods: TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Entrance, Minecart, Signs Bot.
 

Chem871
Member
 
Posts: 937
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Dwaba_Kukai

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Thu Nov 09, 2017 21:22

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

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

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Fri Nov 10, 2017 06:19

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. My Mods: TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Entrance, Minecart, Signs Bot.
 

Chem871
Member
 
Posts: 937
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Dwaba_Kukai

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Fri Nov 10, 2017 13:35

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: 310
Joined: Mon Apr 24, 2017 20:38
Location: Germany, in the deep south
GitHub: joe7575
In-game: JoSto

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Fri Nov 10, 2017 23:39

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. My Mods: TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Entrance, Minecart, Signs Bot.
 

Chem871
Member
 
Posts: 937
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Dwaba_Kukai

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Sat Nov 11, 2017 00:37

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: 937
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Dwaba_Kukai

Re: [Mod] Minetest-Tubelib [tubelib]

by Chem871 » Mon Dec 10, 2018 19:03

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: 310
Joined: Mon Apr 24, 2017 20:38
Location: Germany, in the deep south
GitHub: joe7575
In-game: JoSto

Re: [Mod] Minetest-Tubelib [tubelib]

by joe7575 » Tue Dec 11, 2018 18:45

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. My Mods: TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Entrance, Minecart, Signs Bot.
 

Previous

Return to WIP Mods



Who is online

Users browsing this forum: CalebJ, IceDragon200 and 8 guests