DanielKote / Foreman2

Visual planning tool for Factorio
Other
162 stars 16 forks source link

JSON parsing error with Editor Extensions #3

Closed crashdown314 closed 2 years ago

crashdown314 commented 2 years ago

If Editor Extensions (https://mods.factorio.com/mod/EditorExtensions) is enabled when creating a new Preset the loading processes results in en error: "Foreman export could not be completed - unknown json parsing error. Sorry"

From what I can see in _dataJObjectOut.json this happens because of the fluid "ee-super-pump-speed-fluid" has a "max_temperature" of inf.

While inf is not a valid json number, Factorio handles the mod without problems, so I would suggest just disabling the EE items and fluids during the json parsing especially since there use is sort of against the intent of the mod. Or at the very least alerting people when EE is noted in the mod list.

DanielKote commented 2 years ago

Taken care of - there is now a check for all temperature values for any -inf or inf, with proper handling of both. Editor Extensions now imports correctly.