Skip to content

Commit 902c27e

Browse files
authored
Merge pull request #2204 from ZeroK-RTS/sprunk-patch-3
Fix ownerless planet income
2 parents fe87d3b + fa927a9 commit 902c27e

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
@@ -105,9 +105,12 @@ public void ProcessProduction()
105105

106106

107107
// planets generate metal
108-
foreach (var p in Planets.Where(x => x.Faction != null && x.Account != null))
108+
foreach (var p in Planets.Where(x => x.Faction != null))
109109
{
110-
p.Account.ProduceMetal(GlobalConst.PlanetMetalPerTurn);
110+
if (p.Account != null)
111+
p.Account.ProduceMetal(GlobalConst.PlanetMetalPerTurn);
112+
else
113+
p.Faction.ProduceMetal(GlobalConst.PlanetMetalPerTurn);
111114
}
112115
}
113116

0 commit comments

Comments
 (0)