//=============================================================================
// BotBurguer. It's a special sort of pathnode to make bots actually walk it first than
//		any other path. Bots think that they are picking up inventory.
//
//		
//=============================================================================
class BotBurguer expands Inventory;

#exec TEXTURE IMPORT NAME=BotBurguer FILE=SKINS\BotBurguer.bmp GROUP=Icons FLAGS=2
#exec TEXTURE IMPORT NAME=BotBurguer FILE=SKINS\BotBurguer.bmp GROUP=Icons PALETTE=BotBurguer

var() byte WalkPriority;	//Defines which "burguer" path they will prefer (higher priority, higher "apetite")
var() bool bTrigEnable;		//You might want to disable the BotBurguering, usefull to Assault
var() bool bEnabledPath;	//Self-Explanatory :)
var() float RestartTime;	//If 0, bots will loop between 2 burguers most likely, this
				//	number means that the burguer restarts the bot "apetite"
				//	each x seconds

var() byte PriorityMultiplier;	//WalkPriority multiPlier

var bool bSleep;

auto state Pickup
{
    function Touch( actor Other );
}

function Touch( actor Other );

function PostBeginPlay()
{
	Super.PostBeginPlay();
	Texture = None;

	if (bEnabledPath)
		MaxDesireability = PriorityMultiplier * WalkPriority * 0.012;
	else
		MaxDesireability = -1.0;
}


function Trigger(actor Other, pawn EventInstigator)
{
	if (bTrigEnable)
	{
		If (!bEnabledPath)
		{
			MaxDesireability = WalkPriority * 0.012;
			bEnabledPath = True;
		}
		else
		{
			MaxDesireability = -1.0;
			bEnabledPath = False;
		}
	}
}

event float BotDesireability( pawn Bot )
{
	if (!bSleep)
	{
		If (!bEnabledPath)
			return -1;
	
		if (VSize(Bot.Location - Location) >= 48)
			return MaxDesireability;
		else
		{
			bSleep = True;
			SetTimer(RestartTime, False);
			return -1;
		}
	}
	else
		return -1;
}

function Timer()
{
	bSleep = False;
}


function BecomeItem(){}

function GiveTo( pawn Other ){}

function inventory SpawnCopy( pawn Other ){}

function SetRespawn(){}




defaultproperties
{
	DrawType=DT_Sprite
	Texture=BotBurguer
	Style=STY_Masked
	RemoteRole=ROLE_DumbProxy
	bHidden=True
	ReSpawnTime=2.000000
	WalkPriority=1
	bEnabledPath=True
	bRotatingPickup=False
	PickupMessage=""
	RestartTime=5.000000
	PriorityMultiplier=1
}

