//=============================================================================
// Bartender.
//=============================================================================
class RPGBurger extends HumanCivilian;

var _MMRPGPlayer talkto;
var int talked;

function TakeDamageBase(int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, name damageType,
                        bool bPlayAnim)
{}

function Frob(Actor Frobber, Inventory frobWith)
{
	local NailageColaBlue Inv;
	local MMRPGCreditCard Cred;
	local _MMRPGPlayer Player;


	If (Frobber.IsA('DeusExPlayer'))
	{
		If(talked != 0)
		{
			_MMRPGPlayer(Frobber).ReceiveMessage("Someone is already talking to this person!");
			return;
		}
	}

//	Super.Frob(Frobber, frobWith);
	Player = _MMRPGPlayer(Frobber);
	talkto = Player;
		LookAtActor(Frobber, True, True, False);

	talked = 1;
	Player.ReceiveMessage(""$Player.PlayerReplicationInfo.PlayerName$": A burger please");
	SetTimer(1.7,False);
}

function Timer()
{
	local vector loc;
	local Burger SpawnObject;
	local MMRPGCreditCard Cred;
	local BurgerPlace BP;

	Cred = talkto.Creditcard;

	if (Cred.CreditAmount >= 9)
	{
		Cred.CreditAmount -=9;
		talkto.ReceiveMessage("BURGER VAN OWNER: That'll be 9 credits.");
		foreach allactors(class'BurgerPlace',BP)
		{
			Loc = BP.Location;
		}
		SpawnObject = Spawn(class'Burger',,, loc, (Self.ViewRotation) * 64);
		SpawnObject.RespawnTime = 0.0;
		talked = 0;
	}
	else
	{
		talkto.ReceiveMessage("BURGER VAN OWNER: I'm not giving them out for free.");
		talked = 0;
	}			
}

defaultproperties
{
     bfearAlarm=False
     bFearCarcass=False
     bFearDistress=False
     bFearShot=False
     bFearIndirectInjury=False
     Orders=Standing
     bInvincible=True
     bHateShot=False
     bHateInjury=False
     bReactPresence=False
     bEmitDistress=False
     CarcassType=Class'DeusEx.BartenderCarcass'
     WalkingSpeed=0.296000
     walkAnimMult=0.750000
     runAnimMult=0.850000
     GroundSpeed=200.000000
     Mesh=LodMesh'DeusExCharacters.GM_DressShirt'
     MultiSkins(0)=Texture'DeusExCharacters.Skins.BartenderTex0'
     MultiSkins(1)=Texture'DeusExItems.Skins.PinkMaskTex'
     MultiSkins(2)=Texture'DeusExItems.Skins.PinkMaskTex'
     MultiSkins(3)=Texture'DeusExCharacters.Skins.PantsTex8'
     MultiSkins(4)=Texture'DeusExCharacters.Skins.BartenderTex0'
     MultiSkins(5)=Texture'DeusExCharacters.Skins.BartenderTex1'
     MultiSkins(6)=Texture'DeusExCharacters.Skins.FramesTex2'
     MultiSkins(7)=Texture'DeusExCharacters.Skins.LensesTex3'
     CollisionRadius=20.000000
     CollisionHeight=47.500000
     BindName="Bartender"
     FamiliarName="Burger Van Owner"
     UnfamiliarName="Burger Van Owner"
}
