-------------------------------------------------------------------------------------------------
-- INITIALISE_Level. Standard level event
-------------------------------------------------------------------------------------------------
function EVENTINITIALISE_Level()
	-- load the building and business file
	C_RunScript("scripts\\maps\\jonmap008.lua");
	-- load the initialprefs file
	C_RunScript("scripts\\custom\\deepred\\Jon006\\initialpref.lua");
	Game.SetObjective(OBJECTIVE_PAPERWEALTH_BY_DATE, 2000);
end;

-------------------------------------------------------------------------------------------------
-- Level. Standard level event.
-------------------------------------------------------------------------------------------------
function EVENT_Level()
end;

-------------------------------------------------------------------------------------------------
-- HourlyUpdate event. Called everytime the game calendar ticks another hour over.
-------------------------------------------------------------------------------------------------


function CATCHEVENT_HourlyUpdate(a) -- takes the current hour as an argument
	
	if a == 12 then
		if Calendar.era == ERA_1930 then
			if Calendar.year == YEAR_05 then
				Interface.CreatePrompt("City Block Release","Oriental Avenue and Pacific Avenue can now be taken to auction.");
				C_PlaySound("harpstrum.wav");
				Block[ORIENTAL_AVENUE].ownable = true;
				Block[PACIFIC_AVENUE].ownable = true;
			end
		end
	end
	if a == 12 then
		if Calendar.era == ERA_1940 then
			if Calendar.year == YEAR_00 then
				Interface.CreatePrompt("City Block Release","North Carolina, Mediterranean Avenue and the Water Works can now be taken to auction.");
				C_PlaySound("harpstrum.wav");
				Block[NORTH_CAROLINA].ownable = true;
				Block[MEDITERRANEAN_AVENUE].ownable = true;
				Block[WATER_WORKS].ownable = true;
				Block[DOCK_2].ownable = true;
			end
		end
	end
	if a == 12 then
		if Calendar.era == ERA_1950 then
			if Calendar.year == YEAR_00 then
				Interface.CreatePrompt("City Block Release","Pennsylvania Avenue, Atlantic Avenue, St. James Place, Park Place and the Shortline Railroad can now be taken to auction.");
				C_PlaySound("harpstrum.wav");
				Block[PENNSYLVANIA_AVENUE].ownable = true;
				Block[ATLANTIC_AVENUE].ownable = true;
				Block[SHORTLINE_RAILROAD].ownable = true;
				Block[ST_JAMES_PLACE].ownable = true;
				Block[PARK_PLACE].ownable = true;
			end
		end
	end
	if a == 12 then
		if Calendar.era == ERA_1950 then
			if Calendar.year == YEAR_05 then
				Interface.CreatePrompt("City Block Release","Indiana Avenue, Marvin Gardens, Vermont Avenue, Docks 1 and 3, and Pennsylvania Railroad can now be taken to auction.");
				C_PlaySound("harpstrum.wav");
				Block[INDIANA_AVENUE].ownable = true;
				Block[MARVIN_GARDENS].ownable = true;
				Block[DOCK_1].ownable = true;
				Block[DOCK_3].ownable = true;
				Block[VERMONT_AVENUE].ownable = true;
				Block[PENSYLVANIA_RAILROAD].ownable = true;
			end
		end
	end
	if a == 12 then
		if Calendar.era == ERA_1970 then
			if Calendar.year == YEAR_05 then
				Interface.CreatePrompt("City Block Release","Kentucky, Tennessee, Illinois and Virginia Avenues, The Electric Company, The Gasworks and Reading Railroad can now be taken to auction.");
				C_PlaySound("harpstrum.wav");
				Block[KENTUCKY_AVENUE].ownable = true;
				Block[TENNESSEE_AVENUE].ownable = true;
				Block[ILLINOIS_AVENUE].ownable = true;
				Block[VIRGINIA_AVENUE].ownable = true;
				Block[ELECTRIC_COMPANY].ownable = true;
				Block[READING_RAILROAD].ownable = true;
				Block[GASWORKS].ownable = true;
			end
		end
	end
	if a == 12 then
		if Calendar.era == ERA_1980 then
			if Calendar.year == YEAR_00 then
				Interface.CreatePrompt("City Block Release","All blocks can now be taken to auction.");
				C_PlaySound("harpstrum.wav");
				Block[TELECOMS].ownable = true;
				Block[B_O_RAILROAD].ownable = true;
				Block[CONNECTICUT_AVENUE].ownable = true;
				Block[NEW_YORK_AVENUE].ownable = true;
				Block[ST_CHARLES_PLACE].ownable = true;
				Block[STATES_AVENUE].ownable = true;
				Block[VENTNOR_AVENUE].ownable = true;
				Block[BOARDWALK].ownable = true;
				Block[BALTIC_AVENUE].ownable = true;
			end
		end
	end
	
-----------------------------------------------------	
	
	if People.NumberInCity() < 800 then
		if a == 14 then
--						  No		AGE				Class			Prefs				
			People.Create(2, 	AGE_ADULT, 			CLASS_LOW,		-1);
			People.Create(1, 	AGE_PENSIONER,		CLASS_LOW,	 	-1);
			People.Create(1, 	AGE_CHILD, 			CLASS_LOW,	 	-1);
			People.Create(2, 	AGE_TOURIST,		CLASS_LOW,	 	-1);
			People.Create(1, 	AGE_TEENAGER,		CLASS_LOW,	 	-1);
			
			People.Create(2, 	AGE_ADULT, 			CLASS_MEDIUM,	-1);
			People.Create(1, 	AGE_PENSIONER,		CLASS_MEDIUM, 	-1);
			People.Create(2, 	AGE_CHILD, 			CLASS_MEDIUM, 	-1);
			People.Create(1, 	AGE_TOURIST,		CLASS_MEDIUM, 	-1);
			People.Create(2, 	AGE_TEENAGER,		CLASS_MEDIUM, 	-1);
			
			People.Create(4, 	AGE_ADULT, 			CLASS_HIGH,		-1);
			People.Create(1, 	AGE_PENSIONER,		CLASS_HIGH, 	-1);
			People.Create(2, 	AGE_CHILD, 			CLASS_HIGH, 	-1);
			People.Create(3, 	AGE_TOURIST,		CLASS_HIGH, 	-1);
			People.Create(2, 	AGE_TEENAGER,		CLASS_HIGH, 	-1);
		end;
	end

end;


Block[ORIENTAL_AVENUE].ownable = false;
Block[VERMONT_AVENUE].ownable = false;
Block[TELECOMS].ownable = false;
Block[B_O_RAILROAD].ownable = false;
Block[CONNECTICUT_AVENUE].ownable = false;
Block[INDIANA_AVENUE].ownable = false;
Block[KENTUCKY_AVENUE].ownable = false;
Block[ST_JAMES_PLACE].ownable = false;
Block[TENNESSEE_AVENUE].ownable = false;
Block[ILLINOIS_AVENUE].ownable = false;
Block[PACIFIC_AVENUE].ownable = false;
Block[NEW_YORK_AVENUE].ownable = false;
Block[SHORTLINE_RAILROAD].ownable = false;
Block[NORTH_CAROLINA].ownable = false;
Block[ST_CHARLES_PLACE].ownable = false;
Block[MARVIN_GARDENS].ownable = false;
Block[PENNSYLVANIA_AVENUE].ownable = false;
Block[STATES_AVENUE].ownable = false;
Block[VIRGINIA_AVENUE].ownable = false;
Block[VENTNOR_AVENUE].ownable = false;
Block[BOARDWALK].ownable = false;
Block[PARK_PLACE].ownable = false;
Block[BALTIC_AVENUE].ownable = false;
Block[ATLANTIC_AVENUE].ownable = false;
Block[MEDITERRANEAN_AVENUE].ownable = false;
Block[GASWORKS].ownable = false;
Block[DOCK_1].ownable = false;
Block[DOCK_2].ownable = false;
Block[DOCK_3].ownable = false;
Block[WATER_WORKS].ownable = false;
Block[ELECTRIC_COMPANY].ownable = false;
Block[PENSYLVANIA_RAILROAD].ownable = false;
Block[READING_RAILROAD].ownable = false;






