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 phlogistatic');
end

function Mission:Event_ShipSpot()
	Hud:AddMessage(Localize("What the Fuck is That"),9);
end

function Mission:Event_ElevatorDown()
	Hud:AddMessage(Localize("NewObjetive"),9);

        Hud:PushObjective({},Localize("You Should Grab the KeyCard"));
end

function Mission:Event_KeyCardGrabbed()
	Hud:AddMessage(Localize("NewObjetive"),9);
        
        Hud:CompleteObjective(Localize("You Should Grab the KeyCard")) 
        Hud:PushObjective({},Localize("Find the Way to Use the KeyCard"));
end

function Mission:Event_GetTothePier()
	Hud:AddMessage(Localize("NewObjetive"),9);
        
        Hud:CompleteObjective(Localize("Find the Way to Use the KeyCard")) 
        Hud:PushObjective({},Localize("Get to the Beach"));
        Hud:SetRadarObjective("pier");
end

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

	Hud:CompleteObjective(Localize("Get to the Beach"))

	Hud:PushObjective({},Localize("Use a boat and round the island untill you get the ship"))
	Hud:SetRadarObjective("ship");	
end



