// Lockers Handler.
// Worthless Bums 2013.


function triggerLockersActivation ()
{//echo("triggerLockersActivation()");echo("%dialogueId =" SPC %dialogueId);
	giveRandomMoney(400, 700);
	if (getRandom(1, 100) <= $LockersUpgradeChance)
	{
		randomLockersChatter($activeCharacter);
		switch (getRandom(0, 5))
		{
			case  0:	spawnItemInPlayerInventory(0);	// Medkit.
			case  1:	spawnItemInPlayerInventory(1);	// Ammo Crate.
			case  2:	spawnItemInPlayerInventory(5);	// Adrenal Shot.
			case  3:	spawnItemInPlayerInventory(7);	// Canteen.
			case  4:	spawnItemInPlayerInventory(10);	// Grenade.
			case  5:	spawnItemInPlayerInventory(22);	// Multipass.
		}
		// "Tech Monger" perk grants increased chance to find high tech loot in chests and lockers!
		if ($playerSquad[$activeCharacter].perks $= "TechMonger")
		{
			if (getRandom(1, 100) <= 10)
			{
				switch (getRandom(0, 5))
				{
					case  0:	spawnItemInPlayerInventory(17);		// Lasershot.
					case  1:	spawnItemInPlayerInventory(21);		// Hulk Suit.
					case  2:	spawnItemInPlayerInventory(16);		// Armor Kit.
					case  3:	spawnItemInPlayerInventory(22);		// Multipass.
					case  4:	spawnItemInPlayerInventory(23);		// Laser Mod.
					case  5:	spawnItemInPlayerInventory(24);		// Plasma Mod.
				}
			}
		}
	}
}