Skip to content

Commit f8dcb39

Browse files
authored
Fix ownerless planet income
1 parent 2ac806a commit f8dcb39

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

ZkData/Ef/Galaxy.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,12 @@ public void ProcessProduction()
9494

9595

9696
// planets generate metal
97-
foreach (var p in Planets.Where(x => x.Faction != null && x.Account != null))
97+
foreach (var p in Planets.Where(x => x.Faction != null))
9898
{
99-
p.Account.ProduceMetal(GlobalConst.PlanetMetalPerTurn);
99+
if (p.Account != null)
100+
p.Account.ProduceMetal(GlobalConst.PlanetMetalPerTurn);
101+
else
102+
p.Faction.Metal += GlobalConst.PlanetMetalPerTurn;
100103
}
101104
}
102105

0 commit comments

Comments
 (0)