NathaU / factorio-subsurface

https://mods.factorio.com/mod/Subsurface
MIT License
2 stars 5 forks source link

[1.0.8] AAI Miners don't remove cave walls on subsurface of other planets in SpaceExploration #28

Closed Wugand closed 4 months ago

Wugand commented 4 months ago

After entering a subsurface on any SpaceExploration planet, i can't use AAI miners to expand the cave. So driving the miner against the walls does nothing. Trying the same on Nauvis works fine.

Debugging shows, that: in file scripts/aai-miners.lua, function handle_miners the variable global.subsurfaces indeed contains all existing subsurfaces. BUT: the following loop on line 62 processes only one subsurface ("nauvis_subsurface_1"). Replacing the ipairs(global.subsurfaces) with pairs(global.subsurfaces) works as an fix for me. In the table global.subsurfaces, only inidces 1 (nauvis) and 3 (Morrigan) are containing valid values (in my exmaple), using ipairs seems to not work here.

NathaU commented 4 months ago

Thanks for reporting this! After having some trouble finding the issue, I figured out that ipairs simply stops if there is now index 2.