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

-- Style overrides
--------------------------------------
SetDefaultStyle(PoolSideStyle);

MakeState{
	type="StateCoreLevel",
	levelId = 18,

	-- 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 = {"PoolSpringBreakGirl","PoolShark"},
				nextWave = 4,
			},
			
			{
				name = {"PoolOldTimerFemale"},
				nextWave = 4,
			},
			
			{
				name = {"PoolLocalLovebird"},
				nextWave = 4,
			},
				
			
			{
				name = {"PoolLocalLovebird","PoolConventionGeek"},
				nextWave = 3,
			},
			{
				name = {"PoolFemale1","PoolFemale1"},
				nextWave = 10,
			},
			
			{
				name = {"PoolConventionGeek","PoolLocalLovebird"},
				nextWave = 10,
			},
			
			{
				name = {"PoolNewlywedMale","PoolNewlywedMale","PoolNewlywedFemale"},
				nextWave = 19,
			},
			{
				name = {"PoolNewlywedFemale","PoolNewlywedMale"},
				nextWave = 18,
			},
			
			{
				name = {"PoolJapaneseExecutive","PoolAmericasFormerTopModel","PoolConventionGeek"},
				nextWave = 19,
			},
			
			{
				name = {"PoolTexasTycoon","PoolAmericasFormerTopModel"},
				nextWave = 18,
			},
			
			{
				name = {"PoolConventionGeek","PoolShark","PoolJapaneseExecutive"},
				nextWave = 9,
			},
			-- 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 = 1020,
	parTime = 212000,
	targetStars = 102,
	goals = {
		
		-- Level quota. Must match targetMoney above
		--------------------------------------------------------		
		{
			type = kClosingTimeWin,
			description = GetString("Goal_ClosingTime", "1020"),
			quantity = 1,
			icon = goalIconsTable[kClosingTimeWin],
		},
		
		-- Par Time. Must match parTime above
		--------------------------------------------------------
		{
			type = kEndLevelInLessThan,
			description = GetString("Goal_CompleteBefore", "2:32"),
			quantity = 1,
			condition = 212000,
			optional = true,
			group = kGoalLessThan,
			icon = goalIconsTable[kEndLevelInLessThan],
		},
		
		-- Quality Stars. Must match targetStars above
		--------------------------------------------------------
		{
			type = kHaveStars,
			description = GetString("Goal_Stars", "102"),
			quantity = 1,
			condition = 102,
			optional = true,
			icon = goalIconsTable[kHaveStars],
		},
		
		-- Losing condition. Must match targetMoney above
		--------------------------------------------------------
		{
			type = kClosingTimeLose,
			description = GetString("Goal_ClosingTime", "1020"),
			quantity = 1,
			loosingCondition = true,
			icon = goalIconsTable[kClosingTimeLose],
		},
		
	},

	-- Level Content
	--------------------------------------------------------	
	CreateBackground();

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

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

	},

	CreateBaseLevelControls(),
};

SetDefaultStyle(nil);