[Mod] Replicator [replicator]

Post Reply
redyeti
New member
Posts: 3
Joined: Thu Jun 12, 2014 11:46

[Mod] Replicator [replicator]

by redyeti » Post

Hello everyone,

this mod adds a Replicator, a device similar to the Autocrafter from Pipeworks. (Actually, its code is based on it.)

Just as the Autocrafter, the Replicator will use the world's recipes to automatically craft items. However, while the Autocrafter needs to be told the exact recipe, the Replicator just has to know what you want it to craft. It will then try all existing recipes to build the requested item.

Image

Usage and complete documentation: https://github.com/redyeti/minetest-rep ... /README.md

Dependencies: Pipeworks, Mesecons

License: WTFPL (applies to all parts)

Download: https://github.com/redyeti/minetest-rep ... master.zip
...or browse the code: https://github.com/redyeti/minetest-replicator

Install: Download and unzip the above file, rename minetest-replicator-master to just "replicator" and move it into Minetest's mods directory.

User avatar
Mitroman
Member
Posts: 62
Joined: Thu Apr 03, 2014 19:47
GitHub: Mitroman
In-game: Mitroman15

Re: [Mod] Replicator [replicator]

by Mitroman » Post

Cool mod. I'll download it soon ;)

User avatar
philipbenr
Member
Posts: 1897
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

Re: [Mod] Replicator [replicator]

by philipbenr » Post

There is a "replicator" already in the castles mod, and I always wondered how Dan made it. I suppose that I'll take a look at yours... Anyhow, the one used in the castles mod has no dependencies.

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Replicator [replicator]

by Krock » Post

Hmm does this use much ABM/CPU power?
Going through every recipe might be laggy.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

redyeti
New member
Posts: 3
Joined: Thu Jun 12, 2014 11:46

Re: [Mod] Replicator [replicator]

by redyeti » Post

Krock wrote:Hmm does this use much ABM/CPU power?
Going through every recipe might be laggy.
The mod uses the APIs minetest.get_all_craft_recipes(query item) function. It returns all the recipes which can be used to craft an item. As far as I know, for most items, the number of recipes returned is 1, sometimes 3 or 4 ... so there are not much recipes to go through within the lua code of this mod.

So, I guess, the answer mainly depends on whether the get_all_craft_recipes API function runs efficiently …

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests