anchor.diff:    Res: TWareType;
   begin
     Result := False;
  -  Res := WareIndexToType[aWareType];
  -  if (aHouseID > 0) and (Res in [WARE_MIN..WARE_MAX]) then
  -  begin
  +  if (aHouseID > 0) and (aWareType in [Low(WareIndexToType)..High(WareIndexToType)]) then
  +  begin
  +    Res := WareIndexToType[aWareType];
       H := fIDCache.GetHouse(aHouseID);
       if (H is TKMHouseStore) then
         Result := TKMHouseStore(H).NotAcceptFlag[Res];
  
positive.code:   I: Integer;
  begin
    Result := 0;
    Res := WareIndexToType[aWareType];
    if (aHouseID > 0) and (Res in [WARE_MIN..WARE_MAX]) then
    begin
      H := fIDCache.GetHouse(aHouseID);
      if (H <> nil) then
        for I := 1 to 4 do
  
negative.code: 
  
  function TKMScriptStates.HouseTypeToOccupantType(aHouseType: Integer): Integer;
  begin
    Result := -1;
    if aHouseType in [Low(HouseIndexToType)..High(HouseIndexToType)] then
  