Page 1 of 1

[0.15.7] Cannot Override crafting time on expensive

Posted: Fri May 05, 2017 4:52 pm
by Peppe
All items with an expensive recipe variant ignore crafting time changes:

example data-updates.lua:
data.raw["recipe"]["fast-transport-belt"].energy_required = 11
data.raw["recipe"]["express-transport-belt"].energy_required = 11

Result in game fast belts take 11 seconds while blue belts remain .5 seconds.
Expected both to be 11 seconds.

Looks like it is only items with expensive variants.

Re: [0.15.7] Cannot Override crafting time on expensive

Posted: Fri May 05, 2017 4:55 pm
by Rseding91
That's because recipes with the "normal" and "expensive" definitions don't use the standard properties but have those in a sub-table:

data.raw["recipe]"["recipe-name"]["normal"].energy_required and ["expensive"]

Re: [0.15.7] Cannot Override crafting time on expensive

Posted: Fri May 05, 2017 4:57 pm
by Peppe
Just thought of that after i posted, thanks!