Page 1 of 1

[2.0.15] swaping oretype under a placed miner result into empty miner

Posted: Fri Nov 15, 2024 11:36 am
by Blacky007
I use the Mod "ore-swapper 0.2.0" in a free play for a huge max sience base
I placed many miner on an stone field - then I used the mod to switch from stone to coal - (maybe if the miner has no power during the switching makes a difference)
after this swapping all miner are in empty orefield mode?
I expect that the miner start to mine the coal.

Greetings Blacky

Re: [2.0.15] swaping oretype under a placed miner result into empty miner

Posted: Sat Nov 16, 2024 7:06 pm
by Honktown
In the mod, the author can look for miners (though they have different reach), and do "update_connections()" https://lua-api.factorio.com/latest/cla ... onnections

Quoting:

Code: Select all

update_connections()

Reconnect loader, beacon, cliff and mining drill connections to entities that might have been teleported out or in by the script. The game doesn't do this automatically as we don't want to lose performance by checking this in normal games.

Re: [2.0.15] swaping oretype under a placed miner result into empty miner

Posted: Mon Nov 18, 2024 2:39 am
by boskid
Not a bug. As mentioned by Honktown, use LuaEntity::update_connections() on a drill to request a rescan of resources in range.