refactor: planet owner

This commit is contained in:
Ilia Denisov
2026-02-04 19:26:17 +02:00
parent 6a603ea9ad
commit c1d397c993
17 changed files with 170 additions and 183 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ func (c *Cache) MergeShipType(ri int, name, targetName string) error {
// switch planet productions to the new type
for pl := range c.g.Map.Planet {
if c.g.Map.Planet[pl].Owner == c.g.Race[ri].ID &&
if c.g.Map.Planet[pl].OwnedBy(c.g.Race[ri].ID) &&
c.g.Map.Planet[pl].Production.Type == game.ProductionShip &&
c.g.Map.Planet[pl].Production.SubjectID != nil &&
*c.g.Map.Planet[pl].Production.SubjectID == st.ID {