//=============================================================================
// WeaponLocker.
//=============================================================================
class WeaponLocker expands Inventory;

//Model Import
#exec mesh import mesh=WeaponLocker anivfile=Models\WeaponLocker_a.3d datafile=Models\WeaponLocker_d.3d x=0 y=0 z=0 mlod=0
#exec mesh origin mesh=WeaponLocker x=0 y=0 z=0
#exec mesh sequence mesh=WeaponLocker seq=All startframe=0 numframes=1

#exec meshmap new meshmap=WeaponLocker mesh=WeaponLocker
#exec meshmap scale meshmap=WeaponLocker x=0.18359 y=0.18359 z=0.36719

//Skins import
#exec TEXTURE IMPORT NAME=WLockerskin1 FILE=SKINS\WLockerskin1.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=WLockerskin1 FILE=SKINS\WLockerskin1.pcx GROUP=Skins PALETTE=WLockerskin1
#exec MESHMAP SETTEXTURE MESHMAP=WeaponLocker NUM=0 TEXTURE=WLockerskin1

#exec TEXTURE IMPORT NAME=WLockerskin2 FILE=SKINS\WLockerskin2.pcx GROUP=Skins FLAGS=2
#exec TEXTURE IMPORT NAME=WLockerskin2 FILE=SKINS\WLockerskin2.pcx GROUP=Skins PALETTE=WLockerskin2
#exec MESHMAP SETTEXTURE MESHMAP=WeaponLocker NUM=1 TEXTURE=WLockerskin2

//Sound import
#exec AUDIO IMPORT NAME="WeaponLocker" FILE=SOUNDS\WeaponLocker.wav GROUP="WeaponLocker"


//-----------------------------------------------------------------------


var() bool bTeamOnly;
var() byte LockerTeam;
var InventorySpot PMarker;

struct WeaponsIn
{
	var() class<Weapon> LWeapon;
	var() int AbsoluteAmmo;
	var() int AmmoDifAllowed;
	var() int AmmoPickup;
};

var() WeaponsIn WeaponsInLock[16];

var() byte bOtherRotSet[6];


function PostBeginPlay(){}


//Deco base
function PreBeginPlay()
{

local WLockerBase PickB;
local int i;

	//Spawn base part
	PickB = Spawn(Class'WLockerBase',,, Location, Rotation);
	PickB.Mesh = Mesh;
	
	PickB.LODBias = LODBias;
	PickB.PMarker = MyMarker;
	PickB.bTeamOnly = bTeamOnly;
	PickB.LockerTeam = LockerTeam;
	PickB.PickupSound = PickupSound;
	PickB.AmbientGlow = AmbientGlow;

	For (i=0; i<16; i++)
	{
		if (WeaponsInLock[i].LWeapon == Class'BotPack.ChainSaw')
			WeaponsInLock[i].LWeapon = Class'BersChainSaw';
		else if (WeaponsInLock[i].LWeapon == Class'BotPack.Enforcer')
			WeaponsInLock[i].LWeapon = Class'UBersEnforcer';
		else if (WeaponsInLock[i].LWeapon == Class'BotPack.ImpactHammer')
			WeaponsInLock[i].LWeapon = Class'UBersImpactHammer';
		else if (WeaponsInLock[i].LWeapon == Class'BotPack.minigun2')
			WeaponsInLock[i].LWeapon = Class'UBersminigun2';
		else if (WeaponsInLock[i].LWeapon == Class'BotPack.PulseGun')
			WeaponsInLock[i].LWeapon = Class'UBersPulseGun';
		else if (WeaponsInLock[i].LWeapon == Class'BotPack.ripper')
			WeaponsInLock[i].LWeapon = Class'UBersripper';
		else if (WeaponsInLock[i].LWeapon == Class'BotPack.ShockRifle')
			WeaponsInLock[i].LWeapon = Class'UBersShockRifle';
		else if (WeaponsInLock[i].LWeapon == Class'BotPack.SuperShockRifle')
			WeaponsInLock[i].LWeapon = Class'UBersSuperShockRifle';
		else if (WeaponsInLock[i].LWeapon == Class'BotPack.SniperRifle')
			WeaponsInLock[i].LWeapon = Class'UBersSniperRifle';
		else if (WeaponsInLock[i].LWeapon == Class'BotPack.Translocator')
			WeaponsInLock[i].LWeapon = Class'UBersTranslocator';
		else if (WeaponsInLock[i].LWeapon == Class'BotPack.ut_biorifle')
			WeaponsInLock[i].LWeapon = Class'UBersut_biorifle';
		else if (WeaponsInLock[i].LWeapon == Class'BotPack.UT_EightBall')
			WeaponsInLock[i].LWeapon = Class'UBersUT_EightBall';
		else if (WeaponsInLock[i].LWeapon == Class'BotPack.UT_FlakCannon')
			WeaponsInLock[i].LWeapon = Class'UBersUT_FlakCannon';
		else if (WeaponsInLock[i].LWeapon == Class'BotPack.WarHeadLauncher')
			WeaponsInLock[i].LWeapon = Class'UBersWarHeadLauncher';


		PickB.LWeapon[i] = WeaponsInLock[i].LWeapon;
		PickB.AbsoluteAmmo[i] = WeaponsInLock[i].AbsoluteAmmo;
		PickB.AmmoDifAllowed[i] = WeaponsInLock[i].AmmoDifAllowed;
		PickB.AmmoPickup[i] = WeaponsInLock[i].AmmoPickup;
	}
	
	For (i=0; i<6; i++)
		PickB.bOtherRotSet[i] = bOtherRotSet[i];

	Destroy();
}

//---------------------------------------------------------------
//Cancel several inventory functions
//---------------------------------------------------------------

function BecomePickup(){}

function BecomeItem(){}

function GiveTo( pawn Other ){}

function inventory SpawnCopy( pawn Other ){}

function SetRespawn(){}

function Activate(){}

event TravelPreAccept(){}

function bool HandlePickupQuery( inventory Item ){}

function Inventory SelectNext(){}

function DropFrom(vector StartLocation){}


event float BotDesireability( pawn Bot );


auto state Pickup
{

ignores ZoneChange, Touch, Landed, Timer, BeginState, EndState;

function bool ValidTouch( actor Other ){}

function CheckTouching(){}

Begin:
GotoState('');

}

state Activated
{
	function BeginState(){}

	function EndState(){}

	function Activate(){}

Begin:
}
State Sleeping
{
Begin:
}

function ActivateTranslator(bool bHint){}


defaultproperties
{
	Mesh=WeaponLocker
	bTravel=False
	bStasis=False
	RemoteRole=ROLE_DumbProxy
	bCollideActors=False
	PickupSound=WeaponLocker
}