// Elevator Handler.
// Worthless Bums 2012.


// Powers the elevator on.
function powerElevatorOn ()
{//echo("powerElevatorOn()");
	$elevatorPowered = true;
	updateEventText($squadColor @ "Elevator" SPC $friendlyActionColor @ "is powered on" @ $defaultColor @ "!");
	playAudio("Audio:elevatorPowerOn", EffectsAudioVolume.value);
}
// Powers the elevator off.
function powerElevatorOff ()
{//echo("powerElevatorOff()");
	$elevatorPowered = false;
	updateEventText($squadColor @ "Elevator" SPC $hostileActionColor @ "is powered off" @ $defaultColor @ "!");
	playAudio("Audio:elevatorPowerOff", EffectsAudioVolume.value);
}
// Toggles elevator power.
function toggleElevatorPower ()
{//echo("toggleElevatorPower()");
	if ($elevatorPowered)
	{
		powerElevatorOff();
	}
	else
	{
		powerElevatorOn();
	}
}
function isElevatorDisrupted ()
{
	return (isObject($ElevatorDisruptor));
}