#include "missions.lua"
#include "messages.lua"
#include "challenges.lua"

------------------------------------------------------------------------------
-- Levels
------------------------------------------------------------------------------

gLevels = {}
gLevels["lee"] =
{
	map_title = "Öìðìîãöº Ìì",
	map_x = 1448,
	map_y = 624,
	title = "Öìðìîãöº Ìì",
	image = "terminal/level/lee.png",
	desc = "Ôóôãåï¿éöõ¿ õéð¼éí Ìì å öéýéñìé öôéû óòîòïéñìí. Ìòùôéñõ Ìì-ðïãèþìí óòîãëãï ðñòçòòäéÿã¾ÿìí õöãôö, ñò å óòõïéèñéé åôéð¿ óôìõöôãõöìïõ¿ î äºõöôºð èéñ¼çãð. Óéóéô¼ éçò ìð¿ ûòôòþò ìëåéõöñò å îôìðìñãï¼ñòð ðìôé.",
}

gLevels["marina"] =
{
	map_title = "Èãóãèñºí Ðòôö",
	map_x = 273,
	map_y = 618,
	title = "Èãóãèñºí Ðòôö",
	image = "terminal/level/marina.png",
	desc = "Òãðºí õöãôºí óòôö å ðùñìüìóãïìöéöé Ìéîéïï¼. Â ñéð éõö¼ óôòðºþïéññã¿ ýãõö¼ ì òöèéï¼ñã¿ õéîüì¿ èï¿ óôòåéèéñì¿ èòõùçã.",
}

gLevels["mansion"] =
{
	map_title = "Âìïïã Ãòôèòñã",
	map_x = 814,
	map_y = 321,
	title = "Âìïïã Ãòôèòñã",
	image = "terminal/level/mansion.png",
	desc = "Äòð ðéñéèêéôã öòôçòåòçò üéñöôã ì ½ñöùëìãõöã çòñòî Ãòôèòñã Âù, éçò èòýéôì Õôéì ì ñéåéõöº Éñìè Ëùðãñõ. àöò ½îõîï¾ëìåñºí òõòäñ¿î õ ýãõöñòí çòñòýñòí öôãõõòí ñã ëãèñéð èåòôé.",
}

gLevels["caveisland"] =
{
	map_title = "Ïõöôòå Öòïïòù-ôòî",
	map_x = 359,
	map_y = 883,
	title = "Ïõöôòå Öòïïòù-ôòî",
	image = "terminal/level/caveisland.png",
	desc = "Áºåþìí õöãôºí ôºäãüîìí óòõéïòî, Ïõöôòå Öòïïòù-ôòî ñéõîòï¼îò ïéö ñãëãè äºï óôéòäôãëòåãñ å ìõõïéèòåãöéï¼õîìí üéñöô ½ñéôçéöìýéõîìû ñãóìöîòå.",
}

gLevels["mall"] =
{
	map_title = "Âéýéôñìí Óòôçòåºí Ùéñöô",
	map_x = 472,
	map_y = 342,
	title = "Âéýéôñìí Óòôçòåºí Ùéñöô",
	image = "terminal/level/mall.png",
	desc = "Âºõòîòîïãõõñºí öòôçòåºí üéñöô ñã ñãäéôéêñòí, ùóôãåï¿éðºí Ãòôèòñòð Âù. Óãîêé å ½öòð ôãíòñé ñãûòèìöõ¿ Îãôòèñºí ðùëéí ðùñìüìóãïìöéöã Ìéîéïï¼.",
}

gLevels["frustrum"] =
{
	map_title = "Õôùõöôùð",
	map_x = 1160,
	map_y = 562,
	title = "Õôùõöôùð",
	image = "terminal/level/frustrum.png",
	desc = "Ëôòþéýñã¿ èéôéåùþîã Õôùõöôùð ñã äéôéçù ôéîì  õ åºõòîòîïãõõñºð òöéïéð, ñòýñºð îïùäòð ì ëãóôãåòýñòí õöãñüìéí.",
}

gLevels["factory"] =
{
	map_title = "Ïûôãñã Ëåìïéõã",
	map_x = 1129,
	map_y = 190,
	title = "Áéëòóãõñòõö¼ Ëåìïéõã",
	image = "terminal/level/factory.png",
	desc = "Âºõòîòöéûñòïòçìýñºí óôòìëåòèõöåéññºí ì ìõõïéèòåãöéï¼õîìí îòðóïéîõ, óòõöôòéññºí ñã îôùöºû õîãïãû õéåéôñòçò óòäéôéê¼¿. Ëòðóãñì¿ Quilez Security èòïçòé åôéð¿ äºïã ïìèéôòð ñã ôºñîé óôòåòèñºû óùï¼öòå õìçñãïìëãüìì, ñò öéóéô¼ óéôéîï¾ýìïãõ¼ ñã óôòìëåòèõöåò ãåöòñòðñºû òûôãññºû ôòäòöòå.",
}

gLevels["carib"] =
{
	map_title = "Ïõöôòå àõöòîãõöìî",
	map_x = 1770,
	map_y = 830,
	title = "Ïõöôòå àõöòîãõöìî",
	image = "terminal/level/carib.png",
	desc = "Ôéèìñéññºí öôòóìýéõîìí òõöôòå å Íùôãöòôìõé, çèé õìñöéëìôùéöõ¿ õéîôéöñºí ìñçôéèìéñö BlueTide ì óòõöãåï¿éöõ¿ å Ìéîéïïé.",
}

gLevels["cullington"] =
{
	map_title = "Ëãïïìñçöòñ",
	map_x = 910,
	map_y = 820,
	title = "Ëãïïìñçöòñ",
	image = "terminal/level/cullington.png",
	desc = "Ñòèñòí çòôòè Óôéíõì ì Ìéîéï¿, çèé ñãûòèìöõ¿ þöãä-îåãôöìôã îòðóãñìì Teardown Services HQ",
}


------------------------------------------------------------------------------
-- Clients
------------------------------------------------------------------------------

gClients = {}
gClients["tracy"]=
{
	name = "Óôéíõì",
	image = "terminal/client/tracy.png"
}

gClients["parisa"]=
{
	name = "Ðãôìõã Óéôèìðãñ",
	image = "terminal/client/parisa.png"
}

gClients["gordon"]=
{
	name = "Ãòôèòñ Âù",
	image = "terminal/client/gordon.png"
}

gClients["lee"]=
{
	name = "Ìòùôéñõ Ìì Íïãèþìí",
	image = "terminal/client/lee.png"
}

gClients["gjk"]=
{
	name = "Äêìïïìãñ Äêòñõòñ",
	image = "terminal/client/gillian.png"
}

gClients["wlf"]=
{
	name = "Àñöòñ Âùï¼ú",
	image = "terminal/client/wlf.png"
}

gClients["lcc"]=
{
	name = "Ãòôòèõîòí õòåéö Ìéîîéïï¿",
	image = "terminal/client/lcc.png"
}

gClients["tuxedolabs"]=
{
	name = "Óùîõéèò Ìãä.",
	image = "terminal/client/tuxedolabs.png"
}

gClients["amanatides"]=
{
	name = "Àðãñãöìèéõ",
	image = "terminal/client/amanatides.png"
}

gClients["elena"]=
{
	name = "Åïéñã Õéôñãñèéë",
	image = "terminal/client/elena.png"
}

gClients["penitentiary"]=
{
	name = "Ãòõùèãôõöåéññã¿ ö¾ô¼ðã Ìéîîéïï¿",
	image = "terminal/client/penitentiary.png"
}


------------------------------------------------------------------------------
-- Tools
------------------------------------------------------------------------------


gTools = 
{
	sledge = 
	{
		name="Ëùåãïèã", 
		image="sledge.png", 
		desc="Éñõöôùðéñö äïìêñéçò èéíõöåì¿. Îãñòõìö õôéèñìí ùôòñ õïãäºð ðãöéôìãïãð. Îé ñùêèãéöõ¿ å äòéóôìóãõãû ì ñé ìëñãþìåãéöõ¿.",
		upgrades=
		{
		}
	},
	spraycan =
	{
		name="Áãïïòñýìî c îôãõîòí",
		image="spraycan.png",
		desc="Äéïãíöé óòðéöîì ñã òîôùêã¾ÿìû óòåéôûñòõö¿û. Ðòïéëéñ, ýöòäº òöðéýãö¼ óôéèóòïãçãéðºí óùö¼ åò åôéð¿ óòäéçã.",
		upgrades=
		{
		}
	},
	extinguisher =
	{
		name="Ïçñéöùþìöéï¼",
		image="extinguisher.png",
		desc="Áéëòóãõñòõö¼ óôéåºþé åõéçò. Éõóòï¼ëùíöé ½öòö ìñõöôùðéñö èï¿ öùþéñì¿ óòêãôòå.",
		upgrades=
		{
		}
	},
	blowtorch =
	{
		name="Ñéëãî",
		image="blowtorch.png",
		desc="Ñéêéö ðéöãïï, èéôéåò ì óïãõöìî. Éñòçèã ðòêéö óòèêìçãö¼ åéÿì.",
		upgrades=
		{
			{ id="ammo", name="Óòóïìåò", desc="Ëòïìýéõöåò õéîùñè, å öéýéñìé îòöòôºû åº ðòêéöé éçò ìõóòï¼ëòåãö¼", default=20, max=60, step=10, price=100 },
		}
	},
	shotgun =
	{
		name="Äôòäòåìî",
		image="shotgun.png",
		desc="Éñõöôùðéñö äïìêñéçò èéíõöåì¿, ñãñòõìö õôéèñìí ùôòñ äòï¼þìñõöåù ðãöéôìãïòå. Ôôòñ ùðéñ¼þãéöõ¿ õ ôãõõöò¿ñìéð.",
		upgrades=
		{
			{ id="ammo", name="Âºõöôéïº", desc="Ëòïìýéõöåò åºõöôéïòå (ñé óãöôòñòå), îòöòôºé ù åãõ éõö¼ å ñãýãïé ðìõõìì", default=12, max=96, step=12, price=200 },
			{ id="range", name="Äãï¼ñòõö¼", desc="Íãîõìðãï¼ñã¿ èãï¼ñòõö¼ èï¿ òôùêì¿.", default=20, max=60, step=20, price=300 },
			{ id="damage", name="Ôôòñ", desc="Òîòï¼îò ùôòñã òñ ñãñòõìö.", default=3, max=5, step=1, price=400 },
		}
	},
	plank =
	{
		name="Äòõîì",
		image="plank.png",
		desc="Äéôéå¿ññºé èòõîì, ìõóòï¼ëùéðºé èï¿ õòéèìñéñì¿ óôéèðéöòå, õöôòìöéï¼õöåã õòòôùêéñìí ì èòôòêéî.",
		upgrades=
		{
			{ id="ammo", name="Ëòï-åò", desc="Ëòïìýéõöåò èòõòî, ýöò ù åãõ äùèéö å ñãýãïé ðìõõìì.", default=8, max=64, step=8, price=150 },
			{ id="width", name="Ûìôìñã", desc="Ûìôìñã èòõîì", default=3, max=5, step=1, price=200 },
			{ id="length", name="Íãîc. èïìñã", desc="Íãîõìðãï¼ñã¿ èïìñã îãêèòí èòõîì", default=40, max=64, step=8, price=300 },
		}
	},
	pipebomb =
	{
		name="Óôùäýãöã¿ äòðäã",
		image="pipebomb.png",
		desc="Òôéèñìí ôãèìùõ èéíõöåì¿, ðéöãöéï¼ñã¿ åëôºåýãöîã, õôéèñìí ùôòñ ì óïòûã¿ öòýñòõö¼.",
		upgrades=
		{
			{ id="ammo", name="Ëòï-åò", desc="Ëòïìýéõöåò äòðä, ýöò ù åãõ äùèéö å ñãýãïé ðìõõìì", default=6, max=36, step=6, price=200 },
			{ id="damage", name="Âëôºå", desc="Óò, õîòï¼îò ùôòñã òñ ñãñòõìö å ôãèìùõé.", default=2, max=4, step=1, price=500 },
		}
	},
	gun =
	{
		name="Ðìõöòïéö", 
		image="gun.png", 
		desc="Öòôòþò óòèûòèìö èï¿ õöôéï¼äº ñã õôéèñéí èìõöãñüìì. Îãñòõìö ñéäòï¼þìé óòåôéêèéñì¿ äòï¼þìñõöåù ðãöéôìãïòå ñã ï¾äòð ôãõõöò¿ñìì.",
		upgrades=
		{
			{ id="ammo", name="Ðãöôòñº", desc="Ëòïìýéõöåò óãöôòñòå, ýöò ù åãõ äùèéö å ñãýãïé ðìõõìì.", default=6, max=36, step=6, price=200 },
			{ id="range", name="Äãï¼ñòõö¼", desc="ðãîõìðãï¼ñã¿ èãï¼ñòõö¼ èéíõöåì¿", default=40, max=100, step=20, price=300 },
			{ id="damage", name="Ôôòñ", desc="Òîòï¼îò ùôòñã ñãñòõìö óùï¿", default=1, max=3, step=1, price=300 },
		}
	},
	bomb =
	{
		name="Áòðäã c öãíðéôòð",
		image="bomb.png",
		desc="Ðôìîôéóï¿éöõ¿ î óôéèðéöãð ì åëôºåéöõ¿ ýéôéë öôì õéîùñèº.",
		upgrades=
		{
			{ id="ammo", name="Ëòï-åò", desc="Ëòïìýéõöåò äòðä, ýöò ù åãõ äùèéö å ñãýãïé ðìõõìì.", default=6, max=36, step=6, price=400 },
			{ id="damage", name="Âëôºå", desc="Òîòï¼îò ùôòñã òñ ñãñòõìö.", default=4, max=6, step=1, price=500 },
		}
	},
	wire =
	{
		name="Ëãäéï¼",
		image="wire.png",
		desc="Ëãäéïì ðòêñò ìõóòï¼ëòåãö¼ èï¿ óéôéöãõîìåãñì¿ ö¿êéïºû óôéèðéöòå õ óòðòÿ¼¾ öôãñõóòôöñºû õôéèõöå, óòèåéþìåãñì¿ óôéèðéöòå ìïì õòëèãñì¿ ôãëïìýñºû îòñõöôùîüìí.",
		upgrades=
		{
			{ id="ammo", name="Ëãäéïì", desc="Ëòïìýéõöåò îãäéïéí, ìðé¾ÿìûõ¿ ù åãõ å ñãýãïé ðìõõìì", default=6, max=24, step=6, price=300 },
			{ id="stretch", name="Äïìñã", desc="Îãõîòï¼îò ðòêñò ôãõö¿ñùö¼ îãäéï¼ óôì éçò ùîïãèîé", default=3, max=5, step=1, price=400 },
		}
	},
	rocket =
	{
		name="Ñãîéöòðéö",
		image="launcher.png",
		desc="Âëôºåýãöîã èãï¼ñéçò èéíõöåì¿, îôùóñºí åëôºå ì ûòôòþã¿ öòýñòõö¼.",
		upgrades=
		{
			{ id="ammo", name="Áòéëãóãõ", desc="Ëòïìýéõöåò ôãîéö, îòöòôºé åº ìðééöé å ñãýãïé ðìõõìì", default=6, max=24, step=6, price=500 },
			{ id="damage", name="Âëôºå", desc="Òîòï¼îò ùôòñã òñ ñãñòõìö.", default=3, max=5, step=1, price=750 },
		}
	},
	booster =
	{
		name="Ñãîéöñºí ùõîòôìöéï¼",
		image="booster.png",
		desc="Áùõöéôº ðòêñò óôìîôéóìö¼ î ï¾äòðù òä¹éîöù ì ëãêéý¼ èï¿ óôìåéèéñì¿ å èåìêéñìé. Îéõîòï¼îò ùõîòôìöéïéí ðòçùö äºö¼ òä¹éèìñéñº ì ãîöìåìôòåãñº òèñòåôéðéññò.",
		upgrades=
		{
			{ id="ammo", name="Ëòï-åò", desc="Ëòïìýéõöåò ùõîòôìöéïéí, ìðé¾ÿìûõ¿ ù åãõ å ñãýãïé ðìõõìì", default=6, max=24, step=6, price=500 },
			{ id="power", name="Íòÿñòõö¼", desc="Ïóôéèéï¿éö åéïìýìñù ö¿çì", default=200, max=400, step=100, price=750 },
			{ id="time", name="Âôéð¿", desc="Ëãî èòïçò çòôìö äùõöéô.", default=4, max=8, step=2, price=750 },
		}
	},
	leafblower =
	{
		name="Âòëèùûòèùå èï¿ ïìõö¼éå",
		image="leafblower.png",
		desc="Íòÿñºé ïìõöòòýìõöìöéïì òöïìýñò óòèûòè¿ö èï¿ ôãõýìõöîì ëãåãïòå óòõïé åëôºåã, ýöòäº òõåòäòèìö¼ óôòéëêù¾ ýãõö¼ èï¿ öôãñõóòôöñºû õôéèõöå.",
		upgrades=
		{
			{ id="power", name="Íòÿñòõö¼", desc="Áòï¼þã¿ ðòÿñòõö¼ òýìÿãéö äòïéé îôùóñºí ðùõòô", default=20, max=50, step=10, price=200 },
		}
	},
	turbo =
	{
		name="Ôõîòôìöéï¼ öôãñõóòôöã",
		image="turbo.png",
		desc="Ôõîòôìöéïì ðòçùö äºö¼ óôìîôéóïéñº î öôãñõóòôöñºð õôéèõöåãð. Òçòôã¾ö óôì ìõóòï¼ëòåãñìì. Îã òèñòð öôãñõóòôöñòð õôéèõöåé ðòêéö äºö¼ ùõöãñòåïéñò ñéõîòï¼îò ùõîòôìöéïéí.",
		upgrades=
		{
			{ id="ammo", name="Ëòï-åò", desc="Ëòïìýéõöåò ùõîòôìöéïéí, îòöòôºðì åº ôãõóòïãçãéöé å ñãýãïé ðìõõìì", default=6, max=24, step=6, price=500 },
			{ id="power", name="Íòÿñòõö¼", desc="Ïóôéèéï¿éö åéïìýìñù ö¿çì", default=200, max=400, step=100, price=750 },
		}
	},
	explosive =
	{
		name="Îìöôòçïìüéôìñ",
		image="explosive.png",
		desc="Ëòñöéíñéôº õ ñìçôòçïìüéôìñòð òýéñ¼ åëôºåòòóãõñº ì ñãñòõ¿ö òçôòðñºí ùÿéôä. Éû ðòêñò ôãëðéõöìö¼ çèé ùçòèñò, ì òñì åëòôåùöõ¿ óôì åºõöôéïé, óòêãôé ìïì èôùçòð óòåôéêèéñìì.",
		upgrades=
		{
			{ id="ammo", name="Ëòï-åò", desc="Ëòïìýéõöåò îòñöéíñéôòå, ìðé¾ÿìûõ¿ ù åãõ å ñãýãïé ðìõõìì", default=4, max=16, step=4, price=400 },
			{ id="damage", name="Ôôòñ", desc="Òîòï¼îò ùôòñã ñãñòõìö îãêèºí îòñöéíñéô.", default=5, max=8, step=1, price=600 },
		}
	},
	rifle =
	{
		name="Ïûòöñìý¼é ôùê¼é",
		image="rifle.png",
		desc="Ïûòöñìý¼¿ åìñöòåîã òäïãèãéö òöïìýñòí öòýñòõö¼¾ ì äòï¼þòí èãï¼ñòõö¼¾ õöôéï¼äº. Éõóòï¼ëùíöé îñòóîù ëãûåãöã èï¿ óôìäïìêéñì¿ ì óôìüéïìåãñì¿. Ðùïì óôòäìåã¾ö ñéõîòï¼îò õïòéå ðãöéôìãïã.",
		upgrades=
		{
			{ id="ammo", name="Ëòï-åò", desc="Ëòïìýéõöåò óãöôòñòå, îòöòôòé åº ìðééöé å ñãýãïé ðìõõìì", default=6, max=18, step=6, price=400 },
		}
	},
	steroid =
	{
		name="BlueTide",
		image="steroid.png",
		desc="BlueTide òõñòåñòí åºóùõî, õåéôûõìïã. Âºóìå äùöºïòýîù, åº ñã åôéð¿ ùåéïìýìöé õîòôòõö¼ äéçã ì óôºçùýéõö¼.",
		upgrades=
		{
			{ id="ammo", name="Áùöºïòýîì", desc="Ëòïìýéõöåò äùöºïòî BlueTide, ìðé¾ÿìûõ¿ ù åãõ å ñãýãïé ðìõõìì", default=2, max=4, step=1, price=600 },
			{ id="time", name="Äïìöéï¼ñòõö¼", desc="Ðôòèòïêìöéï¼ñòõö¼ ½úúéîöã òö îãêèòçò úïãîòñã å õéîùñèãû", default=4, max=6, step=1, price=800 },
		}
	},
}

------------------------------------------------------------------------------
-- Ranks
------------------------------------------------------------------------------

gRanks =
{
	{score=0, name="Äéðòñöãêñìî"},
	{score=5, name="Ì¾äìöéï¼", tool="blowtorch"},
	{score=10, name="Îòåìýòî", tool="shotgun"},
	{score=15, name="Îãôùþìöéï¼", tool="plank"},
	{score=20, name="Âëïòðÿìî", tool="pipebomb"},
	{score=30, name="Çùïìî", tool="gun"},
	{score=40, name="Ñãëôùþìöéï¼", tool="bomb"},
	{score=50, name="Óãïãñö", tool="wire"},
	{score=60, name="Âòòôùêéññºí", tool="rocket"},
	{score=70, name="Ìòåîãý", tool="leafblower"},
	{score=80, name="Ðôòúéõõìòñãï", tool="booster"},
	{score=90, name="Ðòïùñòýñìî", tool="turbo"},
	{score=100, name="Òóéüìãïìõö", tool="explosive"},
	{score=110, name="Ìùýþìí óéõ", tool="rifle"},
	{score=120, name="Ãòô¿ýã¿ óùï¿", tool="steroid"},
	{score=130, name="Ãéñìí", cash=1000},
	{score=140, name="àîõóéôö", cash=2000},
	{score=160, name="Ãùôù", cash=3000},
	{score=180, name="Ôðéïéü", cash=4000},
	{score=200, name="Âìôöùòë", cash=5000},
}


------------------------------------------------------------------------------
-- Sandbox levels
------------------------------------------------------------------------------

gSandbox = 
{		
	{ id="lee_sandbox", level="lee", name="Öìðìîãöº Ìì", image="menu/level/lee.png", file="lee.xml", layers="sandbox"},
	{ id="marina_sandbox", level="marina", name="Èãóãèñºí Ðòôö", image="menu/level/marina.png", file="marina.xml", layers="sandbox"},
	{ id="mansion_sandbox", level="mansion", name="Âìïïã Ãòôèòñã", image="menu/level/mansion.png", file="mansion.xml", layers="sandbox"},
	{ id="caveisland_sandbox", level="caveisland", name="Öòïïòù-ôòî", image="menu/level/caveisland.png", file="caveisland.xml", layers="sandbox"},
	{ id="mall_sandbox", level="mall", name="àåéôöìèéõ", image="menu/level/mall.png", file="mall.xml", layers="sandbox"},
	{ id="frustrum_sandbox", level="frustrum", name="Õôùõöôùð", image="menu/level/frustrum.png", file="frustrum.xml", layers="sandbox"},
	{ id="hub_carib_sandbox", level="hub_carib", name="Ðï¿ê Íùôãöòôì", image="menu/level/hub_carib.png", file="hub_carib.xml", layers="sandbox"},
	{ id="carib_sandbox", level="carib", name="Ïõöôòå àõöòîãõöìî", image="menu/level/carib.png", file="carib.xml", layers="sandbox"},
	{ id="factory_sandbox", level="factory", name="Ïûôãñã Ëåìïéõã", image="menu/level/factory.png", file="factory.xml", layers="sandbox"},
	{ id="cullington_sandbox", level="cullington", name="Ëãïïìñçöòñ", image="menu/level/cullington.png", file="cullington.xml", layers="sandbox"},
}
	
	
------------------------------------------------------------------------------
-- Cinematic ending sequences
------------------------------------------------------------------------------

gCinematic = 
{
	ending1 = 
	{
		music = "win.ogg",
		esc = "hub",
		parts = 
		{
			{ id="ending10", file="lee.xml", layers="part1ending"},
		}
	},

	ending2 = 
	{
		music = "ending.ogg",
		esc = "menu",
		parts = 
		{
			{ id="ending20", file="hub.xml", layers="part2 part2ending"},
			{ id="ending21", file="mansion.xml", layers="part2ending"},
			{ id="ending22", file="marina.xml", layers="part2ending"},
		}
	}
}


------------------------------------------------------------------------------
-- Expansions
------------------------------------------------------------------------------

gExpansions = 
{
	{ level="builtin-artvandals", image="menu/expansion/artvandals.png", name="Art Vandals", available=true },
}

	
	
function getHubVersion()
	local current = 0
	if GetInt("savegame.mission.mall_intro.score") > 0 then current = 1 end
	if GetInt("savegame.mission.lee_computers.score") > 0 then current = 2 end
	if GetInt("savegame.mission.lee_login.score") > 0 then current = 3 end
	if GetInt("savegame.mission.marina_demolish.score") > 0 then current = 4 end
	if GetInt("savegame.mission.marina_cars.score") > 0 then current = 5 end
	if GetInt("savegame.mission.marina_gps.score") > 0 or GetInt("savegame.mission.mansion_pool.score") > 0 then current = 6 end
	if GetInt("savegame.mission.lee_tower.score") > 0 then current = 7 end
	if GetInt("savegame.mission.mansion_art.score") > 0 then current = 8 end
	if GetInt("savegame.mission.marina_art_back.score") > 0 then current = 9 end
	if GetInt("savegame.mission.caveisland_computers.score") > 0 then current = 10 end
	if GetInt("savegame.mission.mansion_safe.score") > 0 then current = 11 end
	if GetInt("savegame.mission.lee_powerplant.score") > 0 then current = 12 end
	if GetInt("savegame.mission.caveisland_dishes.score") > 0 then current = 13 end
	if GetInt("savegame.mission.lee_flooding.score") > 0 then current = 15 end
	if GetInt("savegame.mission.frustrum_chase.score") > 0 then current = 16 end
	
	--PART 2
	if GetInt("savegame.mission.frustrum_chase.score") > 0 then current = 20 end
	if GetInt("savegame.mission.factory_espionage.score") > 0 then current = 21 end
	if GetInt("savegame.mission.caveisland_ingredients.score") > 0 then current = 22 end
	if GetInt("savegame.mission.frustrum_tornado.score") > 0 then current = 23 end
	if GetInt("savegame.mission.mall_shipping.score") > 0 then current = 24 end

	--Carib	
	if GetInt("savegame.message.carib_alarm") > 0 then current = 31 end
	if GetInt("savegame.mission.carib_alarm.score") > 0 then current = 32 end
	if GetInt("savegame.mission.carib_barrels.score") > 0 then current = 33 end
	if GetInt("savegame.mission.carib_destroy.score") > 0 then current = 34 end

	--Back in lockelle
	if GetInt("savegame.message.frustrum_vehicle") > 0 then current = 40 end
	if GetInt("savegame.mission.frustrum_vehicle.score") > 0 then current = 41 end
	if GetInt("savegame.mission.mall_radiolink.score") > 0 then current = 42 end
	if GetInt("savegame.mission.factory_robot.score") > 0 then current = 43 end
	if GetInt("savegame.mission.factory_explosive.score") > 0 then current = 44 end
	if GetInt("savegame.mission.caveisland_roboclear.score") > 0 then current = 45 end
	if GetInt("savegame.mission.cullington_bomb.score") > 0 then current = 46 end

	return current
end


function startHub()
	local v = getHubVersion()
	if v >= 30 and v < 39 then
		StartLevel("hub"..v, "hub_carib.xml", "v"..v)
	else
		if v < 20 then
			StartLevel("hub"..v, "hub.xml", "part1 v"..v)
		else
			StartLevel("hub"..v, "hub.xml", "part2 v"..v)
		end
	end
end


function skipMission(id)
	if gMissions[id] then
		SetInt("savegame.mission."..id..".score", gMissions[id].required)
		SetString("savegame.lastcompleted", id)
	end
end


function startCinematic(cinematic, noLoadingScreen)
	local c = gCinematic[cinematic].parts[1]
	StartLevel(c.id, c.file, c.layers, noLoadingScreen)
end

