//=============================================================================
// 
//=============================================================================
class MMRPGKeyCard extends DeusExPickup;


var Texture CardTex;

simulated event RenderOverlays( canvas Canvas )
{
	// set first person skin settings
		MultiSkins[0]=Texture'WeaponHandsTex';
		MultiSkins[1]=Texture'WeaponHandsTex';
		MultiSkins[2]=CardTex;

	Super.RenderOverlays( Canvas );

	// reset third person skin settings
		MultiSkins[0]=CardTex;
}


simulated function bool TestMPBeltSpot(int BeltSpot)
{
   return ( (BeltSpot >= 1) && (BeltSpot <=9) );
}


function DropFrom(vector StartLocation)
{
	LifeSpan = 5.0;
	Super.DropFrom(StartLocation);
}


function BecomeItem()
{
	LifeSpan = 0.0;
	Super.BecomeItem();
}



//=================================================================================
//=================================================================================
//=================================================================================

function PlayIdleAnim()
{
	local float rnd;

	rnd = FRand();

	if (rnd < 0.3)
		PlayAnim('Idle1');
	else if (rnd < 0.6)
		PlayAnim('Idle1');
}


function GiveTo( pawn Other )
{	
	Super.GiveTo(Other);
	GotoState('Idle2');
}


function PlayBringUp()
{
	PlayAnim('Select',, 0.1);
	if (!IsInState('Idle'))
		GotoState('Idle');
}

function PlayPutDown()
{
	if (IsInState('Idle'))
		GotoState('DownItem');
}

state Idle
{
	function Timer()
	{
		PlayIdleAnim();
	}

Begin:
	//bHidden = False;
	bOnlyOwnerSee = True;
	FinishAnim();
	SetTimer(3.0, True);
}

state DownItem
{
	function PlayPutDown()
	{
		
	}

Begin:
	AmbientSound = None;
	bHidden = False;		// make sure we can see the animation
	PlayAnim('Down',, 0.1);
	FinishAnim();
	bHidden = True;	// hide it correctly
	GotoState('Idle2');
}

//=================================================================================
//=================================================================================
//=================================================================================





defaultproperties
{
     maxCopies=1
     bCanHaveMultipleCopies=True
     ItemName="Default Keycard - BUGzilla"
     PlayerViewOffset=(X=30.000000,Z=-12.000000)
     PlayerViewMesh=LodMesh'ContenderStuff.credcard1'
     PickupViewMesh=LodMesh'ContenderStuff.credcardpickup'
     ThirdPersonMesh=LodMesh'ContenderStuff.credcard3'
     LandSound=Sound'DeusExSounds.Generic.PlasticHit1'
     largeIconWidth=44
     largeIconHeight=43
     beltDescription="keycard 4 lyf yo"
     Mesh=LodMesh'ContenderStuff.credcardpickup'
     CollisionRadius=7.000000
     CollisionHeight=0.550000
     Mass=2.000000
     Buoyancy=3.000000
}
