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

-- Style overrides
------------------------------------
SetDefaultStyle(BeachStyle);

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

		locations = {
			{ x = -60, y = 192 },
		},

		customers = {
			
			
			
			{
				name = {"BeachJapaneseExecutiveBasic"},
				nextWave = 6,
			},
			{
				name = {"BeachFemale1Basic", "BeachOldTimerMaleBasic"},
				nextWave = 8,
			},
			{
				name = {"BeachNewlywedMale", "BeachNewlywedFemale"},
				nextWave = 16,
			},
			{
				name = {"BeachOldTimerMaleBasic", "BeachJapaneseExecutiveBasic","BeachFemale1Basic"},
				nextWave = 20,
			},
			{
				name = {"BeachConventionGeekBasic", "BeachOldTimerFemaleBasic","BeachSpringBreakGirlBasic"},
				nextWave = 22,
			},
			{
				name = {"BeachNewlywedMale", "BeachNewlywedFemale"},
				nextWave = 20,
			},
			
			{
				name = {"BeachSpringBreakGirlBasic","BeachOldTimerMaleBasic"},
				nextWave = 15,
			},
			{
				name = {"BeachConventionGeekBasic"},
				nextWave = 6,
			},
			
			
			
			
			-- Spawnable customers
			--[[
				-- Basic customers
				-- Append 'Basic' to name before all dispensers are available
				-----------------------------------
				BeachOldTimerFemale						-- OJ, Windsurf
				BeachFemale1							-- Suntan, Bike
				BeachOldTimerMale						-- Ice Cream, Fishing
				BeachSpringBreakGirl					-- Wildcard, Wildcard
				
				-- Advanced customers
				-----------------------------------
				BeachConventionGeek						-- Wildcard, Suntan
				
				BeachNewlywedMale						-- Ice Cream or Cooking, Fishing
				BeachNewlywedFemale						-- OJ or Suntan, Windsurf
				
				BeachJapaneseExecutive					-- Cooking, Combination, Windsurf
				BeachTexasTycoon						-- Combination, Cooking, Wildcard
				
				BeachFemale2							-- Suntan, Cooking or Combination, Bike
				BeachShark								-- Suntan, Cooking or Combination, Fishing or Windsurf
			]]
		},
	},

	-- Goals
	targetMoney = 470,
	parTime = 175000,
	targetStars = 64,
	goals = {
		
		-- Level quota. Must match targetMoney above
		--------------------------------------------------------		
		{
			type = kClosingTimeWin,
			description = GetString("Goal_ClosingTime", "470"),
			quantity = 1,
			icon = goalIconsTable[kClosingTimeWin],
		},
		
		-- Par Time. Must match parTime above
		--------------------------------------------------------
		{
			type = kEndLevelInLessThan,
			description = GetString("Goal_CompleteBefore", "2:55"),
			quantity = 1,
			condition = 175000,
			optional = true,
			group = kGoalLessThan,
			icon = goalIconsTable[kEndLevelInLessThan],
		},
		
		-- Quality Stars. Must match targetStars above
		--------------------------------------------------------
		{
			type = kHaveStars,
			description = GetString("Goal_Stars", "64"),
			quantity = 1,
			condition = 64,
			optional = true,
			icon = goalIconsTable[kHaveStars],
		},
		
		-- Losing condition. Must match targetMoney above
		--------------------------------------------------------
		{
			type = kClosingTimeLose,
			description = GetString("Goal_ClosingTime", "470"),
			quantity = 1,
			loosingCondition = true,
			icon = goalIconsTable[kClosingTimeLose],
		},
		
	},

	-------------------------------------------------------------------------
	-- Graphic content

	CreateBackground();

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

		CreateStations(3);

		-- Create all decorations
		CreateDecos();

		-- Create all decorations based on time of day
		CreateTimedDecos(2);
	},

	CreateBaseLevelControls(),
};

SetDefaultStyle(nil);