Page 1 of 1

Updating to 0.16

Posted: Sat Apr 14, 2018 6:16 am
by vexorum
Hi!

I've been working on an extended late-game mod and I'm trying to update it for 0.16.
I noticed that "icon_size" has become a required field for almost anything. That was easy enough to fix. But now I've run into a problem I could use some help with.

Previously I ran a function that used "entity.recipe = ..." to control the recipe being crafted by a machine in the mod. This field is no longer there. I've looked by am finding only the old docs. Does anyone know, how do I set a recipe on a machine?

I suspect I'll have more questions for you to puzzle over but right now my mod crashes until this is fixed, ha!

Re: Updating to 0.16

Posted: Sat Apr 14, 2018 4:08 pm
by betrok
LuaEntity.set_recipe?
If your machine can use nothing but only one recipe, you can set fixed_recipe in the prototype.

Re: Updating to 0.16

Posted: Sat Apr 14, 2018 8:18 pm
by vexorum
Thanks batrok. That fixed my crash.
My machine has a different recipe depending on where it is placed in the world. I don't know what the recipe will be until the player places it.
Testing continues! :D