anchor.diff:      if not (fType = htTownHall) and not (gRes.Houses[fType].ResInput[I] in [wtAll, wtWarfare, wtNone]) then
       begin
         //Not enough resources ordered, add new demand
  -      if fResourceDeliveryCount[I] < GetResDistribution(I) then
  +      if ResDeliveryCnt[I] < GetResDistribution(I) then
         begin
  -        Count := GetResDistribution(I)-fResourceDeliveryCount[I];
  +        Count := GetResDistribution(I) - ResDeliveryCnt[I];
           gHands[fOwner].Deliveries.Queue.AddDemand(
             Self, nil, gRes.Houses[fType].ResInput[I], Count, dtOnce, diNorm);
   
  -        Inc(fResourceDeliveryCount[I], Count);
  +        ResDeliveryCnt[I] := ResDeliveryCnt[I] + Count;
         end;
   
         //Too many resources ordered, attempt to remove demand if nobody has taken it yet
  -      if fResourceDeliveryCount[I] > GetResDistribution(I) then
  +      if ResDeliveryCnt[I] > GetResDistribution(I) then
         begin
  -        Excess := fResourceDeliveryCount[I] - GetResDistribution(I);
  +        Excess := ResDeliveryCnt[I] - GetResDistribution(I);
           Count := gHands[fOwner].Deliveries.Queue.TryRemoveDemand(Self, gRes.Houses[fType].ResInput[I], Excess);
   
  -        Dec(fResourceDeliveryCount[I], Count); //Only reduce it by the number that were actually removed
  +        ResDeliveryCnt[I] := ResDeliveryCnt[I] - Count; //Only reduce it by the number that were actually removed
         end;
   
       end;
  
positive.code:       ResIn[I] := ResIn[I] + aCount;
        if aFromScript then
        begin
          Inc(fResourceDeliveryCount[I], aCount);
          OrdersRemoved := gHands[fOwner].Deliveries.Queue.TryRemoveDemand(Self, aWare, aCount);
          Dec(fResourceDeliveryCount[I], OrdersRemoved);
        end;
      end;
  end;
  
negative.code:     procedure SetNewDeliveryMode(aValue: TKMDeliveryMode); virtual;
      procedure CheckTakeOutDeliveryMode; virtual;
      function GetDeliveryModeForCheck(aImmidiate: Boolean): TKMDeliveryMode;
  
      procedure SetResourceDeliveryCount(aIndex: Integer; aCount: Word);
      function GetResourceDeliveryCount(aIndex: Integer): Word;
  
      property ResDeliveryCnt[aIndex: Integer]: Word read GetResourceDeliveryCount write SetResourceDeliveryCount;
    public
      CurrentAction: TKMHouseAction; //Current action, withing HouseTask or idle
      WorkAnimStep: Cardinal; //Used for Work and etc.. which is not in sync with Flags
  