//=============================================================================
// ControlPanel.
//=============================================================================
class FuseBox extends HackableDevices;

var bool bInUse;
var(Events) name BoxName;

function PostBeginPlay()
{
	Destroy();
}

function StopHacking()
{
	Super.StopHacking();
}

function Frob(Actor Frobber, Inventory frobWith)
{
	if (bInUse)
	{
		DeusExPlayer(Frobber).ClientMessage(msgAlreadyHacked);
		return;
	}

	Super.Frob(Frobber, Frobwith);
}

function HackAction(Actor Hacker, bool bHacked)
{
	local Actor A;

	If ( Hacker.IsA('_MMRPGPlayer'))
	{
		if (! _MMRPGPlayer(Hacker).bMechanic)
		{
			DeusExPlayer(Hacker).ClientMessage("You are not an electrician!");
			return;
		}
	}

	if (bHacked)
	{
		bInUse = True;
//		DeusExPlayer(Hacker).ClientMessage("You have fixed this fusebox");
	}
}


defaultproperties
{
     ItemName="Fuse Box"
     Mesh=LodMesh'DeusExDeco.ControlPanel'
     TimeToReset=1.000000
     hackStrength=0.100000
     msgMultitoolSuccess="You have fixed this fusebox"
     msgNotHacked=""
     msgHacking="Fixing this fusebox..."
     msgAlreadyHacked="It's fixed"
     SoundRadius=4
     SoundVolume=200
     SoundPitch=96
     AmbientSound=Sound'DeusExSounds.Generic.ElectronicsHum'
     CollisionRadius=14.500000
     CollisionHeight=23.230000
     Mass=10.000000
     Buoyancy=5.000000
}
