From f064405165479c89c6326ccca8c99f6fc58da6ce Mon Sep 17 00:00:00 2001 From: CWX Date: Thu, 17 Mar 2022 18:08:26 +0000 Subject: [PATCH] added more to customs, fixed spacings --- ValensHasThePower/Program.cs | 57 +++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/ValensHasThePower/Program.cs b/ValensHasThePower/Program.cs index aa5545a..a2f40cc 100644 --- a/ValensHasThePower/Program.cs +++ b/ValensHasThePower/Program.cs @@ -23,40 +23,63 @@ namespace ValensHasThePower PowerOn.Customs(); } - public static void Interchange() + private static void Interchange() { var power = GameObject.FindObjectsOfType().ToList(); - foreach (var Switch in power) // Turn the Power Station switch to On. + + foreach (var switches in power) // Turn the Power Station switch to On. { - //Interchange - Power to Mall - if (Switch.Id == "Shopping_Mall_DesignStuff_00055" && Switch.name == "reserve_electric_switcher_lever") + var lamps = switches.Lamps.ToList(); + + // turns on lamps + foreach (var lamp in lamps) { - Switch.DoorState = EDoorState.Open; - Debug.LogError(Switch.name); + lamp.Enabled = true; } - //Activation of Toilet Key Card Reader in Burger Stop - if (Switch.name == "Node_Keycard_Saferoom") + // Power to Mall + if (switches.Id == "Shopping_Mall_DesignStuff_00055" && switches.name == "reserve_electric_switcher_lever") { - Switch.DoorState = EDoorState.Open; + switches.DoorState = EDoorState.Open; + Debug.LogError(switches.name); } - //Activation of OBJ21 Container - if (Switch.Id == "Shopping_Mall_DesignStuff_00061" && Switch.Id == "reserve_electric_switcher_lever") + // Activation of Toilet Key Card Reader in Burger Stop + if (switches.name == "Node_Keycard_Saferoom") { - Switch.DoorState = EDoorState.Open; + switches.DoorState = EDoorState.Open; + } + + // Activation of OBJ21 Container + if (switches.Id == "Shopping_Mall_DesignStuff_00061" && switches.Id == "reserve_electric_switcher_lever") + { + switches.DoorState = EDoorState.Open; } } } - public static void Customs() + + private static void Customs() { var power = GameObject.FindObjectsOfType().ToList(); - var exfil = GameObject.FindObjectsOfType().ToList(); - foreach (var Switch in power) + + foreach (var switches in power) // turns on power on customs { - if (Switch.Id == "custom_DesignStuff_00034" && Switch.name == "reserve_electric_switcher_lever") + if (switches.Id == "custom_DesignStuff_00034" && switches.name == "reserve_electric_switcher_lever") { - Switch.DoorState = EDoorState.Open; + var lamps = switches.Lamps.ToList(); + var exfil = switches.ExfiltrationPoint; + + // turns on lamps + foreach (var lamp in lamps) + { + lamp.Enabled = true; + } + + // turns on power + switches.DoorState = EDoorState.Open; + + // turns on exfil + exfil.Status = EExfiltrationStatus.RegularMode; } } }