// Console Handler.
// Worthless Bums 2013.


// Handles specific console activations.
function triggerConsoleActivation (%dialogueId)
{//echo("triggerConsoleActivation()");echo("%dialogueId =" SPC %dialogueId);
	switch (%dialogueId)
	{
		case  2:	// Zoozle maps.
			$fogOfWar.zoozleClear();
			
		case 41:	// Multipass!
			setIndividualDialoguePopup($playerSquad[$activeCharacter], "Multipass!", "dialogue");
			spawnItemInPlayerInventory(22);
	}
	// Chance to give some money!
	if (getRandom(1, 100) <= $ConsoleMoneyChance)
	{
		giveRandomMoney(200, 500);
	}
}

// Handles hacked console information.
function triggerHackInfo (%deviceType)
{//echo("triggerHackInfo()");
	switch (%deviceType)
	{
		case 0:	// Console.
			scrollInfoText($playerSquad[$activeCharacter], "Console hacked!");
			scrollInfoDescriptionText($playerSquad[$activeCharacter], "Diverted funds!");
			giveRandomMoney(500, 900);
			updateEventText($squadColor @ $playerSquad[%characterIndex].name SPC $friendlyActionColor @ "hacks " @ $itemColor @ "Console" @ $defaultColor @ "!");
		case 1:	// PDA.
			scrollInfoText($playerSquad[$activeCharacter], "PDA hacked!");
			scrollInfoDescriptionText($playerSquad[$activeCharacter], "Multipass created!");
			giveItem(22);
			updateEventText($squadColor @ $playerSquad[$activeCharacter].name SPC $friendlyActionColor @ "creates " @ $itemColor @ "Multipass" @ $defaultColor @ "!");
	}
}