[Mod] Node-IO API [node_io] WIP

auouymous
Member
 
Posts: 141
Joined: Sun Dec 07, 2014 09:39
GitHub: auouymous
IRC: air
In-game: auouymous

[Mod] Node-IO API [node_io] WIP

by auouymous » Tue Aug 07, 2018 09:40

This mod attempts to provide a single API for transfer mods (hoppers and pipeworks) to access inventory nodes (chests and furnaces). Any inventory node that supports the API will work with any transfer mod that also supports the API. It provides many utility functions for inventory nodes to implement the API and for transfer mods to access them. Inventory nodes that lack standard inventories can also use the API to work with transfer mods. The API currently supports item and liquid inventory nodes, but could be extended to support anything that can be transfered between nodes (signals, power, ...).

Are any inventory mod or transfer mod authors interested in using something like this? Do you have suggestions to improve the API and make it more likely to be adopted?

Dependencies: default?
License: CC0-1.0
Download: https://github.com/auouymous/node_io/archive/master.zip
Source: https://github.com/auouymous/node_io
 

Sokomine
Member
 
Posts: 3616
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] Node-IO API [node_io] WIP

by Sokomine » Sun Aug 12, 2018 10:27

There's the pipeworks mod, and there are other similar mods. Perhaps you ought to advertise your library in those threads so that it will get widely used? It's a pity that libraries are so often forgotten about.
A list of my mods can be found here.
 

User avatar
IcyDiamond
Member
 
Posts: 62
Joined: Fri Mar 30, 2018 08:55
Location: Estonia
GitHub: LunaSquee
IRC: IcyDiamond
In-game: IcyDiamond

Re: [Mod] Node-IO API [node_io] WIP

by IcyDiamond » Sun Aug 12, 2018 15:22

Hello, auouymous.

I am the developer of the up-and-coming mods Elepower, which, among other things, deals with fluid transfer and fluid_lib that deals with fluid inventory nodes. I would be interested in coming up with a solution to integrate our APIs seamlessly, because Elepower absolutely requires fluid inventories and transfer between them. The other option would be that this API becomes the universal API for all things related to *transfer and I simply make Elepower support it. I would like to hear from you.
Web developer | Minetest modder | Systems Administrator.
 

auouymous
Member
 
Posts: 141
Joined: Sun Dec 07, 2014 09:39
GitHub: auouymous
IRC: air
In-game: auouymous

Re: [Mod] Node-IO API [node_io] WIP

by auouymous » Sun Aug 12, 2018 22:39

IcyDiamond wrote:I am the developer of the up-and-coming mods Elepower, which, among other things, deals with fluid transfer and fluid_lib that deals with fluid inventory nodes.


I was given your name on irc and added support for millibuckets after looking at fluid_lib. But I then discovered a small issue with the way quantities are handled in room_for_* and put/take_* in the API. I was going to contact you and others as soon as I resolve this issue.
 

auouymous
Member
 
Posts: 141
Joined: Sun Dec 07, 2014 09:39
GitHub: auouymous
IRC: air
In-game: auouymous

Re: [Mod] Node-IO API [node_io] WIP

by auouymous » Thu Aug 16, 2018 01:55

The API has been fixed and updated.
  • The node_io_room_for_* functions return a number upto the value requested instead of a boolean.
  • The node_io_room_for_item function now has a count parameter and ignores the count in itemstack.
  • New node_io_get_*_stack functions return a copy of the itemstack (or a fake itemstack) with count always set to 1.
  • The want_item parameter for node_io_take_item function now accepts a string or itemstack.
  • New node_io_accepts_millibuckets function returns true if the liquid inventory node supports millibuckets. All liquid quantities are always in millibuckets but nodes that don't support millibuckets require increments of 1000.
 

User avatar
ChimneySwift
Member
 
Posts: 260
Joined: Fri Sep 22, 2017 06:46
Location: 127.0.0.1
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

Re: [Mod] Node-IO API [node_io] WIP

by ChimneySwift » Thu Aug 16, 2018 03:44

This looks very interesting, I like the idea of a standardized library for node IO like this, there are a lot of different pipeworks-like mods emerging and supporting them all gets complicated. I'll be adding support for this to fancy_vend when I get a chance.
"You have to be a pretty sad person to quote yourself" ~ ChimneySwift
 

User avatar
rubenwardy
Moderator
 
Posts: 5424
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
 

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

Re: [Mod] Node-IO API [node_io] WIP

by joe7575 » Thu Aug 16, 2018 11:50

Hi,

I am the developer of the Tubelib/TechPack, a transfer mod similar to pipeworks and I like the idea of a standardized node API. Unfortunately for me it comes one year to late.
But perhaps we still can bring both APIs together....
FYI, you will find my API here
Sent from my Commodore 64. My Mods: TechPack, Hyperloop, Tower Crane, Lumberjack, Iron Age, Entrance.
 


Return to WIP Mods



Who is online

Users browsing this forum: Krock and 14 guests