anchor.diff:    Result := not (ResOutput[1] in [rt_None,rt_All,rt_Warfare]); //Exclude aggregate types
   end;
   
  +
   function TKMHouseDatClass.GetResInput: THouseRes;
   begin
     Result := HouseInput_[HouseKaMOrder[fHouseType]];
   end;
   
  +
   function TKMHouseDatClass.GetResOutput: THouseRes;
   begin
     Result := HouseOutput_[HouseKaMOrder[fHouseType]];
   end;
   
  +
   function TKMHouseDatClass.GetTabletIcon: word;
   begin
  -  Result := TabletBuildIcons_[HouseKaMOrder[fHouseType]];
  -end;
  +  Result := HouseInfo[fHouseType].TabletIcon;
  +end;
  +
   
   function TKMHouseDatClass.IsValid: boolean;
   begin
  
positive.code:   Result := not (ResInput[1] in [rt_None,rt_All,rt_Warfare]); //Exclude aggregate types
  end;
  
  function TKMHouseDatClass.GetArea: THouseArea;
  begin
    Result := HousePlanYX[fHouseType];
  end;
  
  
  function TKMHouseDatClass.GetDoesOrders: boolean;
  begin
    Result := HouseDoesOrders[fHouseType]<>0;
  end;
  
  
  function TKMHouseDatClass.GetGUIIcon: word;
  begin
    Result := GUIBuildIcons_[HouseKaMOrder[fHouseType]];
  end;
  
  
  
negative.code: type
    THouseInfo = record
      PlanYX:THouseArea;
      DoesOrders:byte; //Does house output needs to be ordered by Player or it's producing by itself
      BuildIcon:word;  //Icon in GUI
      TabletIcon:word; //House area WIP tablet
      Input:THouseRes;
      Output:THouseRes;
    end;
  
  const
    HouseInfo:array[THouseType] of THouseInfo = (
      (
      PlanYX: ((0,0,0,0), (0,0,0,0), (0,0,0,0), (0,0,0,0)); DoesOrders:0; BuildIcon:  0; TabletIcon:  0), //0
      (PlanYX:((0,0,0,0), (0,0,0,0), (0,0,0,0), (0,0,0,0)); DoesOrders:0; BuildIcon:  0; TabletIcon:  0), //0
      (PlanYX:((0,0,0,0), (0,1,1,0), (1,1,1,1), (1,2,1,1)); DoesOrders:1; BuildIcon:311; TabletIcon:261), //Armor smithy
      (PlanYX:((0,0,0,0), (0,1,1,0), (0,1,1,1), (0,2,1,1)); DoesOrders:1; BuildIcon:321; TabletIcon:271), //Armor workshop
      (PlanYX:((0,0,0,0), (0,1,1,1), (0,1,1,1), (0,1,1,2)); DoesOrders:0; BuildIcon:325; TabletIcon:275), //Bakery
      (PlanYX:((1,1,1,1), (1,1,1,1), (1,1,1,1), (1,2,1,1)); DoesOrders:0; BuildIcon:322; TabletIcon:272), //Barracks
      (PlanYX:((0,0,0,0), (0,1,1,0), (0,1,1,1), (0,1,1,2)); DoesOrders:0; BuildIcon:308; TabletIcon:258), //Butchers
      (PlanYX:((0,0,0,0), (0,0,0,0), (1,1,1,0), (1,2,1,0)); DoesOrders:0; BuildIcon:304; TabletIcon:254), //Coal mine
      (PlanYX:((0,0,0,0), (1,1,1,1), (1,1,1,1), (1,2,1,1)); DoesOrders:0; BuildIcon:309; TabletIcon:259), //Farm
      (PlanYX:((0,0,0,0), (0,0,0,0), (0,1,1,0), (0,2,1,1)); DoesOrders:0; BuildIcon:307; TabletIcon:257), //Fisher hut
      (PlanYX:((0,0,0,0), (0,0,0,0), (0,0,0,0), (0,1,2,0)); DoesOrders:0; BuildIcon:306; TabletIcon:256), //Gold mine
      (PlanYX:((0,0,0,0), (0,1,1,1), (1,1,1,1), (1,2,1,1)); DoesOrders:0; BuildIcon:328; TabletIcon:278), //Inn
      (PlanYX:((0,0,0,0), (0,0,0,0), (0,0,0,0), (0,1,2,1)); DoesOrders:0; BuildIcon:305; TabletIcon:255), //Iron mine
      (PlanYX:((0,0,0,0), (0,0,0,0), (1,1,1,1), (1,1,2,1)); DoesOrders:0; BuildIcon:302; TabletIcon:252), //Iron smithy
      (PlanYX:((0,0,0,0), (1,1,1,0), (1,1,1,0), (1,2,1,0)); DoesOrders:0; BuildIcon:316; TabletIcon:266), //Metallurgist
      (PlanYX:((0,0,0,0), (0,0,0,0), (0,1,1,1), (0,1,2,1)); DoesOrders:0; BuildIcon:323; TabletIcon:273), //Mill
      (PlanYX:((0,0,0,0), (0,0,0,0), (0,1,1,1), (0,1,2,1)); DoesOrders:0; BuildIcon:315; TabletIcon:265), //Quarry
      (PlanYX:((0,0,0,0), (0,0,0,0), (1,1,1,1), (1,2,1,1)); DoesOrders:0; BuildIcon:301; TabletIcon:251), //Sawmill
      (PlanYX:((0,0,0,0), (1,1,1,0), (1,1,1,0), (1,2,1,0)); DoesOrders:0; BuildIcon:314; TabletIcon:264), //School
      (PlanYX:((0,0,0,0), (0,0,0,0), (0,1,1,1), (0,2,1,1)); DoesOrders:1; BuildIcon:324; TabletIcon:274), //Siege workshop
      (PlanYX:((0,0,0,0), (1,1,1,1), (1,1,1,1), (1,1,2,1)); DoesOrders:0; BuildIcon:313; TabletIcon:263), //Stables
      (PlanYX:((0,0,0,0), (1,1,1,0), (1,1,1,0), (1,2,1,0)); DoesOrders:0; BuildIcon:312; TabletIcon:262), //Store
      (PlanYX:((0,0,0,0), (0,1,1,1), (1,1,1,1), (1,1,1,2)); DoesOrders:0; BuildIcon:317; TabletIcon:267), //Swine
      (PlanYX:((0,0,0,0), (0,0,0,0), (0,1,1,1), (0,1,2,1)); DoesOrders:0; BuildIcon:326; TabletIcon:276), //Tannery
      (PlanYX:((0,0,0,0), (1,1,1,1), (1,1,1,1), (1,2,1,1)); DoesOrders:0; BuildIcon:319; TabletIcon:269), //Town hall
      (PlanYX:((0,0,0,0), (0,0,0,0), (0,1,1,0), (0,1,2,0)); DoesOrders:0; BuildIcon:318; TabletIcon:268), //Watch tower
      (PlanYX:((0,0,0,0), (0,0,0,0), (1,1,1,1), (1,2,1,1)); DoesOrders:1; BuildIcon:303; TabletIcon:253), //Weapon smithy
      (PlanYX:((0,0,0,0), (0,0,0,0), (1,1,1,1), (1,2,1,1)); DoesOrders:1; BuildIcon:320; TabletIcon:270), //Weapon workshop
      (PlanYX:((0,0,0,0), (0,0,0,0), (0,1,1,1), (0,1,1,2)); DoesOrders:0; BuildIcon:329; TabletIcon:279), //Wineyard
      (PlanYX:((0,0,0,0), (0,0,0,0), (1,1,1,0), (1,1,2,0)); DoesOrders:0; BuildIcon:310; TabletIcon:260)  //Woodcutter
      );
  
  
    //Building of certain house allows player to build following houses,
    //unless they are blocked in mission script of course
  