More bugfixes, and add failover code to InfoDisplays.

This commit is contained in:
2025-03-01 00:23:42 -05:00
parent a786ee2720
commit 99ad625545
3 changed files with 17 additions and 7 deletions

View File

@ -24,4 +24,6 @@
<AdditionalFiles Include="thumb.png" />
</ItemGroup>
<Import Project="..\Mixins\Console\Console.projitems" Label="shared" />
<Import Project="..\Mixins\FailoverManager\FailoverManager.projitems" Label="shared" />
<Import Project="..\Mixins\ScaledGridDisplay\ScaledGridDisplay.projitems" Label="shared" />
</Project>

View File

@ -9,12 +9,14 @@ namespace IngameScript
public IConsole Console { get; private set; }
public MyIni Ini { get; private set; }
private FailoverManager _failover;
private ResourceReport _oreReport = null;
public Program()
{
Ini = new MyIni();
Console = new MainConsole(this, "Info Displays");
_failover = new FailoverManager(this, Console, Ini);
// find displays that are configured to show info, create the necessary objects.
// TODO: currently we only support one display per report, and we just use the first one
@ -67,6 +69,7 @@ namespace IngameScript
public void Main(string argument, UpdateType updateSource)
{
Console.UpdateTickCount();
if (_failover.ActiveCheck() == FailoverState.Standby) return;
if (_oreReport != null)
{