[2.0.71] Power poles rewiring in reponse to can_place_entity
Posted: Tue Oct 21, 2025 1:06 pm
Setup:
substations remain disconnected after step 3.
Actual:
Substations get reconnected after step 3. Screenshot after I did the steps above.
This is problematic for bases with isolated power grids when mods expect to be able to query without side effects. Specific use case is FactorioAccess where we call this function frequently, but don't want to screw up someone's nicely blackout proofed base.
- Two connected substations.
- Disconnect them.
- Call LuaSurface::can_place_entity{name="substation", position=<between them>}
substations remain disconnected after step 3.
Actual:
Substations get reconnected after step 3. Screenshot after I did the steps above.
This is problematic for bases with isolated power grids when mods expect to be able to query without side effects. Specific use case is FactorioAccess where we call this function frequently, but don't want to screw up someone's nicely blackout proofed base.