When using the upgrade planner, it currently won't automatically upgrade the solar panels or accumulators unless they are specifically set in the upgrade planner. This is because entities have a next_upgrade
property, which, went set, will tell the upgrade planner what to default to. https://wiki.factorio.com/Prototype/Entity#next_upgrade
I tested it today to make sure it would work, and it does. Below are the changes I made:
in data.lua
(approx line 48):
-- add these lines so that the regular solar panel and accumulator upgrade to the advanced ones
data.raw["accumulator"]["accumulator"].next_upgrade = "advanced-accumulator"
data.raw["solar-panel"]["solar-panel"].next_upgrade = "advanced-solar"
in entity/advanced-solar.lua
-- line 2
tier=settings.startup["advanced-electric-enabled-tiers"].value
-- approx line 50, only set next upgrade if additional tiers are unlocked
if tier == "elite" or tier == "ultimate" then
advanced_solar.next_upgrade = "elite-solar"
end
in entity/elite-solar.lua
-- line 2
tier=settings.startup["advanced-electric-enabled-tiers"].value
-- approx line 50, only set next upgrade if additional tiers are unlocked
if tier == "ultimate" then
elite_solar.next_upgrade = "ultimate-solar"
end
in entity/advanced-accumulator.lua
-- line 2
tier=settings.startup["advanced-electric-enabled-tiers"].value
-- approx line 134, only set next upgrade if additional tiers are unlocked
if tier == "elite" or tier == "ultimate" then
advanced_accumulator.next_upgrade = "elite-accumulator"
end
in entity/elite-accumulator.lua
-- line 2
tier=settings.startup["advanced-electric-enabled-tiers"].value
-- approx line 134, only set next upgrade if additional tiers are unlocked
if tier == "ultimate" then
elite_accumulator.next_upgrade = "ultimate-accumulator"
end
That should do the trick!