From a1407ac06f42513c1af21fb51495c3fd7b3d8126 Mon Sep 17 00:00:00 2001 From: VforValens Date: Thu, 17 Mar 2022 13:12:03 -0500 Subject: [PATCH] added more to Reserve and fixed lights. --- ValensHasThePower/Program.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/ValensHasThePower/Program.cs b/ValensHasThePower/Program.cs index a2f40cc..9eb002b 100644 --- a/ValensHasThePower/Program.cs +++ b/ValensHasThePower/Program.cs @@ -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().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; + } + } + } } } \ No newline at end of file