Index: ps/trunk/binaries/data/mods/public/gui/summary/counters.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/summary/counters.js +++ ps/trunk/binaries/data/mods/public/gui/summary/counters.js @@ -126,9 +126,6 @@ for (let type of g_ResourceData.GetCodes()) total += playerState.sequences.resourcesGathered[type][index]; - // Subtract costs for sheep/goats/pigs to get the net food gain for corralling - total -= playerState.sequences.domesticUnitsTrainedValue[index]; - total += playerState.sequences.tradeIncome[index]; return Math.round(total / 10); } @@ -244,6 +241,11 @@ }; } +function calculateLivestockTrained(playerState, index) +{ + return playerState.sequences.unitsTrained.Domestic[index]; +} + function calculateResourcesTeam(team, index, type, counters, headings) { return summaryArraySum(getPlayerValuesPerTeam(team, index, type, counters, headings)); Index: ps/trunk/binaries/data/mods/public/gui/summary/layout.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/summary/layout.js +++ ps/trunk/binaries/data/mods/public/gui/summary/layout.js @@ -116,8 +116,9 @@ "yStart": 16, "width": 121 }, - { "identifier": "treasuresCollected", "caption": translate("Treasures collected"), "yStart": 16, "width": 100 }, - { "identifier": "loot", "caption": translate("Loot"), "yStart": 16, "width": 100 } + { "identifier": "treasuresCollected", "caption": translate("Treasures collected"), "yStart": 16, "width": 85 }, + { "identifier": "loot", "caption": translate("Loot"), "yStart": 16, "width": 85 }, + { "identifier": "livestock", "caption": translate("Livestock bred"), "yStart": 16, "width": 85 } ], "titleHeadings": [ { @@ -138,8 +139,9 @@ "width": 100 })), { "width": 121, "fn": calculateTributeSent, "verticalOffset": 12 }, - { "width": 100, "fn": calculateTreasureCollected, "verticalOffset": 12 }, - { "width": 100, "fn": calculateLootCollected, "verticalOffset": 12 } + { "width": 85, "fn": calculateTreasureCollected, "verticalOffset": 12 }, + { "width": 85, "fn": calculateLootCollected, "verticalOffset": 12 }, + { "width": 85, "fn": calculateLivestockTrained, "verticalOffset": 12 } ], "teamCounterFn": calculateResourcesTeam }, Index: ps/trunk/binaries/data/mods/public/simulation/components/StatisticsTracker.js =================================================================== --- ps/trunk/binaries/data/mods/public/simulation/components/StatisticsTracker.js +++ ps/trunk/binaries/data/mods/public/simulation/components/StatisticsTracker.js @@ -16,6 +16,7 @@ "Hero", "Siege", "Ship", + "Domestic", "Trader" ]; this.unitsTrained = { @@ -28,9 +29,9 @@ "Siege": 0, "Ship": 0, "Trader": 0, + "Domestic": 0, "total": 0 }; - this.domesticUnitsTrainedValue = 0; this.unitsLost = { "Infantry": 0, "Worker": 0, @@ -179,7 +180,6 @@ { return { "unitsTrained": this.unitsTrained, - "domesticUnitsTrainedValue": this.domesticUnitsTrainedValue, "unitsLost": this.unitsLost, "unitsLostValue": this.unitsLostValue, "enemyUnitsKilled": this.enemyUnitsKilled, @@ -273,11 +273,15 @@ for (let type of this.unitsClasses) this.CounterIncrement(cmpUnitEntityIdentity, "unitsTrained", type); - ++this.unitsTrained.total; + if (!cmpUnitEntityIdentity.HasClass("Domestic")) + ++this.unitsTrained.total; if (cmpUnitEntityIdentity.HasClass("Domestic") && costs) - for (let type in costs) - this.domesticUnitsTrainedValue += costs[type]; + { + // Subtract costs for sheep/goats/pigs to get the net food gain/use for corralling + this.resourcesUsed.food -= costs.food; + this.resourcesGathered.food -= costs.food; + } };