result vs results

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

result vs results

Post by Honktown »

I see some mods use "results" even when there's only a single item for certain things (mining, recipes). Is there a reason for this?
I have mods! I guess!
Link

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2250
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: result vs results

Post by boskid »

"result" is old one, for it to specify amount you would have to add extra property "result_count" because default is 1 (you can see this in "transport-belt" recipe). No other attributes can be added for it.

"results" is new, generic one in which you can specify many products, each with its own count and with some extra options like minimum count, maximum count, probability and catalyst amount.

Since "result" is not going to be removed for obvious reasons, feel free to use whatever you want.

Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: result vs results

Post by Honktown »

Thanks. Makes sense.
I have mods! I guess!
Link

Post Reply

Return to “Modding discussion”