--author: werik

pricep = {};

function pricep.prerequisitesPresent(specializations)
Vehicle.registerJointType("FillingStation");
Vehicle.registerJointType("unloadingPipe");
    return true
end;

function pricep:load(xmlFile)
      self.vis1 = Utils.indexToObject(self.components, getXMLString(xmlFile, "vehicle.vis1#index"));
      self.vis1Active = true;
end;

function pricep:delete()
end;

function pricep:readStream(streamId, connection)
end;

function pricep:writeStream(streamId, connection)
end;

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

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

function pricep:update(dt)
-- if self:getFillLevel(Fillable.FILLTYPE_WATER or Fillable.FILLTYPE_MILK or Fillable.FILLTYPE_SEED_OIL) > 0 then
if self:getFillLevel(Fillable.FILLTYPE_WATER) > 0 or self:getFillLevel(Fillable.FILLTYPE_MILK) > 0 or self:getFillLevel(Fillable.FILLTYPE_SEED_OIL) > 0 then
            setVisibility(self.vis1, self.vis1Active);
            self.vis1Active = false;
         else
            setVisibility(self.vis1, self.vis1Active);
            self.vis1Active = true;
   end;
end;

function pricep:updateTick(dt)
end;

function pricep:draw()
end;