anchor.diff:  
   
   procedure TKMHouseTownHall.ResAddToIn(aWare: TWareType; aCount: Integer = 1; aFromScript: Boolean = False);
  -//var
  -//  OldCnt, AddedGoldCnt, OrdersRemoved: Integer;
   begin
     Assert(aWare = wt_Gold, 'Invalid resource added to TownHall');
  -
  -//  OldCnt := fGoldCnt;
   
     // Allow to enlarge GoldMaxCnt from script (either from .dat or from .script)
     if aFromScript and (fGoldMaxCnt < fGoldCnt + aCount) then
       SetGoldMaxCnt(fGoldCnt + aCount, True);
   
     fGoldCnt := EnsureRange(fGoldCnt + aCount, 0, High(Word));
  -//  AddedGoldCnt := fGoldCnt - OldCnt;
     if aFromScript then
  -  begin
  -//    Inc(fGoldDeliveryCount, AddedGoldCnt);
  -    {OrdersRemoved := }gHands[fOwner].Deliveries.Queue.TryRemoveDemand(Self, aWare, aCount);
  -//    Dec(fGoldDeliveryCount, OrdersRemoved);
  -  end;
  -//  gHands[fOwner].Deliveries.Queue.AddOffer(Self, aWare, fGoldCnt - OldCnt);
  +    gHands[fOwner].Deliveries.Queue.TryRemoveDemand(Self, aWare, aCount);
   end;
   
   
  
positive.code:   if aFromScript then
      gHands[Owner].Stats.WareConsumed(aWare, aCount);
  
  //  fGoldDeliveryCount := Max(fGoldDeliveryCount - aCount, 0);
  
    Dec(fGoldCnt, aCount);
    //Only request a new resource if it is allowed by the distribution of wares for our parent player
    gHands[fOwner].Deliveries.Queue.AddDemand(Self, nil, aWare, aCount, dtOnce, diNorm);
  //  Inc(fGoldDeliveryCount, aCount);
  end;
  
  
  
negative.code: 
    fGoldCnt := 0;
    fGoldMaxCnt := MAX_WARES_IN_HOUSE;
  end;
  
  
  