diff --git a/OpenRA.Mods.Common/Traits/Player/PlayerStatistics.cs b/OpenRA.Mods.Common/Traits/Player/PlayerStatistics.cs index d6403981d4..29553572e8 100644 --- a/OpenRA.Mods.Common/Traits/Player/PlayerStatistics.cs +++ b/OpenRA.Mods.Common/Traits/Player/PlayerStatistics.cs @@ -9,7 +9,6 @@ */ #endregion -using System; using System.Collections.Generic; using OpenRA.Graphics; using OpenRA.Traits; @@ -29,14 +28,6 @@ namespace OpenRA.Mods.Common.Traits public int OrderCount; - public int EarnedThisMinute - { - get - { - return resources != null ? resources.Earned - earnedAtBeginningOfMinute : 0; - } - } - public int Experience { get @@ -45,8 +36,10 @@ namespace OpenRA.Mods.Common.Traits } } - public List EarnedSamples = new List(100); - int earnedAtBeginningOfMinute; + // Low resolution (every 30 seconds) record of earnings, covering the entire game + public List IncomeSamples = new List(100); + public int Income; + public int DisplayIncome; public List ArmySamples = new List(100); @@ -60,8 +53,14 @@ namespace OpenRA.Mods.Common.Traits public int BuildingsDead; public int ArmyValue; - int replayTimestep; + + // High resolution (every second) record of earnings, limited to the last minute + readonly Queue earnedSeconds = new Queue(60); + + int lastIncome; + int lastIncomeTick; int ticks; + int replayTimestep; public PlayerStatistics(Actor self) { } @@ -71,32 +70,37 @@ namespace OpenRA.Mods.Common.Traits experience = self.TraitOrDefault(); } - void UpdateEarnedThisMinute() - { - EarnedSamples.Add(EarnedThisMinute); - earnedAtBeginningOfMinute = resources != null ? resources.Earned : 0; - } - - void UpdateArmyThisMinute() - { - ArmySamples.Add(ArmyValue); - } - void ITick.Tick(Actor self) { - if (self.Owner.WinState != WinState.Undefined) - return; - ticks++; var timestep = self.World.IsReplay ? replayTimestep : self.World.Timestep; - - if (ticks * timestep >= 60000) + if (ticks * timestep >= 30000) { ticks = 0; - UpdateEarnedThisMinute(); - UpdateArmyThisMinute(); + + if (ArmyValue != 0 || self.Owner.WinState == WinState.Undefined) + ArmySamples.Add(ArmyValue); + + if (resources != null && (Income != 0 || self.Owner.WinState == WinState.Undefined)) + IncomeSamples.Add(Income); } + + if (resources == null) + return; + + var tickDelta = self.World.WorldTick - lastIncomeTick; + if (tickDelta * timestep >= 1000) + { + lastIncomeTick = self.World.WorldTick; + + var lastEarned = earnedSeconds.Count > 59 ? earnedSeconds.Dequeue() : 0; + lastIncome = DisplayIncome = Income; + Income = resources.Earned - lastEarned; + earnedSeconds.Enqueue(resources.Earned); + } + else + DisplayIncome = int2.Lerp(lastIncome, Income, tickDelta * timestep, 1000); } public void ResolveOrder(Actor self, Order order) @@ -130,8 +134,8 @@ namespace OpenRA.Mods.Common.Traits if (w.IsReplay) replayTimestep = w.WorldActor.Trait().GameSpeed.Timestep; - UpdateEarnedThisMinute(); - UpdateArmyThisMinute(); + ArmySamples.Add(ArmyValue); + IncomeSamples.Add(Income); } } diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs index 038b9becce..2a87b8b430 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs @@ -38,10 +38,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic readonly ScrollItemWidget productionPlayerTemplate; readonly ScrollItemWidget supportPowersPlayerTemplate; readonly ScrollItemWidget combatPlayerTemplate; - readonly ContainerWidget earnedThisMinuteGraphContainer; - readonly ContainerWidget armyThisMinuteGraphContainer; - readonly LineGraphWidget earnedThisMinuteGraph; - readonly LineGraphWidget armyThisMinuteGraph; + readonly ContainerWidget incomeGraphContainer; + readonly ContainerWidget armyValueGraphContainer; + readonly LineGraphWidget incomeGraph; + readonly LineGraphWidget armyValueGraph; readonly ScrollItemWidget teamTemplate; readonly IEnumerable players; readonly IOrderedEnumerable> teams; @@ -95,11 +95,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic supportPowersPlayerTemplate = playerStatsPanel.Get("SUPPORT_POWERS_PLAYER_TEMPLATE"); combatPlayerTemplate = playerStatsPanel.Get("COMBAT_PLAYER_TEMPLATE"); - earnedThisMinuteGraphContainer = widget.Get("EARNED_THIS_MIN_GRAPH_CONTAINER"); - earnedThisMinuteGraph = earnedThisMinuteGraphContainer.Get("EARNED_THIS_MIN_GRAPH"); + incomeGraphContainer = widget.Get("INCOME_GRAPH_CONTAINER"); + incomeGraph = incomeGraphContainer.Get("INCOME_GRAPH"); - armyThisMinuteGraphContainer = widget.Get("ARMY_THIS_MIN_GRAPH_CONTAINER"); - armyThisMinuteGraph = armyThisMinuteGraphContainer.Get("ARMY_THIS_MIN_GRAPH"); + armyValueGraphContainer = widget.Get("ARMY_VALUE_GRAPH_CONTAINER"); + armyValueGraph = armyValueGraphContainer.Get("ARMY_VALUE_GRAPH"); teamTemplate = playerStatsPanel.Get("TEAM_TEMPLATE"); @@ -144,8 +144,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic createStatsOption("Production", ObserverStatsPanel.Production, productionPlayerTemplate, () => DisplayStats(ProductionStats)), createStatsOption("Support Powers", ObserverStatsPanel.SupportPowers, supportPowersPlayerTemplate, () => DisplayStats(SupportPowerStats)), createStatsOption("Combat", ObserverStatsPanel.Combat, combatPlayerTemplate, () => DisplayStats(CombatStats)), - createStatsOption("Earnings (graph)", ObserverStatsPanel.Graph, null, () => EarnedThisMinuteGraph()), - createStatsOption("Army (graph)", ObserverStatsPanel.ArmyGraph, null, () => ArmyThisMinuteGraph()), + createStatsOption("Earnings (graph)", ObserverStatsPanel.Graph, null, () => IncomeGraph()), + createStatsOption("Army (graph)", ObserverStatsPanel.ArmyGraph, null, () => ArmyValueGraph()), }; Func setupItem = (option, template) => @@ -192,31 +192,31 @@ namespace OpenRA.Mods.Common.Widgets.Logic supportPowerStatsHeaders.Visible = false; combatStatsHeaders.Visible = false; - earnedThisMinuteGraphContainer.Visible = false; - armyThisMinuteGraphContainer.Visible = false; + incomeGraphContainer.Visible = false; + armyValueGraphContainer.Visible = false; - earnedThisMinuteGraph.GetSeries = null; - armyThisMinuteGraph.GetSeries = null; + incomeGraph.GetSeries = null; + armyValueGraph.GetSeries = null; } - void EarnedThisMinuteGraph() + void IncomeGraph() { playerStatsPanel.Visible = false; - earnedThisMinuteGraphContainer.Visible = true; + incomeGraphContainer.Visible = true; - earnedThisMinuteGraph.GetSeries = () => + incomeGraph.GetSeries = () => players.Select(p => new LineGraphSeries( p.PlayerName, p.Color, - (p.PlayerActor.TraitOrDefault() ?? new PlayerStatistics(p.PlayerActor)).EarnedSamples.Select(s => (float)s))); + (p.PlayerActor.TraitOrDefault() ?? new PlayerStatistics(p.PlayerActor)).IncomeSamples.Select(s => (float)s))); } - void ArmyThisMinuteGraph() + void ArmyValueGraph() { playerStatsPanel.Visible = false; - armyThisMinuteGraphContainer.Visible = true; + armyValueGraphContainer.Visible = true; - armyThisMinuteGraph.GetSeries = () => + armyValueGraph.GetSeries = () => players.Select(p => new LineGraphSeries( p.PlayerName, p.Color, @@ -344,10 +344,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic var res = player.PlayerActor.Trait(); var stats = player.PlayerActor.TraitOrDefault(); - if (stats == null) return template; + if (stats == null) + return template; template.Get("CASH").GetText = () => "$" + (res.Cash + res.Resources); - template.Get("EARNED_MIN").GetText = () => AverageEarnedPerMinute(res.Earned); + template.Get("INCOME").GetText = () => "$" + stats.DisplayIncome; template.Get("EARNED").GetText = () => "$" + res.Earned; template.Get("SPENT").GetText = () => "$" + res.Spent; @@ -393,7 +394,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic } var stats = player.PlayerActor.TraitOrDefault(); - if (stats == null) return template; + if (stats == null) + return template; + template.Get("KILLS").GetText = () => (stats.UnitsKilled + stats.BuildingsKilled).ToString(); template.Get("DEATHS").GetText = () => (stats.UnitsDead + stats.BuildingsDead).ToString(); template.Get("ASSETS_DESTROYED").GetText = () => "$" + stats.KillsCost; @@ -484,11 +487,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic return (world.WorldTick == 0 ? 0 : orders / (world.WorldTick / 1500.0)).ToString("F1"); } - string AverageEarnedPerMinute(double earned) - { - return "$" + (world.WorldTick == 0 ? 0 : earned / (world.WorldTick / 1500.0)).ToString("F0"); - } - static Color GetPowerColor(PowerState state) { if (state == PowerState.Critical) return Color.Red; diff --git a/mods/cnc/chrome/ingame.yaml b/mods/cnc/chrome/ingame.yaml index ffffbbc632..b647121382 100644 --- a/mods/cnc/chrome/ingame.yaml +++ b/mods/cnc/chrome/ingame.yaml @@ -388,7 +388,7 @@ Container@OBSERVER_WIDGETS: Container@ECONOMY_STATS_HEADERS: X: 0 Y: 0 - Width: 715 + Width: 735 Height: PARENT_BOTTOM Children: ColorBlock@HEADER_COLOR: @@ -419,16 +419,16 @@ Container@OBSERVER_WIDGETS: Text: Cash Align: Right Shadow: True - Label@EARNED_MIN_HEADER: + Label@INCOME_HEADER: X: 240 - Width: 60 + Width: 80 Height: PARENT_BOTTOM Font: Bold - Text: $/min + Text: Income Align: Right Shadow: True Label@ASSETS_HEADER: - X: 300 + X: 320 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -436,7 +436,7 @@ Container@OBSERVER_WIDGETS: Align: Right Shadow: True Label@EARNED_HEADER: - X: 380 + X: 400 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -444,7 +444,7 @@ Container@OBSERVER_WIDGETS: Align: Right Shadow: True Label@SPENT_HEADER: - X: 460 + X: 480 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -452,7 +452,7 @@ Container@OBSERVER_WIDGETS: Align: Right Shadow: True Label@HARVESTERS_HEADER: - X: 540 + X: 560 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -460,7 +460,7 @@ Container@OBSERVER_WIDGETS: Align: Right Shadow: True Label@DERRICKS_HEADER: - X: 630 + X: 650 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -757,7 +757,7 @@ Container@OBSERVER_WIDGETS: ScrollItem@ECONOMY_PLAYER_TEMPLATE: X: 0 Y: 0 - Width: 715 + Width: 735 Height: 24 BaseName: scrollitem-nohover Children: @@ -792,43 +792,43 @@ Container@OBSERVER_WIDGETS: Height: PARENT_BOTTOM Align: Right Shadow: True - Label@EARNED_MIN: + Label@INCOME: X: 240 Y: 0 - Width: 60 + Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@ASSETS: - X: 300 + X: 320 Y: 0 Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@EARNED: - X: 380 + X: 400 Y: 0 Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@SPENT: - X: 460 + X: 480 Y: 0 Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@HARVESTERS: - X: 540 + X: 560 Y: 0 Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@DERRICKS: - X: 630 + X: 650 Y: 0 Width: 80 Height: PARENT_BOTTOM @@ -988,7 +988,7 @@ Container@OBSERVER_WIDGETS: Height: PARENT_BOTTOM Align: Right Shadow: True - Container@EARNED_THIS_MIN_GRAPH_CONTAINER: + Container@INCOME_GRAPH_CONTAINER: X: 0 Y: 30 Width: PARENT_RIGHT @@ -1001,21 +1001,20 @@ Container@OBSERVER_WIDGETS: Width: PARENT_RIGHT Height: PARENT_BOTTOM Color: 00000090 - LineGraph@EARNED_THIS_MIN_GRAPH: + LineGraph@INCOME_GRAPH: X: 0 Y: 0 Width: PARENT_RIGHT Height: PARENT_BOTTOM ValueFormat: ${0} - XAxisValueFormat: {0} YAxisValueFormat: ${0:F0} - XAxisSize: 20 - YAxisSize: 10 + XAxisSize: 40 + XAxisTicksPerLabel: 2 XAxisLabel: Game Minute YAxisLabel: Earnings LabelFont: TinyBold AxisFont: TinyBold - Container@ARMY_THIS_MIN_GRAPH_CONTAINER: + Container@ARMY_VALUE_GRAPH_CONTAINER: X: 0 Y: 30 Width: PARENT_RIGHT @@ -1028,16 +1027,15 @@ Container@OBSERVER_WIDGETS: Width: PARENT_RIGHT Height: PARENT_BOTTOM Color: 00000090 - LineGraph@ARMY_THIS_MIN_GRAPH: + LineGraph@ARMY_VALUE_GRAPH: X: 0 Y: 0 Width: PARENT_RIGHT Height: PARENT_BOTTOM ValueFormat: ${0} - XAxisValueFormat: {0} YAxisValueFormat: ${0:F0} - XAxisSize: 20 - YAxisSize: 10 + XAxisSize: 40 + XAxisTicksPerLabel: 2 XAxisLabel: Game Minute YAxisLabel: Army Value LabelFont: TinyBold diff --git a/mods/common/chrome/ingame-observer.yaml b/mods/common/chrome/ingame-observer.yaml index 7958ecdb18..8646999827 100644 --- a/mods/common/chrome/ingame-observer.yaml +++ b/mods/common/chrome/ingame-observer.yaml @@ -292,7 +292,7 @@ Container@OBSERVER_WIDGETS: Container@ECONOMY_STATS_HEADERS: X: 0 Y: 0 - Width: 620 + Width: 640 Height: PARENT_BOTTOM Children: ColorBlock@HEADER_COLOR: @@ -323,16 +323,16 @@ Container@OBSERVER_WIDGETS: Text: Cash Align: Right Shadow: True - Label@EARNED_MIN_HEADER: + Label@INCOME_HEADER: X: 235 - Width: 60 + Width: 80 Height: PARENT_BOTTOM Font: Bold - Text: $/min + Text: Income Align: Right Shadow: True Label@ASSETS_HEADER: - X: 295 + X: 315 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -340,7 +340,7 @@ Container@OBSERVER_WIDGETS: Align: Right Shadow: True Label@EARNED_HEADER: - X: 375 + X: 395 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -348,7 +348,7 @@ Container@OBSERVER_WIDGETS: Align: Right Shadow: True Label@SPENT_HEADER: - X: 455 + X: 475 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -356,7 +356,7 @@ Container@OBSERVER_WIDGETS: Align: Right Shadow: True Label@HARVESTERS_HEADER: - X: 535 + X: 555 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -651,7 +651,7 @@ Container@OBSERVER_WIDGETS: ScrollItem@ECONOMY_PLAYER_TEMPLATE: X: 0 Y: 0 - Width: 620 + Width: 640 Height: 25 BaseName: scrollitem-nohover Children: @@ -684,36 +684,36 @@ Container@OBSERVER_WIDGETS: Height: PARENT_BOTTOM Align: Right Shadow: True - Label@EARNED_MIN: + Label@INCOME: X: 235 Y: 0 - Width: 60 + Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@ASSETS: - X: 295 + X: 315 Y: 0 Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@EARNED: - X: 375 + X: 395 Y: 0 Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@SPENT: - X: 455 + X: 475 Y: 0 Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@HARVESTERS: - X: 535 + X: 555 Y: 0 Width: 80 Height: PARENT_BOTTOM @@ -867,7 +867,7 @@ Container@OBSERVER_WIDGETS: Height: PARENT_BOTTOM Align: Right Shadow: True - Container@EARNED_THIS_MIN_GRAPH_CONTAINER: + Container@INCOME_GRAPH_CONTAINER: X: 0 Y: 30 Width: PARENT_RIGHT @@ -880,21 +880,20 @@ Container@OBSERVER_WIDGETS: Width: PARENT_RIGHT Height: PARENT_BOTTOM Color: 00000090 - LineGraph@EARNED_THIS_MIN_GRAPH: + LineGraph@INCOME_GRAPH: X: 0 Y: 0 Width: PARENT_RIGHT Height: PARENT_BOTTOM ValueFormat: ${0} - XAxisValueFormat: {0} YAxisValueFormat: ${0:F0} - XAxisSize: 20 - YAxisSize: 10 + XAxisSize: 40 + XAxisTicksPerLabel: 2 XAxisLabel: Game Minute YAxisLabel: Earnings LabelFont: TinyBold AxisFont: TinyBold - Container@ARMY_THIS_MIN_GRAPH_CONTAINER: + Container@ARMY_VALUE_GRAPH_CONTAINER: X: 0 Y: 30 Width: PARENT_RIGHT @@ -907,16 +906,15 @@ Container@OBSERVER_WIDGETS: Width: PARENT_RIGHT Height: PARENT_BOTTOM Color: 00000090 - LineGraph@ARMY_THIS_MIN_GRAPH: + LineGraph@ARMY_VALUE_GRAPH: X: 0 Y: 0 Width: PARENT_RIGHT Height: PARENT_BOTTOM ValueFormat: ${0} - XAxisValueFormat: {0} YAxisValueFormat: ${0:F0} - XAxisSize: 20 - YAxisSize: 10 + XAxisSize: 40 + XAxisTicksPerLabel: 2 XAxisLabel: Game Minute YAxisLabel: Army Value LabelFont: TinyBold diff --git a/mods/ra/chrome/ingame-observer.yaml b/mods/ra/chrome/ingame-observer.yaml index 2b69e80395..c65804be56 100644 --- a/mods/ra/chrome/ingame-observer.yaml +++ b/mods/ra/chrome/ingame-observer.yaml @@ -324,7 +324,7 @@ Container@OBSERVER_WIDGETS: Container@ECONOMY_STATS_HEADERS: X: 0 Y: 0 - Width: 715 + Width: 735 Height: PARENT_BOTTOM Children: ColorBlock@HEADER_COLOR: @@ -355,16 +355,16 @@ Container@OBSERVER_WIDGETS: Text: Cash Align: Right Shadow: True - Label@EARNED_MIN_HEADER: + Label@INCOME_HEADER: X: 240 - Width: 60 + Width: 80 Height: PARENT_BOTTOM Font: Bold - Text: $/min + Text: Income Align: Right Shadow: True Label@ASSETS_HEADER: - X: 300 + X: 320 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -372,7 +372,7 @@ Container@OBSERVER_WIDGETS: Align: Right Shadow: True Label@EARNED_HEADER: - X: 380 + X: 400 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -380,7 +380,7 @@ Container@OBSERVER_WIDGETS: Align: Right Shadow: True Label@SPENT_HEADER: - X: 460 + X: 480 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -388,7 +388,7 @@ Container@OBSERVER_WIDGETS: Align: Right Shadow: True Label@HARVESTERS_HEADER: - X: 540 + X: 560 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -396,7 +396,7 @@ Container@OBSERVER_WIDGETS: Align: Right Shadow: True Label@DERRICKS_HEADER: - X: 630 + X: 650 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -695,7 +695,7 @@ Container@OBSERVER_WIDGETS: ScrollItem@ECONOMY_PLAYER_TEMPLATE: X: 0 Y: 0 - Width: 715 + Width: 735 Height: 24 BaseName: scrollitem-nohover Children: @@ -730,43 +730,43 @@ Container@OBSERVER_WIDGETS: Height: PARENT_BOTTOM Align: Right Shadow: True - Label@EARNED_MIN: + Label@INCOME: X: 240 Y: 0 - Width: 60 + Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@ASSETS: - X: 300 + X: 320 Y: 0 Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@EARNED: - X: 380 + X: 400 Y: 0 Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@SPENT: - X: 460 + X: 480 Y: 0 Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@HARVESTERS: - X: 540 + X: 560 Y: 0 Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@DERRICKS: - X: 630 + X: 650 Y: 0 Width: 80 Height: PARENT_BOTTOM @@ -926,7 +926,7 @@ Container@OBSERVER_WIDGETS: Height: PARENT_BOTTOM Align: Right Shadow: True - Container@EARNED_THIS_MIN_GRAPH_CONTAINER: + Container@INCOME_GRAPH_CONTAINER: X: 0 Y: 30 Width: PARENT_RIGHT @@ -939,21 +939,20 @@ Container@OBSERVER_WIDGETS: Width: PARENT_RIGHT Height: PARENT_BOTTOM Color: 00000090 - LineGraph@EARNED_THIS_MIN_GRAPH: + LineGraph@INCOME_GRAPH: X: 0 Y: 0 Width: PARENT_RIGHT Height: PARENT_BOTTOM ValueFormat: ${0} - XAxisValueFormat: {0} YAxisValueFormat: ${0:F0} - XAxisSize: 20 - YAxisSize: 10 + XAxisSize: 40 + XAxisTicksPerLabel: 2 XAxisLabel: Game Minute YAxisLabel: Earnings LabelFont: TinyBold AxisFont: TinyBold - Container@ARMY_THIS_MIN_GRAPH_CONTAINER: + Container@ARMY_VALUE_GRAPH_CONTAINER: X: 0 Y: 30 Width: PARENT_RIGHT @@ -966,16 +965,15 @@ Container@OBSERVER_WIDGETS: Width: PARENT_RIGHT Height: PARENT_BOTTOM Color: 00000090 - LineGraph@ARMY_THIS_MIN_GRAPH: + LineGraph@ARMY_VALUE_GRAPH: X: 0 Y: 0 Width: PARENT_RIGHT Height: PARENT_BOTTOM ValueFormat: ${0} - XAxisValueFormat: {0} YAxisValueFormat: ${0:F0} - XAxisSize: 20 - YAxisSize: 10 + XAxisSize: 40 + XAxisTicksPerLabel: 2 XAxisLabel: Game Minute YAxisLabel: Army Value LabelFont: TinyBold diff --git a/mods/ts/chrome/ingame-observer.yaml b/mods/ts/chrome/ingame-observer.yaml index 1e7272d47d..b7b7470acd 100644 --- a/mods/ts/chrome/ingame-observer.yaml +++ b/mods/ts/chrome/ingame-observer.yaml @@ -292,7 +292,7 @@ Container@OBSERVER_WIDGETS: Container@ECONOMY_STATS_HEADERS: X: 0 Y: 0 - Width: 625 + Width: 645 Height: PARENT_BOTTOM Children: ColorBlock@HEADER_COLOR: @@ -323,16 +323,16 @@ Container@OBSERVER_WIDGETS: Text: Cash Align: Right Shadow: True - Label@EARNED_MIN_HEADER: + Label@INCOME_HEADER: X: 240 - Width: 60 + Width: 80 Height: PARENT_BOTTOM Font: Bold - Text: $/min + Text: Income Align: Right Shadow: True Label@ASSETS_HEADER: - X: 300 + X: 320 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -340,7 +340,7 @@ Container@OBSERVER_WIDGETS: Align: Right Shadow: True Label@EARNED_HEADER: - X: 380 + X: 400 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -348,7 +348,7 @@ Container@OBSERVER_WIDGETS: Align: Right Shadow: True Label@SPENT_HEADER: - X: 460 + X: 480 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -356,7 +356,7 @@ Container@OBSERVER_WIDGETS: Align: Right Shadow: True Label@HARVESTERS_HEADER: - X: 540 + X: 560 Width: 80 Height: PARENT_BOTTOM Font: Bold @@ -653,7 +653,7 @@ Container@OBSERVER_WIDGETS: ScrollItem@ECONOMY_PLAYER_TEMPLATE: X: 0 Y: 0 - Width: 625 + Width: 645 Height: 24 BaseName: scrollitem-nohover Children: @@ -688,36 +688,36 @@ Container@OBSERVER_WIDGETS: Height: PARENT_BOTTOM Align: Right Shadow: True - Label@EARNED_MIN: + Label@INCOME: X: 240 Y: 0 - Width: 60 + Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@ASSETS: - X: 300 + X: 320 Y: 0 Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@EARNED: - X: 380 + X: 400 Y: 0 Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@SPENT: - X: 460 + X: 480 Y: 0 Width: 80 Height: PARENT_BOTTOM Align: Right Shadow: True Label@HARVESTERS: - X: 540 + X: 560 Y: 0 Width: 80 Height: PARENT_BOTTOM @@ -879,7 +879,7 @@ Container@OBSERVER_WIDGETS: Height: PARENT_BOTTOM Align: Right Shadow: True - Container@EARNED_THIS_MIN_GRAPH_CONTAINER: + Container@INCOME_GRAPH_CONTAINER: X: 0 Y: 30 Width: PARENT_RIGHT @@ -892,21 +892,20 @@ Container@OBSERVER_WIDGETS: Width: PARENT_RIGHT Height: PARENT_BOTTOM Color: 00000090 - LineGraph@EARNED_THIS_MIN_GRAPH: + LineGraph@INCOME_GRAPH: X: 0 Y: 0 Width: PARENT_RIGHT Height: PARENT_BOTTOM ValueFormat: ${0} - XAxisValueFormat: {0} YAxisValueFormat: ${0:F0} - XAxisSize: 20 - YAxisSize: 10 + XAxisSize: 40 + XAxisTicksPerLabel: 2 XAxisLabel: Game Minute YAxisLabel: Earnings LabelFont: TinyBold AxisFont: TinyBold - Container@ARMY_THIS_MIN_GRAPH_CONTAINER: + Container@ARMY_VALUE_GRAPH_CONTAINER: X: 0 Y: 30 Width: PARENT_RIGHT @@ -919,16 +918,15 @@ Container@OBSERVER_WIDGETS: Width: PARENT_RIGHT Height: PARENT_BOTTOM Color: 00000090 - LineGraph@ARMY_THIS_MIN_GRAPH: + LineGraph@ARMY_VALUE_GRAPH: X: 0 Y: 0 Width: PARENT_RIGHT Height: PARENT_BOTTOM ValueFormat: ${0} - XAxisValueFormat: {0} YAxisValueFormat: ${0:F0} - XAxisSize: 20 - YAxisSize: 10 + XAxisSize: 40 + XAxisTicksPerLabel: 2 XAxisLabel: Game Minute YAxisLabel: Army Value LabelFont: TinyBold