added more to Reserve and fixed lights.

This commit is contained in:
VforValens 2022-03-17 13:12:03 -05:00
parent 6c7a0c2c83
commit a1407ac06f

View File

@ -21,6 +21,7 @@ namespace ValensHasThePower
{
PowerOn.Interchange();
PowerOn.Customs();
PowerOn.Reserve();
}
private static void Interchange()
@ -83,5 +84,27 @@ namespace ValensHasThePower
}
}
}
private static void Reserve()
{
var power = GameObject.FindObjectsOfType<Switch>().ToList();
foreach (var switches in power) // turns on power on reserve
{
if (switches.Id == "autoId_00000_D2_LEVER" && switches.name == "reserve_electric_switcher_lever")
{
var lamps = switches.Lamps.ToList();
// turns on lamps
foreach (var lamp in lamps)
{
lamp.Enabled = true;
}
// turns on power
switches.DoorState = EDoorState.Open;
}
}
}
}
}