Hi there,
Just trying to find the method that is called when you click an item to craft.
I realise there is an insert command to place an item in the player's inventory, but I would like to be able to have an item begin crafting on a condition set in a mod.
Hoping there is a simple 'player.craft(itemname, quantity)' style solution, but I couldn't find the code to do it.
Any help would be much appreciated.
Thank you.
How do I craft a given item from lua?
Re: How do I craft a given item from lua?
No one has any info?
Is this something we don't have access to from code?
Any information welcome, or perhaps a work around to emulate crafting an item, taking out mats, waiting a time, then inserting the desired item perhaps.
Messy but might work if there is no way to trigger a player to craft.
Is this something we don't have access to from code?
Any information welcome, or perhaps a work around to emulate crafting an item, taking out mats, waiting a time, then inserting the desired item perhaps.
Messy but might work if there is no way to trigger a player to craft.
-
- Filter Inserter
- Posts: 478
- Joined: Sat Aug 23, 2014 11:43 pm
- Contact:
Re: How do I craft a given item from lua?
You can find all the methods that modify a player here. By the looks of it it doeesn't look like it's possible to force a player to craft something. You can ask the devs to make it possible by making a post about it here.
Waste of bytes : P
Re: How do I craft a given item from lua?
Thank you very much! I will make a topic requesting it there.