
Bienenstock = {};

function Bienenstock.prerequisitesPresent(specializations)
   return true;
end;
function Bienenstock:load(xmlFile)
	self.doMoneyCnt = 1; 
	if self.isClient then
		self.flyingBeesParticleSystems = {};
		local psName = "vehicle.flyingBees";
		Utils.loadParticleSystem(xmlFile, self.flyingBeesParticleSystems, psName, self.components, false, nil, self.baseDirectory)
	end;
	self.audio = Utils.indexToObject(self.components, getXMLString(xmlFile, "vehicle.audio#index"));
end;
function Bienenstock:delete()
	Utils.deleteParticleSystem(self.flyingBeesParticleSystems);
end;
function Bienenstock:mouseEvent(posX, posY, isDown, isUp, button)
end;
function Bienenstock:keyEvent(unicode, sym, modifier, isDown)
end;

function Bienenstock:update(dt)

		zeit = g_currentMission.environment.dayTime / 3600000 
	 
	
		if zeit > 1 and self.doMoneyCnt == 1 then
			g_currentMission:addSharedMoney(0) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 2 and self.doMoneyCnt == 2 then
			g_currentMission:addSharedMoney(0) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 3 and self.doMoneyCnt == 3 then
			g_currentMission:addSharedMoney(0) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 4 and self.doMoneyCnt == 4 then
			g_currentMission:addSharedMoney(0) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 5 and self.doMoneyCnt == 5 then
			g_currentMission:addSharedMoney(0) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 6 and self.doMoneyCnt == 6 then
			g_currentMission:addSharedMoney(100) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 7 and self.doMoneyCnt == 7 then
			g_currentMission:addSharedMoney(100) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 8 and self.doMoneyCnt == 8 then
			g_currentMission:addSharedMoney(100) 
		self.doMoneyCnt = self.doMoneyCnt +1; 
		
		
		elseif zeit > 9 and self.doMoneyCnt == 9 then
			g_currentMission:addSharedMoney(100) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 10 and self.doMoneyCnt == 10 then
			g_currentMission:addSharedMoney(100) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 11 and self.doMoneyCnt == 11 then
			g_currentMission:addSharedMoney(100) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 12 and self.doMoneyCnt == 12 then
			g_currentMission:addSharedMoney(100) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 13 and self.doMoneyCnt == 13 then
			g_currentMission:addSharedMoney(100) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 14 and self.doMoneyCnt == 14 then
			g_currentMission:addSharedMoney(100) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 15 and self.doMoneyCnt == 15 then
			g_currentMission:addSharedMoney(100) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 16 and self.doMoneyCnt == 16 then
			g_currentMission:addSharedMoney(100) 
		self.doMoneyCnt = self.doMoneyCnt +1; 
		
		elseif zeit > 17 and self.doMoneyCnt == 17 then
			g_currentMission:addSharedMoney(100) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 18 and self.doMoneyCnt == 18 then
			g_currentMission:addSharedMoney(100) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 19 and self.doMoneyCnt == 19 then
			g_currentMission:addSharedMoney(100) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 20 and self.doMoneyCnt == 20 then
			g_currentMission:addSharedMoney(100) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 21 and self.doMoneyCnt == 21 then
			g_currentMission:addSharedMoney(0) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 22 and self.doMoneyCnt == 22 then
			g_currentMission:addSharedMoney(0) 
		self.doMoneyCnt = self.doMoneyCnt +1;
		
		elseif zeit > 23 and self.doMoneyCnt == 23 then
			g_currentMission:addSharedMoney(0) 
		self.doMoneyCnt = self.doMoneyCnt +1; 
		
		elseif zeit > 0 and self.doMoneyCnt == 24 then
			g_currentMission:addSharedMoney(0) 
		self.doMoneyCnt = 1; 
		
		end;
		
		
		
end;

function Bienenstock:updateTick(dt)
	if self.isClient then
		Utils.setEmittingState(self.flyingBeesParticleSystems, self.StuetzenAn);
		setVisibility(self.audio, self.StuetzenAn);
	end;
end;

function Bienenstock:draw()	
end;


