More-Wrong / Factorio-True-Nukes

A factorio mod adding realistic nuclear blasts, and more nuclear options.
MIT License
3 stars 8 forks source link

Optimise compatibility with SE #13

Closed niekschoemaker closed 2 years ago

niekschoemaker commented 2 years ago

When using a lot of modded tiles the compatibility check would cause enormous freezes and make nukes unusable.

I haven't checked if this breaks compatibility, so I haven't tested this with space-exploration enabled only without the plugin, but this does increase performance by a lot when using a lot of modded tiles.

count_tiles_filtered is slower the more modded tiles you have, so when using bob's mod, which adds a lot of tiles, it makes the mod completely unusable since every chunk generation takes about 1 second to finish, so nukes take around 2 hours to finish and after a nuke there are enourmous lag spikes, and after I while I figured out that this small piece of code was the culprit.

More-Wrong commented 2 years ago

Yeah, that makes complete sense. I honestly figured the check would be cheap, but if it isn't, then I have no problem changing it...