KirkMcDonald / kirkmcdonald.github.io

Simple web-based calculator for the game Factorio.
Apache License 2.0
540 stars 148 forks source link

Support array-style ingredient definitions #121

Closed RustyBlade64 closed 5 years ago

RustyBlade64 commented 5 years ago

Instead of the classical

{ type="item", name="<item-name>", amount=<amount> }

the calculator now also supports the shorthand definition

{ "<item-name>", <amount> }

for recipe ingredients and results.

For reference: Relevant prototype definitions for ItemProductPrototype and ItemIngredientPrototype.

RustyBlade64 commented 5 years ago

This fixes the issue I found with Expanded Rocket Payloads as discussed on Friday.

I originally attributed this problem to the data dumper, because the generated JSON file did not match my expectations. This however was due to the fact that I was browsing the mods source on Github instead of using the zip file. As it turns out there is a significant difference between the Github and Mod Portal versions.