All objects that can be owned by player now implement IOwnableObject

This commit is contained in:
Ivan Savenko
2024-08-28 12:51:28 +00:00
parent a481f07daf
commit d49a61645c
18 changed files with 131 additions and 73 deletions
+1 -4
View File
@@ -147,10 +147,7 @@ ResourceSet NewTurnProcessor::generatePlayerIncome(PlayerColor playerID, bool ne
incomeHandicapped.applyHandicap(playerSettings->handicap.percentIncome);
for (auto obj : state.getOwnedObjects())
{
if (obj->asOwnable())
incomeHandicapped += obj->asOwnable()->dailyIncome();
}
incomeHandicapped += obj->asOwnable()->dailyIncome();
return incomeHandicapped;
}