Suprcheese / Orbital-Ion-Cannon

A mod for Factorio: https://forums.factorio.com/viewtopic.php?f=93&t=17910
MIT License
12 stars 12 forks source link

[Compatibility Request] Big Brother #40

Open dtupper opened 4 years ago

dtupper commented 4 years ago

Currently, if you use Big Brother along with Orbital Ion Cannon and you research faster scanning outside of the active view zone, the Ion Cannons will fire on things that are revealed by the scans even if you disable that in Mod Options.

Repro Steps

  1. Have both Big Brother and Ion Cannon installed
  2. Turn off "automatically target nests in newly scanned zones" but enable "target nests in actively visible zones"
  3. Wait for a nest to be revealed in a newly scanned zone.

Expected The nest is revealed, but the cannon doesn't fire because the nest is in a newly scanned zone, and is not in an actively visible zone.

Actual The Ion Cannon targets and fires on the nest in the newly scanned zone.

I believe this is due to BigBrother handling scanning new zones differently than vanilla-- the revealed chunks don't count as "newly scanned but not within actively visible area" chunks but instead count as "temporarily revealed actively visible" chunks. I'm not sure how this is calculated behind the scenes, but the repro stands.

Suprcheese commented 4 years ago

Fascinating, I suspect your analysis is correct. I'll have to take a look at things, especially with the fresh 1.0 fever.

Suprcheese commented 4 years ago

I'm having a tough time reproducing this issue. I have Big Brother installed, "Enable Radar-Based Auto-Targeting" disabled but "Auto-Target New Nests in Visible Regions" enabled, and 5 ion cannons in orbit ready to fire. All technologies researched, and radars scanning new sectors. I do not observe any auto-targeting happening.

The backend code for "Auto-Target New Nests in Visible Regions" only checks for when a new biter expansion base is built in a visible zone -- is it possible that coincidentally happened right at the same time a sector was scanned? Big Brother sure does make radars scan very fast.