[SOLVEDNot sure about lua_api.txt:register_craft_prediction

Post Reply
User avatar
LMD
Member
Posts: 1474
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

[SOLVEDNot sure about lua_api.txt:register_craft_prediction

by LMD » Post

* `minetest.register_craft_predict(func(itemstack, player, old_craft_grid, craft_inv))`
* The same as before, except that it is called before the player crafts, to
make craft prediction, and it should not change anything.
Is all in the method documentation. I feel it has to be more for a method that important.
Also, I don't understand it exactly what it does... please explain all the parameters.

My scenario is : I want to make craft giving you a certain tool, in my case, a firearm; but that tool should be worn out after craft, so that the player got to "reload" it. Adventuretest AFAIK got something that works similar.
Last edited by LMD on Fri Jun 22, 2018 20:39, edited 1 time in total.
My stuff: Projects - Mods - Website

User avatar
LMD
Member
Posts: 1474
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: Not sure about lua_api.txt: register_craft_prediction

by LMD » Post

EDIT : On IRC, Krock solved it
My stuff: Projects - Mods - Website

Post Reply