Is Factorio v0.13 'relaxed' on the Product structure?

Place to get help with not working mods / modding interface.
Post Reply
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 727
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Is Factorio v0.13 'relaxed' on the Product structure?

Post by DRY411S »

See http://lua-api.factorio.com/latest/Conc ... ml#Product

I think Factorio accepts recipe results without the type field in that structure, and if it's missing, assumes it is zero.
Further, if the type field is absent, Factorio does not insist on the 'name' or 'amount' labels being present either. In this case it assumes that the table row is in 'name', 'amount' order.

The base game recipes follow this format strictly, but the vanilla code seems to allow the 'type' to be missing.

Am I right?

Helfima
Fast Inserter
Fast Inserter
Posts: 199
Joined: Tue Jun 28, 2016 11:40 am
Contact:

Re: Is Factorio v0.13 'relaxed' on the Product structure?

Post by Helfima »

if product or ingredient type are missing, is equal 0 or item

User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 727
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: Is Factorio v0.13 'relaxed' on the Product structure?

Post by DRY411S »

Helfima wrote:if product or ingredient type are missing, is equal 0 or item
That what it seems like, but the specification at the link I gave does not say that 'type' is optional, nor do any of the examples exclude it. It says that only amount, amount_min, amount_max and probability are optional.

Post Reply

Return to “Modding help”