--original author [Bayn]
--no more gloss by RivalBomb
EventListener = {};

function EventListener:loadMap(name)
    local env = g_currentMission.environment;

    env.ambientCurve = AnimCurve:new(linearInterpolator3);
    env.ambientCurve:addKeyframe({x=0.0050, y=0.0050, z=0.0050, time = 0*60});
    env.ambientCurve:addKeyframe({x=0.0050, y=0.0050, z=0.0050, time = 1*60});
    env.ambientCurve:addKeyframe({x=0.0050, y=0.0050, z=0.0050, time = 2*60});
    env.ambientCurve:addKeyframe({x=0.0050, y=0.0050, z=0.0050, time = 3.6*60});
    env.ambientCurve:addKeyframe({x=0.0050, y=0.0050, z=0.0050, time = 4*60});
	env.ambientCurve:addKeyframe({x=0.0050, y=0.0050, z=0.0050, time = 4.30*60});
	env.ambientCurve:addKeyframe({x=0.0050, y=0.0050, z=0.0050, time = 5*60});
	env.ambientCurve:addKeyframe({x=0.050, y=0.050, z=0.050, time = 6*60});
    env.ambientCurve:addKeyframe({x=0.1, y=0.1,  z=0.1,  time = 7*60});
	env.ambientCurve:addKeyframe({x=0.1, y=0.1,  z=0.1,  time = 8*60});
	env.ambientCurve:addKeyframe({x=0.15, y=0.15,  z=0.15,  time = 9*60});
    env.ambientCurve:addKeyframe({x=0.2,  y=0.2,  z=0.2,  time = 10*60});
    env.ambientCurve:addKeyframe({x=0.2,  y=0.2,  z=0.2,  time = 12*60});
    env.ambientCurve:addKeyframe({x=0.2,  y=0.2,  z=0.2,  time = 14*60});
    env.ambientCurve:addKeyframe({x=0.15,  y=0.15,  z=0.15,  time = 15*60});
    env.ambientCurve:addKeyframe({x=0.15,  y=0.15,  z=0.15,  time = 18*60});
    env.ambientCurve:addKeyframe({x=0.2,  y=0.2,  z=0.2,  time = 19*60});
    env.ambientCurve:addKeyframe({x=0.2,  y=0.2,  z=0.2,  time = 20*60});
	env.ambientCurve:addKeyframe({x=0.2,  y=0.2,  z=0.2,  time = 20.3*60});
	env.ambientCurve:addKeyframe({x=0.1,  y=0.1,  z=0.1,  time = 21*60});
	env.ambientCurve:addKeyframe({x=0.0050,  y=0.0050,  z=0.0050,  time = 22*60});
	env.ambientCurve:addKeyframe({x=0.0050,  y=0.0050,  z=0.0050,  time = 23*60});
	

    env.specularCurve = AnimCurve:new(linearInterpolator3);
	env.specularCurve:addKeyframe({x=0, y=0, z=0, time = 0*60}); 	--no more Gloss !
	env.specularCurve:addKeyframe({x=0, y=0, z=0, time = 12*60}); 	--no more Gloss !
	env.specularCurve:addKeyframe({x=0, y=0, z=0, time = 23*60});	--no more Gloss !
				
    env.diffuseCurve = AnimCurve:new(linearInterpolator3);
    env.diffuseCurve:addKeyframe({x=0,   y=0,    z=0, time = 0*60});
	env.diffuseCurve:addKeyframe({x=0,   y=0,    z=0, time = 1*60});
	env.diffuseCurve:addKeyframe({x=0,   y=0,    z=0, time = 2*60});
	env.diffuseCurve:addKeyframe({x=0,   y=0,    z=0, time = 3*60});
	env.diffuseCurve:addKeyframe({x=0,   y=0,    z=0, time = 4*60});
	env.diffuseCurve:addKeyframe({x=0.010,   y=0.010,    z=0.010, time = 5*60});
	env.diffuseCurve:addKeyframe({x=0.2,   y=0.2,    z=0.2, time = 6*60});
	env.diffuseCurve:addKeyframe({x=0.7,   y=0.7,    z=0.7, time = 7*60});
	env.diffuseCurve:addKeyframe({x=0.7,   y=0.7,    z=0.7, time = 8*60});
	env.diffuseCurve:addKeyframe({x=0.7,   y=0.7,    z=0.7, time = 9*60});
	env.diffuseCurve:addKeyframe({x=0.7,   y=0.7,    z=0.7, time = 10*60});
	env.diffuseCurve:addKeyframe({x=0.7,   y=0.7,    z=0.7, time = 11*60});
	env.diffuseCurve:addKeyframe({x=0.7,   y=0.7,    z=0.7, time = 12*60});
	env.diffuseCurve:addKeyframe({x=0.7,   y=0.7,    z=0.7, time = 13*60});
	env.diffuseCurve:addKeyframe({x=0.7,   y=0.7,    z=0.7, time = 14*60});
	env.diffuseCurve:addKeyframe({x=0.7,   y=0.7,    z=0.7, time = 15*60});
	env.diffuseCurve:addKeyframe({x=0.7,   y=0.7,    z=0.7, time = 16*60});
	env.diffuseCurve:addKeyframe({x=0.7,   y=0.7,    z=0.7, time = 17*60});
	env.diffuseCurve:addKeyframe({x=0.7,   y=0.7,    z=0.7, time = 18*60});
	env.diffuseCurve:addKeyframe({x=0.7,   y=0.7,    z=0.7, time = 19*60});
	env.diffuseCurve:addKeyframe({x=0.7,   y=0.7,    z=0.7, time = 20*60});
	env.diffuseCurve:addKeyframe({x=0.5,   y=0.5,    z=0.5, time = 20.6*60});
	env.diffuseCurve:addKeyframe({x=0.2,   y=0.2,    z=0.2, time = 21*60});
	env.diffuseCurve:addKeyframe({x=0.0,   y=0.0,    z=0.0, time = 22*60});
	env.diffuseCurve:addKeyframe({x=0.0,   y=0.0,    z=0.0, time = 23*60});
	
	
end;

function EventListener:deleteMap()
end;

function EventListener:mouseEvent(posX, posY, isDown, isUp, button)
end;

function EventListener:keyEvent(unicode, sym, modifier, isDown)
end;

function EventListener:update(dt)
end;

function EventListener:draw()
end;

addModEventListener(EventListener);