
FortschrittE518 = {};

function FortschrittE518.prerequisitesPresent(specializations)
    return SpecializationUtil.hasSpecialization(Steerable, specializations);
end;

function FortschrittE518:load(xmlFile)
   self.combineName = getXMLString(xmlFile, "vehicle.name.de");
end;

function FortschrittE518:delete()
end;

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

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

function FortschrittE518:update(dt)
   local prozent = self.grainTankFillLevel/self.grainTankCapacity*100;   
   if prozent > 0 then
      renderText(0.78, 0.81, 0.02,""..string.format("%s: %.0f (%d%%)", self.combineName, self.grainTankFillLevel, prozent).."");
   end;
       if self.isServer then
        if (self.grainTankFillLevel >= self.grainTankCapacity*0.8) and not self.autoBeacon then
          self:setBeaconLightsVisibility(true);
          self.autoBeacon=true;
        end;                                    
        
        if (self.grainTankFillLevel < self.grainTankCapacity*0.8) 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 FortschrittE518:draw()
end;

function FortschrittE518:onEnter()
end;

function FortschrittE518:onLeave()
end;