anchor.diff:    if fDemand[iD].Resource <> rt_None then
     for iO:=1 to OfferCount do
      if BestBid=1 then break else //Quit loop when best bid is found
  -    if (KMHouse = nil) or (fOffer[iO].Loc_House = KMHouse) then //Make sure from house is the one requested
  +    if (aHouse = nil) or (fOffer[iO].Loc_House = aHouse) then //Make sure from house is the one requested
       if fOffer[iO].Resource <> rt_None then
   
  -    if PermitDelivery(iO,iD,KMSerf) then
  +    if PermitDelivery(iO,iD,aSerf) then
       begin
  -      Bid := CalculateBid(iO,iD,KMSerf);
  +      Bid := CalculateBid(iO,iD,aSerf);
   
         if fDemand[iD].Importance=di_High then //If Demand importance is high - make it done ASAP
         begin
  
positive.code:   TKMDeliverQueue = class
    private
      OfferCount: Integer;
      fOffer:array of
      record
        Resource:TResourceType;
        Count:cardinal;
        Loc_House:TKMHouse;
        BeingPerformed:cardinal; //How many items are being delivered atm from total Count offered
        IsDeleted:boolean; //So we don't get pointer issues
      end;
      DemandCount:integer;
      fDemand:array of
      record
        Resource:TResourceType;
        DemandType:TDemandType; //Once for everything, Always for Store and Barracks
        Importance:TDemandImportance; //How important demand is, e.g. Workers and building sites should be di_High
        Loc_House:TKMHouse;
        Loc_Unit:TKMUnit;
        BeingPerformed:boolean;
        IsDeleted:boolean; //So we don't get pointer issues
      end;
      QueueCount:integer;
      fQueue:array of
      record
        OfferID,DemandID:integer;
        JobStatus:TJobStatus; //Empty slot, resource Taken, job Done
      end;
      procedure CloseDelivery(aID:integer);
      procedure CloseDemand(aID:integer);
      procedure CloseOffer(aID:integer);
      function ValidDelivery(iO,iD:integer):boolean;
      function SerfCanDoDelivery(iO,iD:integer; aSerf:TKMUnitSerf):boolean;
      function PermitDelivery(iO,iD:integer; aSerf:TKMUnitSerf):boolean;
      function CalculateBid(iO,iD:Integer; KMSerf: TKMUnitSerf):Single;
    public
      procedure AddOffer(aHouse:TKMHouse; aResource:TResourceType; aCount:integer);
      procedure RemOffer(aHouse:TKMHouse);
  
negative.code:   LENGTH_INC = 32; //Increment array lengths by this value
  
  
  { TKMDeliveries }
  constructor TKMDeliveries.Create;
  begin
    inherited;
  