Hello,
I am trying to write a mod where the player can craft a special item only once.
Therefore, I was thinking to leave the recipe enabled and disable it once the player crafted the item.
I could not find a way to disable the recipe while in a game session (data.raw won't work).
Is there any other way or do I have to intercept the crafting and 'reimburse' the ingredients (wasting the crafting time) to the player?
[status='solved'] Disable/enable recipe in game session
[status='solved'] Disable/enable recipe in game session
Last edited by semvoz on Thu Jun 18, 2015 6:53 am, edited 1 time in total.
Re: Disable/enable recipe in game session
My bad, I found the solution to alter recipe in a game session:
from this thread.
Code: Select all
game.players[1].force.recipes['recipe-name'].enabled = true/false