Skip to content

Commit 494dc06

Browse files
committed
Refresh house statistics when houses window is opened, add counts of AIRepairable and non-AIRepairable buildings
1 parent 5d9d734 commit 494dc06

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/TSMapEditor/UI/Windows/HousesWindow.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ public void Open()
425425
{
426426
Show();
427427
ListHouses();
428+
RefreshHouseStats();
428429
}
429430

430431
private void ListHouses()
@@ -481,6 +482,8 @@ private void RefreshHouseStats()
481482
stats += Environment.NewLine + "Infantry: " + map.Infantry.Count(s => s.Owner == editedHouse);
482483
stats += Environment.NewLine + "Vehicles: " + map.Units.Count(s => s.Owner == editedHouse);
483484
stats += Environment.NewLine + "Buildings: " + map.Structures.Count(s => s.Owner == editedHouse);
485+
stats += Environment.NewLine + " AI repairable: " + map.Structures.Count(s => s.Owner == editedHouse && s.AIRepairable);
486+
stats += Environment.NewLine + " not AI repairable: " + map.Structures.Count(s => s.Owner == editedHouse && !s.AIRepairable);
484487

485488
lblStatsValue.Text = stats;
486489
}

0 commit comments

Comments
 (0)