Beacon Rebalance [Δ]


Makes beacons stronger at the cost of introducing the Beacon Overload mechanic.

Tweaks
3 months ago
2.0 - 2.1
836
Manufacturing

b Hidden helper beacons (Stable Foundations) trigger Beacon Overload

2 days ago

Factorio 2.1.19, Beacon Rebalance [Δ] 1.2.0, Stable Foundations 1.6.0.

Stable Foundations places a hidden beacon prototype ("sf-tile-bonus",
hidden = true, supply_area_distance = 0) on top of every building standing on
reinforced tiles to deliver its foundation bonus. beacons.lua:19 uses
machine.beacons_count, which includes that hidden beacon, so any machine with
ONE real beacon reports 2 and gets disabled by the overload check.

Suggested fix in beacons.check_machine: count only visible beacons.

local function real_beacon_count(machine)
local list = machine.get_beacons()
if not list then return machine.beacons_count or 0 end
local n = 0
for _, b in pairs(list) do
if b.valid and not b.prototype.hidden then n = n + 1 end
end
return n
end
-- then: local beacon_count = real_beacon_count(machine)

Plus a migration that re-runs on_beacon_change for all beacons (like your
1.0.0.lua) so already-disabled machines recover on load.

Verified locally:
machine with 1 real + 1 hidden beacon stays enabled, 2 real beacons still
trigger the overload.

New response