added more to Reserve and fixed lights.
This commit is contained in:
parent
6c7a0c2c83
commit
a1407ac06f
@ -21,6 +21,7 @@ namespace ValensHasThePower
|
|||||||
{
|
{
|
||||||
PowerOn.Interchange();
|
PowerOn.Interchange();
|
||||||
PowerOn.Customs();
|
PowerOn.Customs();
|
||||||
|
PowerOn.Reserve();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Interchange()
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user