

Beacon = {};

function Beacon.prerequisitesPresent(specializations)
    return true;
end;

function Beacon:load(xmlFile)

    self.autoBeacon=false;

end;

function Beacon:delete()
end;

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

function Beacon:keyEvent(unicode, sym, modifier, isDown)

end;

function Beacon:update(dt)

    if self.isServer then
        if (self.grainTankFillLevel >= self.grainTankCapacity*0.80) and not self.autoBeacon then
          self:setBeaconLightsVisibility(true);
          self.autoBeacon = true;
        end;                                    
        
        if (self.grainTankFillLevel < self.grainTankCapacity*0.80) and self.autoBeacon then
          self:setBeaconLightsVisibility(false);
          self.autoBeacon = false;
        end; 		
    end;

    if not self:getIsActive() and self.autoBeacon then
        if self.beaconLightsActive then
            for _, beaconLight in pairs(self.beaconLights) do
                rotate(beaconLight.node, 0, beaconLight.speed*dt, 0);
            end;		
        end; 		
    end;
		
end;

function Beacon:draw()
end;

