 _LOADED["level/core/pool/common_elements.lua"] = nil;
require("level/core/pool/common_elements.lua");

-- Style overrides
--------------------------------------

PoolSideStyle.navgraph = "level/core/pool/nav_2.xml",

SetDefaultStyle(PoolSideStyle);

MakeState{
	type="StateCoreLevel",
	levelId = 3,
	
	-- Customer Factory
	-----------------------------------
	customerFactory = {

	locations = {
			{ x = -250, y = 400 },
		},

		customers = {
		
			-- list all customers to be spawned in the current wave
			-- nextWave defines the time to wait until the next wave
			-- use as many waves as necessary for the level
			
			{
				name = {"PoolLocalLovebirdBasic","PoolLocalLovebirdBasic"},
				nextWave = 7,
			},
			{
				name = {"PoolFemale1Basic"},
				nextWave = 7,
			},
			{
				name = {"PoolSpringBreakGirlBasic"},
				nextWave = 7,
			},
			{
				name = {"PoolSpringBreakGirlBasic"},
				nextWave = 7,
			},
			{
				name = {"PoolOldTimerFemaleBasic","PoolOldTimerFemaleBasic"},
				nextWave = 7,
			},
			{
				name = {"PoolOldTimerFemaleBasic"},
				nextWave = 7,
			},
			{
				name = {"PoolFemale1Basic","PoolFemale1Basic", },
				nextWave = 7,
			},
			
			-- Spawnable customers
			--[[
				-- Basic customers
				-----------------------------------
				PoolOldTimerFemale						-- Orange Juice, Boat
				PoolSpringBreakGirl						-- Suntan, Volley
				PoolLocalLovebird						-- Ice Cream, Swim
				PoolFemale1								-- Wildcard, Wildcard
				
				-- Advanced customers
				-----------------------------------
				PoolConventionGeek						-- Wildcard, Suntan
				
				PoolNewlywedMale						-- Ice Cream or Cooking, Volley/Boat
				PoolNewlywedFemale						-- OJ or Suntan, Volley/Boat
				
				PoolJapaneseExecutive					-- Combination, Cooking, Boat
				PoolTexasTycoon							-- Cooking, Combination, Swim
				
				PoolAmericasFormerTopModel				-- Suntan, Cooking or Combination, Swim
				PoolShark								-- Suntan, Cooking or Combination, Volley
			]]
		},
	},
	
	
	-- Goals
	targetMoney = 261,
	parTime = 95000,
	targetStars = 45,
	goals = {
		
		-- Level quota. Must match targetMoney above
		--------------------------------------------------------		
		{
			type = kClosingTimeWin,
			description = GetString("Goal_ClosingTime", "261"),
			quantity = 1,
			icon = goalIconsTable[kClosingTimeWin],
		},
		
		-- Par Time. Must match parTime above
		--------------------------------------------------------
		{
			type = kEndLevelInLessThan,
			description = GetString("Goal_CompleteBefore", "1:35"),
			quantity = 1,
			condition = 95000,
			optional = true,
			group = kGoalLessThan,
			icon = goalIconsTable[kEndLevelInLessThan],
		},
		
		-- Quality Stars. Must match targetStars above
		--------------------------------------------------------
		{
			type = kHaveStars,
			description = GetString("Goal_Stars", "45"),
			quantity = 1,
			condition = 45,
			optional = true,
			icon = goalIconsTable[kHaveStars],
		},
		
		-- Losing condition. Must match targetMoney above
		--------------------------------------------------------
		{
			type = kClosingTimeLose,
			description = GetString("Goal_ClosingTime", "261"),
			quantity = 1,
			loosingCondition = true,
			icon = goalIconsTable[kClosingTimeLose],
		},
		
	},

	tutorialManager = {
		firstStep = 0,
		lastStep = 6,
		boxImage = "level/core/common/textures/tutorial_back",
		boxBorder = 40,
		arrowAnim = TutorialArrowAnim,
		arrowImage = "level/core/common/textures/arrow",

		font = {
			secondaryFont,
			18,
			Color(0, 0, 0, 255),
		},

		steps = {
			[0] = {
				message = "Tut_Club_3_1",
				messagePosition = {x = 600, y = 280},
				enableStations = {"*"},
				enableEmployees = false,
				waitTime = 4000,
				triggers = {
					[kWaitTimeFinished] = 1,
					[kSkippedStep] = 1,
				},
			},
			[1] = {
				message = "Tut_Club_3_3",
				messagePosition = {x = 600, y = 280},
				enableStations = {"*"},
				enableEmployees = false,
				waitTime = 4000,
				triggers = {
					[kWaitTimeFinished] = 2,
					[kSkippedStep] = 2,
				},
			},
			[2] = {
				message = "Tut_Club_3_3",
				messagePosition = {x = 600, y = 280},
				enableStations = {"drums"},
				arrowPos = {
					{x = 920, y = 80},
				},
				enableEmployees = false,
				triggers = {
					[kDispenserClicked] = 3,
				},
			},
			[3] = {
				message = "Tut_Club_3_4",
				messagePosition = {x = 600, y = 280},
				enableStations = {"*"},
				enableEmployees = false,
				waitTime = 4000,
				triggers = {
					[kWaitTimeFinished] = 4,
					[kSkippedStep] = 4,
				},
			},
			[4] = {
				message = "Tut_Club_3_5",
				messagePosition = {x = 600, y = 280},
				enableStations = {"*"},
				enableEmployees = false,
				waitTime = 4000,
				triggers = {
					[kWaitTimeFinished] = 5,
					[kSkippedStep] = 5,
				},
			},
			[5] = {
				message = "Tut_Club_3_6",
				messagePosition = {x = 600, y = 280},
				enableStations = {"*"},
				enableEmployees = false,
				waitTime = 4000,
				triggers = {
					[kWaitTimeFinished] = 6,
					[kSkippedStep] = 6,
				},
			},
			[6] = {
				stopDance = true,
				enableStations = {"icecream", "orangejuice", "suntan", "chair1", "chair2", "chair3", "garbage", "drums"},
				enableEmployees = true,
				activeMoney = 900000,
				resumeGame = true,
				endTutorial = true,
			},
			
		},
	},
	
	-- Level Content
	--------------------------------------------------------	
	CreateBackground();

	BlgContainer {
		name = "gameLayer",
		enableZSorting = true,

		-- Create level 0 stations
		CreateStations(1);
		
		-- Create the level decorations
		CreateDecos();
		CreateTimedDecos(1);

	},

	CreateBaseLevelControls(),
};

SetDefaultStyle(nil);