Mission = {
};


function Mission:OnInit()
	-- you may want to load a string-table etc. here...
end

function Mission:OnUpdate()
	local i;
	local bFinished=1;
	for i,objective in Mission do
		if (type(objective)~="function") then
			if (objective==0) then 
				bFinished=0;				
			else
			end
		end	
	end
	if (bFinished==1) then	
		self.Finish();
	end
end


function Mission:Finish()
	-- go to next mission...
end


function Mission:Event_MissionFinished()
	_localplayer.cnt:SavePlayerElements();
	Game:SendMessage('StartLevelFade training');
end

function Mission:Event_Findexplo()
	Hud:AddMessage(Localize("NewObjective"),9);
	
	Hud:PushObjective({},Localize("Find the explosive"))
end

function Mission:Event_finded()
	Hud:AddMessage(Localize("ObjectiveCompleted"),9);
	
	Hud:CompleteObjective(Localize("Find the explosive"));
end

function Mission:Event_BOOM()
	Hud:AddMessage(Localize("NewObjective"),9);
        Hud:PushObjective({},Localize("Explode the metal wall so you can get the hell out"))                
end

function Mission:Event_BOOMdone()
	Hud:AddMessage(Localize("ObjectiveCompleted"),9);
        Hud:CompleteObjective(Localize("Explode the metal wall so you can get the hell out"));          
end

function Mission:Event_Delta()
	Hud:AddMessage(Localize("NewObjective"),9);
	Hud:PushObjective({},Localize("Find the Delta Complex"));
end

function Mission:Event_Core()
	Hud:AddMessage(Localize("NewObjective"),9);
	
	Hud:CompleteObjective(Localize("Find the Delta Complex"));
	Hud:PushObjective({},Localize("Find the Main Core Reactor"));
end

function Mission:Event_ControlRoom()
	Hud:AddMessage(Localize("NewObjective"),9);
	
	Hud:CompleteObjective(Localize("Find the Main Core Reactor"));
	Hud:PushObjective({},Localize("Find the Control Room in the Sub Level 3"));
end

function Mission:Event_IncreasePressure()
	Hud:AddMessage(Localize("NewObjective"),9);
        Hud:CompleteObjective(Localize("Find the Control Room in the Sub Level 3"))

	Hud:PushObjective({},Localize("Increase Steam Pressure in the Main Core"))
end

function Mission:Event_OverFuelReactor()
	Hud:AddMessage(Localize("NewObjective"),9);

	Hud:PushObjective({},Localize("Over Fuel Reactor"))
end

function Mission:Event_OverOK()
	
        Hud:CompleteObjective(Localize("Over Fuel Reactor"))

end

function Mission:Event_PressureOK()
	
        Hud:CompleteObjective(Localize("Increase Steam Pressure in the Main Core"))

end

function Mission:Event_BlowUP()
	Hud:AddMessage(Localize("NewObjective"),9);
	
	Hud:PushObjective({},Localize("Set Explosives in the Main Core Reactor and Get the Hell Out of There"));
end

function Mission:Event_Runway()
	Hud:AddMessage(Localize("NewObjective"),9);
        Hud:CompleteObjective(Localize("Set Explosives in the Main Core Reactor and Get the Hell Out of There"))

	Hud:PushObjective({},Localize("Run Away"))
end

function Mission:Event_Runwaydone()
	Hud:AddMessage(Localize("CompleteObjective"),9);
        Hud:CompleteObjective(Localize("Run Away"))
end




		