refactor: planet owner
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user