Updating to 0.16

Place to get help with not working mods / modding interface.
vexorum
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Apr 14, 2018 6:11 am
Contact:

Updating to 0.16

Post 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!
betrok
Fast Inserter
Fast Inserter
Posts: 101
Joined: Wed Feb 28, 2018 12:08 pm
Contact:

Re: Updating to 0.16

Post by betrok »

LuaEntity.set_recipe?
If your machine can use nothing but only one recipe, you can set fixed_recipe in the prototype.
vexorum
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Apr 14, 2018 6:11 am
Contact:

Re: Updating to 0.16

Post 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
Post Reply

Return to “Modding help”