raiguard / EditorExtensions

Extends the Factorio map editor with new features, testing tools, and other utilities to aid with sandbox play and scenario creation.
https://mods.factorio.com/mod/EditorExtensions
Other
26 stars 6 forks source link

Don't leave invalid prototypes around between data stages 🙏 #47

Closed theRustyKnife closed 3 years ago

theRustyKnife commented 3 years ago

I'm specifically talking about the item ee-linked-belt as it relates to this crash. The problem is that it's created in data, but this line sets it's place_result to ee-linked-belt-express, which is only created in data-final-fixes by this line (assuming the express belt exists, which is potentially a whole another issue).

This leaves any mods running in between these two stages with invalid prototypes, causing problems like the one mentioned above. It's also just bad manners, though that's hardly an objective argument :smile:

The above crash can be reproduced by simply installing the following three mods along with this one: Rusty Locale, Transport Drones and Crafting Combinator. The explanation for why it's not a fault of any of those mods is in the linked post.

I managed to fix this particular crash by setting the place_result to nil, though I'm not familiar enough with the mod to say if that's an adequate solution or not... Another solution would be adding an optional dependency to Crafting Combinator, though that would be fixing the symptoms, rather than the root cause, so I'd rather avoid it.

Given the threatening sentence in the issue template, I feel obligated to mention that save files, usernames and log files are completely irrelevant to this issue :smile:

raiguard commented 3 years ago

Thanks for the report. I've gone ahead and added code to dynamically set the place_result of that item to the fastest detected belt type, instead of it being hardcoded. This applies to the infinity loader as well.