Merge pull request #11645 from RailTracker/bleed

Changed Basic and Combat observer stats to include Assets Destroyed/L…
This commit is contained in:
abcdefg30
2016-07-18 19:58:11 +02:00
committed by GitHub
4 changed files with 90 additions and 47 deletions

View File

@@ -200,8 +200,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var stats = player.PlayerActor.TraitOrDefault<PlayerStatistics>(); var stats = player.PlayerActor.TraitOrDefault<PlayerStatistics>();
if (stats == null) return template; if (stats == null) return template;
template.Get<LabelWidget>("KILLS_COST").GetText = () => "$" + stats.KillsCost; template.Get<LabelWidget>("ASSETS_DESTROYED").GetText = () => "$" + stats.KillsCost;
template.Get<LabelWidget>("DEATHS_COST").GetText = () => "$" + stats.DeathsCost; template.Get<LabelWidget>("ASSETS_LOST").GetText = () => "$" + stats.DeathsCost;
template.Get<LabelWidget>("UNITS_KILLED").GetText = () => stats.UnitsKilled.ToString(); template.Get<LabelWidget>("UNITS_KILLED").GetText = () => stats.UnitsKilled.ToString();
template.Get<LabelWidget>("UNITS_DEAD").GetText = () => stats.UnitsDead.ToString(); template.Get<LabelWidget>("UNITS_DEAD").GetText = () => stats.UnitsDead.ToString();
template.Get<LabelWidget>("BUILDINGS_KILLED").GetText = () => stats.BuildingsKilled.ToString(); template.Get<LabelWidget>("BUILDINGS_KILLED").GetText = () => stats.BuildingsKilled.ToString();
@@ -271,7 +271,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (stats == null) return template; if (stats == null) return template;
template.Get<LabelWidget>("KILLS").GetText = () => (stats.UnitsKilled + stats.BuildingsKilled).ToString(); template.Get<LabelWidget>("KILLS").GetText = () => (stats.UnitsKilled + stats.BuildingsKilled).ToString();
template.Get<LabelWidget>("DEATHS").GetText = () => (stats.UnitsDead + stats.BuildingsDead).ToString(); template.Get<LabelWidget>("DEATHS").GetText = () => (stats.UnitsDead + stats.BuildingsDead).ToString();
template.Get<LabelWidget>("KD_RATIO").GetText = () => KillDeathRatio(stats.UnitsKilled + stats.BuildingsKilled, stats.UnitsDead + stats.BuildingsDead); template.Get<LabelWidget>("ASSETS_DESTROYED").GetText = () => "$" + stats.KillsCost;
template.Get<LabelWidget>("ASSETS_LOST").GetText = () => "$" + stats.DeathsCost;
template.Get<LabelWidget>("ACTIONS_MIN").GetText = () => AverageOrdersPerMinute(stats.OrderCount); template.Get<LabelWidget>("ACTIONS_MIN").GetText = () => AverageOrdersPerMinute(stats.OrderCount);
return template; return template;

View File

@@ -74,16 +74,24 @@ Background@INGAME_OBSERVERSTATS_BG:
Font: Bold Font: Bold
Text: Deaths Text: Deaths
Align: Right Align: Right
Label@KD_RATIO_HEADER: Label@ASSETS_DESTROYED_HEADER:
X: 615 X: 625
Y: 40 Y: 40
Width: 80 Width: 60
Height: 25 Height: 25
Font: Bold Font: Bold
Text: Kills/Deaths Text: Destroyed
Align: Right
Label@ASSETS_LOST_HEADER:
X: 685
Y: 40
Width: 60
Height: 25
Font: Bold
Text: Lost
Align: Right Align: Right
Label@ACTIONS_MIN_HEADER: Label@ACTIONS_MIN_HEADER:
X: 745 X: 805
Y: 40 Y: 40
Width: 40 Width: 40
Height: 25 Height: 25
@@ -193,20 +201,20 @@ Background@INGAME_OBSERVERSTATS_BG:
Height: 25 Height: 25
Font: Bold Font: Bold
Text: Player Text: Player
Label@KILLS_COST_HEADER: Label@ASSETS_DESTROYED_HEADER:
X: 235 X: 230
Y: 40 Y: 40
Width: 60 Width: 60
Height: 25 Height: 25
Font: Bold Font: Bold
Text: Kills Text: Destroyed
Label@DEATHS_COST_HEADER: Label@ASSETS_LOST_HEADER:
X: 315 X: 325
Y: 40 Y: 40
Width: 60 Width: 60
Height: 25 Height: 25
Font: Bold Font: Bold
Text: Deaths Text: Lost
Label@UNITS_KILLED_HEADER: Label@UNITS_KILLED_HEADER:
X: 415 X: 415
Y: 40 Y: 40
@@ -319,14 +327,20 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 40 Width: 40
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
Align: Right Align: Right
Label@KD_RATIO: Label@ASSETS_DESTROYED:
X: 595 X: 595
Y: 0 Y: 0
Width: 80 Width: 60
Height: PARENT_BOTTOM
Align: Right
Label@ASSETS_LOST:
X: 660
Y: 0
Width: 60
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
Align: Right Align: Right
Label@ACTIONS_MIN: Label@ACTIONS_MIN:
X: 725 X: 775
Y: 0 Y: 0
Width: 40 Width: 40
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
@@ -434,12 +448,12 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 160 Width: 160
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
Font: Bold Font: Bold
Label@KILLS_COST: Label@ASSETS_DESTROYED:
X: 215 X: 215
Y: 0 Y: 0
Width: 60 Width: 60
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
Label@DEATHS_COST: Label@ASSETS_LOST:
X: 295 X: 295
Y: 0 Y: 0
Width: 60 Width: 60

View File

@@ -74,16 +74,24 @@ Background@INGAME_OBSERVERSTATS_BG:
Font: Bold Font: Bold
Text: Deaths Text: Deaths
Align: Right Align: Right
Label@KD_RATIO_HEADER: Label@ASSETS_DESTROYED_HEADER:
X: 625 X: 625
Y: 40 Y: 40
Width: 80 Width: 60
Height: 25 Height: 25
Font: Bold Font: Bold
Text: Kills/Deaths Text: Destroyed
Align: Right
Label@ASSETS_LOST_HEADER:
X: 685
Y: 40
Width: 60
Height: 25
Font: Bold
Text: Lost
Align: Right Align: Right
Label@ACTIONS_MIN_HEADER: Label@ACTIONS_MIN_HEADER:
X: 755 X: 805
Y: 40 Y: 40
Width: 40 Width: 40
Height: 25 Height: 25
@@ -193,20 +201,20 @@ Background@INGAME_OBSERVERSTATS_BG:
Height: 25 Height: 25
Font: Bold Font: Bold
Text: Player Text: Player
Label@KILLS_COST_HEADER: Label@ASSETS_DESTROYED_HEADER:
X: 245 X: 230
Y: 40 Y: 40
Width: 60 Width: 60
Height: 25 Height: 25
Font: Bold Font: Bold
Text: Kills Text: Destroyed
Label@DEATHS_COST_HEADER: Label@ASSETS_LOST_HEADER:
X: 325 X: 325
Y: 40 Y: 40
Width: 60 Width: 60
Height: 25 Height: 25
Font: Bold Font: Bold
Text: Deaths Text: Lost
Label@UNITS_KILLED_HEADER: Label@UNITS_KILLED_HEADER:
X: 425 X: 425
Y: 40 Y: 40
@@ -319,14 +327,20 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 40 Width: 40
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
Align: Right Align: Right
Label@KD_RATIO: Label@ASSETS_DESTROYED:
X: 595 X: 595
Y: 0 Y: 0
Width: 80 Width: 60
Height: PARENT_BOTTOM
Align: Right
Label@ASSETS_LOST:
X: 660
Y: 0
Width: 60
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
Align: Right Align: Right
Label@ACTIONS_MIN: Label@ACTIONS_MIN:
X: 725 X: 775
Y: 0 Y: 0
Width: 40 Width: 40
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
@@ -434,12 +448,12 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 160 Width: 160
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
Font: Bold Font: Bold
Label@KILLS_COST: Label@ASSETS_DESTROYED:
X: 215 X: 215
Y: 0 Y: 0
Width: 60 Width: 60
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
Label@DEATHS_COST: Label@ASSETS_LOST:
X: 295 X: 295
Y: 0 Y: 0
Width: 60 Width: 60

View File

@@ -74,16 +74,24 @@ Background@INGAME_OBSERVERSTATS_BG:
Font: Bold Font: Bold
Text: Deaths Text: Deaths
Align: Right Align: Right
Label@KD_RATIO_HEADER: Label@ASSETS_DESTROYED_HEADER:
X: 625 X: 625
Y: 40 Y: 40
Width: 80 Width: 60
Height: 25 Height: 25
Font: Bold Font: Bold
Text: Kills/Deaths Text: Destroyed
Align: Right
Label@ASSETS_LOST_HEADER:
X: 685
Y: 40
Width: 60
Height: 25
Font: Bold
Text: Lost
Align: Right Align: Right
Label@ACTIONS_MIN_HEADER: Label@ACTIONS_MIN_HEADER:
X: 755 X: 805
Y: 40 Y: 40
Width: 40 Width: 40
Height: 25 Height: 25
@@ -193,20 +201,20 @@ Background@INGAME_OBSERVERSTATS_BG:
Height: 25 Height: 25
Font: Bold Font: Bold
Text: Player Text: Player
Label@KILLS_COST_HEADER: Label@ASSETS_DESTROYED_HEADER:
X: 245 X: 230
Y: 40 Y: 40
Width: 60 Width: 60
Height: 25 Height: 25
Font: Bold Font: Bold
Text: Kills Text: Destroyed
Label@DEATHS_COST_HEADER: Label@ASSETS_LOST_HEADER:
X: 325 X: 325
Y: 40 Y: 40
Width: 60 Width: 60
Height: 25 Height: 25
Font: Bold Font: Bold
Text: Deaths Text: Lost
Label@UNITS_KILLED_HEADER: Label@UNITS_KILLED_HEADER:
X: 425 X: 425
Y: 40 Y: 40
@@ -319,14 +327,20 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 40 Width: 40
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
Align: Right Align: Right
Label@KD_RATIO: Label@ASSETS_DESTROYED:
X: 595 X: 595
Y: 0 Y: 0
Width: 80 Width: 60
Height: PARENT_BOTTOM
Align: Right
Label@ASSETS_LOST:
X: 660
Y: 0
Width: 60
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
Align: Right Align: Right
Label@ACTIONS_MIN: Label@ACTIONS_MIN:
X: 725 X: 775
Y: 0 Y: 0
Width: 40 Width: 40
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
@@ -436,12 +450,12 @@ Background@INGAME_OBSERVERSTATS_BG:
Width: 160 Width: 160
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
Font: Bold Font: Bold
Label@KILLS_COST: Label@ASSETS_DESTROYED:
X: 215 X: 215
Y: 0 Y: 0
Width: 60 Width: 60
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
Label@DEATHS_COST: Label@ASSETS_LOST:
X: 295 X: 295
Y: 0 Y: 0
Width: 60 Width: 60