<?xml version="1.0" encoding="utf-8" ?>
<Defs>

  <ThingDef ParentName="BuildingBase">
    <defName>CraftingSpot</defName>
    <label>crafting spot</label>
    <description>A place for crafting simple things like shivs or bows.</description>
    <thingClass>Building_WorkTable</thingClass>
    <graphicData>
      <texPath>Things/Building/Production/CraftingSpot</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>(1,1)</drawSize>
    </graphicData>
    <altitudeLayer>FloorEmplacement</altitudeLayer>
    <statBases>
      <WorkToBuild>0</WorkToBuild>
    </statBases>
		<scatterableOnMapGen>false</scatterableOnMapGen>
		<useHitPoints>False</useHitPoints>
    <size>(1,1)</size>
    <designationCategory>Production</designationCategory>
    <passability>Standable</passability>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
      <sowTag>SupportPlantsOnly</sowTag>
      <canPlaceOverImpassablePlant>false</canPlaceOverImpassablePlant>
      <ai_chillDestination>false</ai_chillDestination>
    </building>
    <comps>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>ToolCabinet</li>
        </linkableFacilities>
      </li>
    </comps>
    <designationHotKey>Misc1</designationHotKey>
		<placeWorkers>
			<li>PlaceWorker_ShowFacilitiesConnections</li>
		</placeWorkers>
  </ThingDef>

  <!-- ========================= Work tables ==========================-->

  <ThingDef Name="BenchBase" ParentName="BuildingBase" Abstract="True">
    <castEdgeShadows>true</castEdgeShadows>
    <staticSunShadowHeight>0.20</staticSunShadowHeight>
    <canOverlapZones>false</canOverlapZones>
		<building>
			<workSpeedPenaltyOutdoors>true</workSpeedPenaltyOutdoors>
			<workSpeedPenaltyTemperature>true</workSpeedPenaltyTemperature>
		</building>
		<comps>
			<li>
				<compClass>CompReportWorkSpeed</compClass>
			</li>
		</comps>
		<placeWorkers>
			<li>PlaceWorker_ReportWorkSpeedPenalties</li>
		</placeWorkers>
  </ThingDef>

  <ThingDef ParentName="BenchBase">
    <defName>TableSculpting</defName>
    <label>sculptor's table</label>
    <thingClass>Building_WorkTable</thingClass>
    <description>A workbench equipped for artistic sculpting.</description>
    <graphicData>
      <texPath>Things/Building/Production/TableSculpting</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(3.5,1.5)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <costList>
      <Steel>50</Steel>
    </costList>
    <stuffCategories>
      <li>Metallic</li>
      <li>Woody</li>
    </stuffCategories>
    <costStuffCount>75</costStuffCount>
    <altitudeLayer>Building</altitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToBuild>2500</WorkToBuild>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <Cleanliness>-5</Cleanliness>
    </statBases>
    <size>(3,1)</size>
    <designationCategory>Production</designationCategory>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
    </building>
    <comps>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>ToolCabinet</li>
        </linkableFacilities>
      </li>
    </comps>
    <designationHotKey>Misc2</designationHotKey>
    <placeWorkers>
      <li>PlaceWorker_ShowFacilitiesConnections</li>
    </placeWorkers>
  </ThingDef>

  <ThingDef ParentName="BenchBase">
    <defName>TableButcher</defName>
    <label>butcher table</label>
    <thingClass>Building_WorkTable</thingClass>
    <description>A heavy table for butchering dead creatures into pieces of raw meat.</description>
    <graphicData>
      <texPath>Things/Building/Production/TableButcher</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(3.5,1.5)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <costStuffCount>75</costStuffCount>
    <costList>
      <WoodLog>20</WoodLog>
    </costList>
    <stuffCategories>
      <li>Metallic</li>
      <li>Woody</li>
    </stuffCategories>
    <altitudeLayer>Building</altitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToBuild>2000</WorkToBuild>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <Cleanliness>-15</Cleanliness>
    </statBases>
    <size>(3,1)</size>
    <designationCategory>Production</designationCategory>
    <passability>PassThroughOnly</passability>
    <pathCost>60</pathCost>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <recipes>
      <li>ButcherCorpseFlesh</li>
      <li>MakeKibble</li>
    </recipes>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
		</building>
    <comps>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>ToolCabinet</li>
        </linkableFacilities>
      </li>
    </comps>
    <designationHotKey>Misc3</designationHotKey>
		<placeWorkers>
			<li>PlaceWorker_ShowFacilitiesConnections</li>
		</placeWorkers>
  </ThingDef>

  <ThingDef ParentName="BenchBase">
    <defName>HandTailoringBench</defName>
    <label>hand tailor bench</label>
    <thingClass>Building_WorkTable</thingClass>
    <description>A workbench for tailoring clothes by hand. Works at 50% of the speed of an electric tailoring bench.</description>
    <graphicData>
      <texPath>Things/Building/Production/TableTailorHand</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(3.5,1.5)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <costStuffCount>75</costStuffCount>
    <stuffCategories>
      <li>Metallic</li>
      <li>Woody</li>
    </stuffCategories>
    <altitudeLayer>Building</altitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToBuild>2000</WorkToBuild>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <WorkTableWorkSpeedFactor>0.5</WorkTableWorkSpeedFactor>
    </statBases>
    <size>(3,1)</size>
    <designationCategory>Production</designationCategory>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
		</building>
    <comps>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>ToolCabinet</li>
        </linkableFacilities>
      </li>
    </comps>
		<placeWorkers>
			<li>PlaceWorker_ShowFacilitiesConnections</li>
		</placeWorkers>
    <researchPrerequisites>
      <li>ComplexClothing</li>
    </researchPrerequisites>
  </ThingDef>

  <ThingDef ParentName="BenchBase">
    <defName>ElectricTailoringBench</defName>
    <label>electric tailor bench</label>
    <thingClass>Building_WorkTable</thingClass>
    <description>A workbench with a sewing machine for rapid tailoring of clothes. Can work without electricity at 40% of normal speed.</description>
    <graphicData>
      <texPath>Things/Building/Production/TableTailorElectric</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(3.5,1.5)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <costStuffCount>75</costStuffCount>
    <costList>
      <Steel>50</Steel>
      <Component>3</Component>
    </costList>
    <stuffCategories>
      <li>Metallic</li>
      <li>Woody</li>
    </stuffCategories>
    <altitudeLayer>Building</altitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToBuild>2500</WorkToBuild>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
    </statBases>
    <size>(3,1)</size>
    <designationCategory>Production</designationCategory>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
      <unpoweredWorkTableWorkSpeedFactor>0.5</unpoweredWorkTableWorkSpeedFactor>
		</building>
    <comps>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <startElectricalFires>true</startElectricalFires>
        <basePowerConsumption>120</basePowerConsumption>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>ToolCabinet</li>
        </linkableFacilities>
      </li>
      <li Class="CompProperties_Breakdownable"/>
    </comps>
    <placeWorkers>
      <li>PlaceWorker_ShowFacilitiesConnections</li>
    </placeWorkers>
    <researchPrerequisites>
      <li>ComplexClothing</li>
      <li>Electricity</li>
    </researchPrerequisites>
  </ThingDef>

  <ThingDef ParentName="BenchBase">
    <defName>FueledSmithy</defName>
    <label>fueled smithy</label>
    <thingClass>Building_WorkTable</thingClass>
    <description>A wood-fueled station equipped for smithing non-mechanical weapons and tools.</description>
    <graphicData>
      <texPath>Things/Building/Production/TableSmithingFueled</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(3.5,1.5)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <costList>
      <Steel>100</Steel>
    </costList>
    <constructEffect>ConstructWood</constructEffect>
    <altitudeLayer>Building</altitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToBuild>3000</WorkToBuild>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <Cleanliness>-3</Cleanliness>
    </statBases>
    <size>(3,1)</size>
    <designationCategory>Production</designationCategory>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
		</building>
    <comps>
      <li Class="CompProperties_Refuelable">
        <fuelConsumptionRate>80.0</fuelConsumptionRate>
        <fuelCapacity>50.0</fuelCapacity>
        <fuelFilter>
          <thingDefs>
            <li>WoodLog</li>
          </thingDefs>
        </fuelFilter>
        <consumeFuelOnlyWhenUsed>true</consumeFuelOnlyWhenUsed>
      </li>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>ToolCabinet</li>
        </linkableFacilities>
      </li>
    </comps>
    <placeWorkers>
      <li>PlaceWorker_ShowFacilitiesConnections</li>
    </placeWorkers>
    <researchPrerequisites>
      <li>Smithing</li>
    </researchPrerequisites>
  </ThingDef>

  <ThingDef ParentName="BenchBase">
    <defName>ElectricSmithy</defName>
    <label>electric smithy</label>
    <thingClass>Building_WorkTable</thingClass>
    <description>An electric-powered station equipped for smithing non-mechanical weapons and tools.</description>
    <graphicData>
      <texPath>Things/Building/Production/TableSmithingElectric</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(3.5,1.5)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <costList>
      <Steel>100</Steel>
      <Component>4</Component>
    </costList>
    <constructEffect>ConstructWood</constructEffect>
    <altitudeLayer>Building</altitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToBuild>3000</WorkToBuild>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <Cleanliness>-3</Cleanliness>
    </statBases>
    <size>(3,1)</size>
    <designationCategory>Production</designationCategory>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
    </building>
    <comps>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <startElectricalFires>true</startElectricalFires>
        <basePowerConsumption>210</basePowerConsumption>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>ToolCabinet</li>
        </linkableFacilities>
      </li>
    </comps>
		<placeWorkers>
			<li>PlaceWorker_ShowFacilitiesConnections</li>
		</placeWorkers>
    <researchPrerequisites>
      <li>Smithing</li>
      <li>ElectricSmelting</li>
    </researchPrerequisites>
  </ThingDef>

  <ThingDef ParentName="BenchBase">
    <defName>TableMachining</defName>
    <label>machining table</label>
    <thingClass>Building_WorkTable</thingClass>
    <description>A work station for assembling and disassembling machinery such as guns or mechanoid corpses.</description>
    <graphicData>
      <texPath>Things/Building/Production/TableMachining</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(3.5,1.5)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <costList>
      <Steel>150</Steel>
      <Component>5</Component>
    </costList>
    <altitudeLayer>Building</altitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToBuild>3000</WorkToBuild>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <Cleanliness>-2</Cleanliness>
    </statBases>
    <size>(3,1)</size>
    <designationCategory>Production</designationCategory>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <recipes>
      <li>ButcherCorpseMechanoid</li>
    </recipes>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <comps>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <startElectricalFires>true</startElectricalFires>
        <basePowerConsumption>350</basePowerConsumption>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_Glower">
        <glowRadius>5</glowRadius>
        <glowColor>(73,123,138,0)</glowColor>
      </li>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>ToolCabinet</li>
        </linkableFacilities>
      </li>
      <li Class="CompProperties_Breakdownable"/>
    </comps>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
    </building>
    <constructEffect>ConstructMetal</constructEffect>
    <researchPrerequisites><li>Machining</li></researchPrerequisites>
    <designationHotKey>Misc7</designationHotKey>
		<placeWorkers>
			<li>PlaceWorker_ShowFacilitiesConnections</li>
		</placeWorkers>
  </ThingDef>

  <ThingDef ParentName="BenchBase">
    <defName>ElectricStove</defName>
    <label>electric stove</label>
    <thingClass>Building_WorkTable_HeatPush</thingClass>
    <description>An electrically-powered stove with an attached countertop for preparing meals.</description>
    <graphicData>
      <texPath>Things/Building/Production/TableStoveElectric</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(3.5,1.5)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <constructEffect>ConstructMetal</constructEffect>
    <costList>
      <Steel>80</Steel>
      <Component>2</Component>
    </costList>
    <altitudeLayer>Building</altitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToBuild>2000</WorkToBuild>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
    </statBases>
    <size>(3,1)</size>
    <designationCategory>Production</designationCategory>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <recipes>
      <li>CookMealSimple</li>
      <li>CookMealFine</li>
      <li>CookMealLavish</li>
      <li>CookMealSurvival</li>
      <li>MakePemmican</li>
    </recipes>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <comps>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <startElectricalFires>true</startElectricalFires>
        <basePowerConsumption>350</basePowerConsumption>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_Breakdownable"/>
    </comps>
    <building>
      <isMealSource>true</isMealSource>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
      <heatPerTickWhileWorking>0.10</heatPerTickWhileWorking>
    </building>
    <designationHotKey>Misc8</designationHotKey>
    <researchPrerequisites>
      <li>Electricity</li>
    </researchPrerequisites>
  </ThingDef>

  <ThingDef ParentName="BenchBase">
    <defName>FueledStove</defName>
    <label>fueled stove</label>
    <thingClass>Building_WorkTable_HeatPush</thingClass>
    <description>A simple wood-fueled stove with an attached countertop for preparing meals.</description>
    <graphicData>
      <texPath>Things/Building/Production/TableStoveFueled</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(3.5,1.5)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <constructEffect>ConstructMetal</constructEffect>
    <costList>
      <Steel>80</Steel>
    </costList>
    <altitudeLayer>Building</altitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToBuild>2000</WorkToBuild>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
    </statBases>
    <size>(3,1)</size>
    <designationCategory>Production</designationCategory>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <recipes>
      <li>CookMealSimple</li>
      <li>CookMealFine</li>
      <li>CookMealLavish</li>
      <li>CookMealSurvival</li>
      <li>MakePemmican</li>
    </recipes>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <comps>
      <li Class="CompProperties_Refuelable">
        <fuelConsumptionRate>160.0</fuelConsumptionRate>
        <fuelCapacity>50.0</fuelCapacity>
        <fuelFilter>
          <thingDefs>
            <li>WoodLog</li>
          </thingDefs>
        </fuelFilter>
        <consumeFuelOnlyWhenUsed>true</consumeFuelOnlyWhenUsed>
      </li>
    </comps>
    <building>
      <isMealSource>true</isMealSource>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
      <heatPerTickWhileWorking>0.10</heatPerTickWhileWorking>
    </building>
  </ThingDef>

  <ThingDef ParentName="BenchBase">
    <defName>TableStonecutter</defName>
    <label>stonecutter's table</label>
    <thingClass>Building_WorkTable_HeatPush</thingClass>
    <description>A work table equipped to cut rough stone into usable blocks.</description>
    <graphicData>
      <texPath>Things/Building/Production/TableStonecutter</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(3.5,1.5)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <costStuffCount>75</costStuffCount>
    <costList>
      <Steel>30</Steel>
    </costList>
    <stuffCategories>
      <li>Metallic</li>
      <li>Woody</li>
    </stuffCategories>
    <altitudeLayer>Building</altitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToBuild>2000</WorkToBuild>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <Cleanliness>-5</Cleanliness>
    </statBases>
    <size>(3,1)</size>
    <designationCategory>Production</designationCategory>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
    </building>
    <comps>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>ToolCabinet</li>
        </linkableFacilities>
      </li>
    </comps>
    <researchPrerequisites><li>Stonecutting</li></researchPrerequisites>
    <designationHotKey>Misc9</designationHotKey>
		<placeWorkers>
			<li>PlaceWorker_ShowFacilitiesConnections</li>
		</placeWorkers>
  </ThingDef>

  <ThingDef ParentName="BenchBase">
    <defName>Brewery</defName>
    <label>brewery</label>
    <thingClass>Building_WorkTable</thingClass>
    <description>A work station with all the equipment needed to brew beer.</description>
    <graphicData>
      <texPath>Things/Building/Production/TableBrewery</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(3.5,1.5)</drawSize>
      <damageData>
        <rect>(0.3,0,2.7,1)</rect>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <constructEffect>ConstructWood</constructEffect>
    <costList>
      <WoodLog>120</WoodLog>
      <Steel>30</Steel>
    </costList>
    <altitudeLayer>Building</altitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToBuild>2000</WorkToBuild>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
    </statBases>
    <size>(3,1)</size>
    <designationCategory>Production</designationCategory>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <recipes>
      <li>MakeWort</li>
    </recipes>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
    </building>
    <researchPrerequisites><li>Brewing</li></researchPrerequisites>
  </ThingDef>
  
  <ThingDef ParentName="BenchBase">
    <defName>DrugLab</defName>
    <label>drug lab</label>
    <thingClass>Building_WorkTable</thingClass>
    <description>A work bench equipped with various containers, heaters, and measurement equipment for producing a variety of drugs.</description>
    <graphicData>
      <texPath>Things/Building/Production/TableDrugLab</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <shaderType>CutoutComplex</shaderType>
      <drawSize>(3.5,1.5)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <costStuffCount>50</costStuffCount>
    <stuffCategories>
      <li>Metallic</li>
      <li>Woody</li>
    </stuffCategories>
    <costList>
      <Steel>75</Steel>
      <Component>8</Component>
    </costList>
    <altitudeLayer>Building</altitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToBuild>3500</WorkToBuild>
      <MaxHitPoints>120</MaxHitPoints>
      <Flammability>1.0</Flammability>
    </statBases>
    <size>(3,1)</size>
    <designationCategory>Production</designationCategory>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
    </building>
    <comps>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>ToolCabinet</li>
        </linkableFacilities>
      </li>
    </comps>
		<placeWorkers>
			<li>PlaceWorker_ShowFacilitiesConnections</li>
		</placeWorkers>
    <researchPrerequisites>
      <li>DrugProduction</li>
    </researchPrerequisites>
  </ThingDef>
  
  <ThingDef ParentName="BenchBase">
    <defName>ElectricSmelter</defName>
    <label>electric smelter</label>
    <thingClass>Building_WorkTable_HeatPush</thingClass>
    <description>Extracts usable metal from slag chunks and other mixed metal items. Consumes a lot of power.</description>
    <graphicData>
      <texPath>Things/Building/Production/ElectricSmelter</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(3.5,1.5)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <constructEffect>ConstructMetal</constructEffect>
    <costList>
      <Steel>170</Steel>
      <Component>2</Component>
    </costList>
    <altitudeLayer>Building</altitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToBuild>3500</WorkToBuild>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
    </statBases>
    <size>(3,1)</size>
    <designationCategory>Production</designationCategory>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <recipes>
      <li>ExtractMetalFromSlag</li>
      <li>SmeltWeapon</li>
			<li>DestroyWeapon</li>
    </recipes>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <comps>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>700</basePowerConsumption>
        <startElectricalFires>true</startElectricalFires>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_Glower">
        <glowRadius>6</glowRadius>
        <glowColor>(217,112,33,0)</glowColor>
      </li>
      <li Class="CompProperties_HeatPusher">
        <compClass>CompHeatPusherPowered</compClass>
        <heatPerSecond>12</heatPerSecond>
      </li>
      <li Class="CompProperties_Breakdownable"/>
    </comps>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
      <heatPerTickWhileWorking>0.32</heatPerTickWhileWorking>
    </building>
    <researchPrerequisites><li>ElectricSmelting</li></researchPrerequisites>
    <designationHotKey>Misc10</designationHotKey>
  </ThingDef>

	<ThingDef ParentName="BenchBase">
		<defName>Refinery</defName>
		<label>refinery</label>
		<description>A chemical refining plant. Used to refine wood into chemfuel.</description>
		<thingClass>Building_WorkTable</thingClass>
		<altitudeLayer>Building</altitudeLayer>
		<passability>PassThroughOnly</passability>
		<pathCost>70</pathCost>
		<statBases>
			<MaxHitPoints>200</MaxHitPoints>
			<WorkToBuild>2000</WorkToBuild>
			<Flammability>1.0</Flammability>
		</statBases>
		<size>(3,2)</size>
		<costList>
			<Steel>150</Steel>
			<Component>3</Component>
		</costList>
		<comps>
			<li Class="CompProperties_Power">
				<compClass>CompPowerTrader</compClass>
				<basePowerConsumption>170</basePowerConsumption>
				<startElectricalFires>true</startElectricalFires>
			</li>
			<li Class="CompProperties_Flickable"/>
			<li Class="CompProperties_Breakdownable"/>
		</comps>
		<recipes>
			<li>MakeChemfuelFromWood</li>
			<li>MakeChemfuelFromOrganics</li>
		</recipes>
		<castEdgeShadows>false</castEdgeShadows>
		<staticSunShadowHeight>0</staticSunShadowHeight>
		<graphicData>
			<texPath>Things/Building/Production/Refinery</texPath>
			<graphicClass>Graphic_Single</graphicClass>
			<shaderType>CutoutComplex</shaderType>
			<drawSize>(3,2)</drawSize>
			<shadowData>
				<volume>(2.7,1,1.8)</volume>
			</shadowData>
			<damageData>
				<rect>(0.3,0.1,2.4,1.8)</rect>
			</damageData>
		</graphicData>
		<inspectorTabs>
			<li>ITab_Bills</li>
		</inspectorTabs>
		<building>
			<spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
		</building>
		<fillPercent>0.5</fillPercent>
		<interactionCellOffset>(0,0,-1)</interactionCellOffset>
		<hasInteractionCell>true</hasInteractionCell>
		<terrainAffordanceNeeded>Heavy</terrainAffordanceNeeded>
		<designationCategory>Production</designationCategory>
		<surfaceType>Item</surfaceType>
		<researchPrerequisites>
			<li>Refining</li>
		</researchPrerequisites>
	</ThingDef>

	<ThingDef ParentName="BenchBase">
    <defName>ComponentAssemblyBench</defName>
    <label>component assembly bench</label>
    <description>A workbench equipped with advanced tools for producing components from simpler materials.</description>
    <thingClass>Building_WorkTable</thingClass>
    <altitudeLayer>Building</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <statBases>
      <MaxHitPoints>300</MaxHitPoints>
      <WorkToBuild>5000</WorkToBuild>
      <Flammability>1.0</Flammability>
    </statBases>
    <size>(5,2)</size>
    <costList>
      <Steel>200</Steel>
      <Component>14</Component>
    </costList>
    <comps>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>ToolCabinet</li>
        </linkableFacilities>
      </li>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>250</basePowerConsumption>
        <startElectricalFires>true</startElectricalFires>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_Breakdownable"/>
    </comps>
    <recipes>
      <li>MakeComponent</li>
      <li>MakeAdvancedComponent</li>
    </recipes>
    <graphicData>
      <texPath>Things/Building/Production/ComponentAssemblyBench</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <shaderType>CutoutComplex</shaderType>
      <drawSize>(7,4)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
    </building>
    <fillPercent>0.5</fillPercent>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <hasInteractionCell>true</hasInteractionCell>
    <terrainAffordanceNeeded>Heavy</terrainAffordanceNeeded>
    <designationCategory>Production</designationCategory>
    <surfaceType>Item</surfaceType>
    <designationHotKey>Misc12</designationHotKey>
    <placeWorkers>
      <li>PlaceWorker_ShowFacilitiesConnections</li>
    </placeWorkers>
    <researchPrerequisites>
      <li>ComponentAssembly</li>
    </researchPrerequisites>
  </ThingDef>

  <!-- ========== Non-standard work buildings ==============-->

  <ThingDef ParentName="BenchBase">
    <defName>SimpleResearchBench</defName>
    <label>simple research bench</label>
    <description>A simple bench with writing implements and low-tech scientific tools. Researchers work here to discover new things.</description>
    <thingClass>Building_ResearchBench</thingClass>
    <size>(3,2)</size>
    <stuffCategories>
      <li>Metallic</li>
      <li>Woody</li>
      <li>Stony</li>
    </stuffCategories>
    <costStuffCount>75</costStuffCount>
    <costList>
      <Steel>25</Steel>
    </costList>
    <graphicData>
      <texPath>Things/Building/Production/ResearchBenchSimple</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <shaderType>CutoutComplex</shaderType>
      <drawSize>(5,4)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <altitudeLayer>Building</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <statBases>
      <MaxHitPoints>250</MaxHitPoints>
      <WorkToBuild>2800</WorkToBuild>
      <Flammability>1.0</Flammability>
      <ResearchSpeedFactor>0.6</ResearchSpeedFactor>
    </statBases>
    <fillPercent>0.5</fillPercent>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <hasInteractionCell>true</hasInteractionCell>
    <terrainAffordanceNeeded>Heavy</terrainAffordanceNeeded>
    <designationCategory>Production</designationCategory>
    <surfaceType>Item</surfaceType>
  </ThingDef>
  
  <ThingDef ParentName="BenchBase">
    <defName>HiTechResearchBench</defName>
    <label>hi-tech research bench</label>
    <description>A high-tech bench with computers and electronic measurement equipment. Research is sped up by the high-tech tools. Requires power.</description>
    <thingClass>Building_ResearchBench</thingClass>
    <size>(5,2)</size>
    <stuffCategories>
      <li>Metallic</li>
    </stuffCategories>
    <costStuffCount>150</costStuffCount>
    <costList>
      <Steel>100</Steel>
      <Component>10</Component>
    </costList>
    <graphicData>
      <texPath>Things/Building/Production/ResearchBenchHiTech</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <shaderType>CutoutComplex</shaderType>
      <drawSize>(7,4)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <altitudeLayer>Building</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <statBases>
      <MaxHitPoints>250</MaxHitPoints>
      <WorkToBuild>5000</WorkToBuild>
      <Flammability>1.0</Flammability>
      <ResearchSpeedFactor>1.0</ResearchSpeedFactor>
    </statBases>
    <comps>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>250</basePowerConsumption>
        <startElectricalFires>true</startElectricalFires>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>MultiAnalyzer</li>
        </linkableFacilities>
      </li>
    </comps>
    <fillPercent>0.5</fillPercent>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <hasInteractionCell>true</hasInteractionCell>
    <terrainAffordanceNeeded>Heavy</terrainAffordanceNeeded>
    <designationCategory>Production</designationCategory>
    <surfaceType>Item</surfaceType>
    <designationHotKey>Misc4</designationHotKey>
		<placeWorkers>
			<li>PlaceWorker_ShowFacilitiesConnections</li>
		</placeWorkers>
    <researchPrerequisites>
      <li>MicroelectronicsBasics</li>
    </researchPrerequisites>
  </ThingDef>

  <ThingDef ParentName="BuildingBase">
    <defName>ElectricCrematorium</defName>
    <label>electric crematorium</label>
    <thingClass>Building_WorkTable_HeatPush</thingClass>
    <description>Cremates corpses. Electrically-powered.</description>
    <graphicData>
      <texPath>Things/Building/Production/Crematorium</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <shaderType>CutoutComplex</shaderType>
      <drawSize>(3,2)</drawSize>
      <shadowData>
        <volume>(2.7,1,1.8)</volume>
      </shadowData>
      <damageData>
        <rect>(0.3,0.1,2.4,1.8)</rect>
      </damageData>
    </graphicData>
    <stuffCategories>
      <li>Stony</li>
    </stuffCategories>
    <costStuffCount>150</costStuffCount>
    <costList>
      <Steel>20</Steel>
      <Component>2</Component>
    </costList>
    <altitudeLayer>Building</altitudeLayer>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToBuild>4500</WorkToBuild>
      <MaxHitPoints>300</MaxHitPoints>
      <Flammability>0</Flammability>
      <Cleanliness>-20</Cleanliness>
    </statBases>
    <size>(3,2)</size>
    <designationCategory>Production</designationCategory>
    <fillPercent>1</fillPercent>
    <passability>Impassable</passability>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <canOverlapZones>false</canOverlapZones>
    <recipes>
      <li>CremateCorpse</li>
      <li>BurnApparel</li>
      <li>BurnDrugs</li>
    </recipes>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <comps>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>250</basePowerConsumption>
        <startElectricalFires>true</startElectricalFires>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_Glower">
        <glowRadius>6</glowRadius>
        <glowColor>(217,112,33,0)</glowColor>
      </li>
      <li Class="CompProperties_HeatPusher">
        <compClass>CompHeatPusherPowered</compClass>
        <heatPerSecond>15</heatPerSecond>
      </li>
    </comps>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
      <heatPerTickWhileWorking>0.32</heatPerTickWhileWorking>
    </building>
    <researchPrerequisites><li>ElectricCremation</li></researchPrerequisites>
    <designationHotKey>Misc5</designationHotKey>
  </ThingDef>

  <ThingDef ParentName="BuildingBase">
    <defName>HydroponicsBasin</defName>
    <label>hydroponics basin</label>
    <description>Grows plants quickly in an artificial nutrient bath. Requires power to work; plants will die if power is cut.</description>
    <thingClass>Building_PlantGrower</thingClass>
    <graphicData>
      <texPath>Things/Building/Production/HydroponicsBasin</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>(1,4)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <altitudeLayer>FloorEmplacement</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <pathCost>60</pathCost>
    <castEdgeShadows>true</castEdgeShadows>
    <constructEffect>ConstructMetal</constructEffect>
    <fillPercent>0.30</fillPercent>
    <canOverlapZones>false</canOverlapZones>
    <statBases>
      <WorkToBuild>2800</WorkToBuild>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <Cleanliness>-3</Cleanliness>
    </statBases>
    <size>(1,4)</size>
    <costList>
      <Steel>100</Steel>
      <Component>1</Component>
    </costList>
    <fertility>2.3</fertility>
    <building>
      <defaultPlantToGrow>PlantPotato</defaultPlantToGrow>
      <sowTag>Hydroponic</sowTag>
    </building>
    <tickerType>Rare</tickerType>
    <comps>
      <li Class="CompProperties_Forbiddable"/>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>70</basePowerConsumption>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_Breakdownable"/>
    </comps>
    <researchPrerequisites><li>Hydroponics</li></researchPrerequisites>
    <terrainAffordanceNeeded>Heavy</terrainAffordanceNeeded>
    <designationCategory>Production</designationCategory>
  </ThingDef>

  <ThingDef ParentName="BuildingBase">
    <defName>FermentingBarrel</defName>
    <label>fermenting barrel</label>
    <thingClass>Building_FermentingBarrel</thingClass>
    <graphicData>
      <texPath>Things/Building/Production/FermentingBarrel</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <damageData>
        <rect>(0.05,0.1,0.9,0.9)</rect>
      </damageData>
    </graphicData>
    <minifiedDef>MinifiedFurniture</minifiedDef>
    <altitudeLayer>Building</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <fillPercent>0.45</fillPercent>
    <pathCost>60</pathCost>
    <statBases>
      <WorkToBuild>600</WorkToBuild>
      <Mass>10</Mass>
      <MaxHitPoints>100</MaxHitPoints>
      <Flammability>1.0</Flammability>
    </statBases>
    <description>A barrel for fermenting raw wort into beer.</description>
    <costList>
      <Steel>10</Steel>
      <WoodLog>30</WoodLog>
    </costList>
		<comps>
			<li Class="CompProperties_TemperatureRuinable">
				<minSafeTemperature>-1</minSafeTemperature>
				<maxSafeTemperature>32</maxSafeTemperature>
				<progressPerDegreePerTick>0.00001</progressPerDegreePerTick>
			</li>
		</comps>
    <tickerType>Rare</tickerType>
    <rotatable>true</rotatable>
    <designationCategory>Production</designationCategory>
    <constructEffect>ConstructWood</constructEffect>
    <researchPrerequisites><li>Brewing</li></researchPrerequisites>
  </ThingDef>

  <ThingDef ParentName="BuildingBase">
    <defName>DeepDrill</defName>
    <label>deep drill</label>
    <description>A deep-crust drilling rig for extracting minerals from deep under the surface. Use a ground-penetrating scanner to detect the resources.</description>
    <size>(1,1)</size>
    <altitudeLayer>Building</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <fillPercent>0.5</fillPercent>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <hasInteractionCell>true</hasInteractionCell>
    <designationCategory>Production</designationCategory>
    <designationHotKey>Misc12</designationHotKey>
    <specialDisplayRadius>1.5</specialDisplayRadius>
    <rotatable>true</rotatable>
    <costList>
      <Steel>100</Steel>
      <Component>3</Component>
    </costList>
    <placeWorkers>
      <li>PlaceWorker_ShowDeepResources</li>
    </placeWorkers>
    <drawPlaceWorkersWhileSelected>true</drawPlaceWorkersWhileSelected>
    <researchPrerequisites>
      <li>DeepDrilling</li>
    </researchPrerequisites>
    <statBases>
      <MaxHitPoints>140</MaxHitPoints>
      <WorkToBuild>5000</WorkToBuild>
      <Flammability>1.0</Flammability>
      <Beauty>-25</Beauty>
    </statBases>
    <comps>
      <li Class="CompProperties_Forbiddable"/>
			<li Class="CompProperties_Flickable"/>
			<li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>250</basePowerConsumption>
        <startElectricalFires>true</startElectricalFires>
        <shortCircuitInRain>false</shortCircuitInRain>
      </li>
      <li>
        <compClass>CompDeepDrill</compClass>
      </li>
    </comps>
    <graphicData>
      <graphicClass>Graphic_Single</graphicClass>
      <texPath>Things/Building/Production/DeepDrill</texPath>
      <drawSize>(2,2)</drawSize>
      <drawRotated>false</drawRotated>
    </graphicData>
  </ThingDef>
  
  <!--======================== Nutrient dispenser ==============================-->

  <ThingDef ParentName="BuildingBase">
    <defName>NutrientPasteDispenser</defName>
    <label>nutrient paste dispenser</label>
    <description>Synthesizes nutrient paste from organic feedstocks. It consumes less ingredients and time than any other meal production method - but nobody likes eating nutrient paste. Accepts raw food, but not rough plant matter like hay.</description>
    <thingClass>Building_NutrientPasteDispenser</thingClass>
    <graphicData>
      <texPath>Things/Building/Production/NutrientDispenser</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>(3,4)</drawSize>
      <damageData>
        <rect>(0.02,0.25,2.96,2.85)</rect>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
      </damageData>
    </graphicData>
    <altitudeLayer>Building</altitudeLayer>
    <passability>Impassable</passability>
    <blockWind>true</blockWind>
    <fillPercent>1</fillPercent>
    <statBases>
      <WorkToBuild>2200</WorkToBuild>
      <MaxHitPoints>350</MaxHitPoints>
      <Flammability>1.0</Flammability>
    </statBases>
    <building>
      <isMealSource>true</isMealSource>
      <wantsHopperAdjacent>true</wantsHopperAdjacent>
      <nutritionCostPerDispense>0.3</nutritionCostPerDispense>
      <soundDispense>DispensePaste</soundDispense>
    </building>
    <comps>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <startElectricalFires>true</startElectricalFires>
        <basePowerConsumption>200</basePowerConsumption>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_Breakdownable"/>
    </comps>
    <size>(3,4)</size>
    <costList>
      <Steel>90</Steel>
      <Component>3</Component>
    </costList>
    <socialPropernessMatters>true</socialPropernessMatters>
    <interactionCellOffset>(0,0,3)</interactionCellOffset>
    <hasInteractionCell>true</hasInteractionCell>
    <terrainAffordanceNeeded>Heavy</terrainAffordanceNeeded>
    <designationCategory>Production</designationCategory>
    <constructEffect>ConstructMetal</constructEffect>
    <designationHotKey>Misc6</designationHotKey>
    <canOverlapZones>false</canOverlapZones>
    <researchPrerequisites>
      <li>NutrientPaste</li>
    </researchPrerequisites>
  </ThingDef>

  <ThingDef ParentName="BuildingBase">
    <defName>Hopper</defName>
    <label>hopper</label>
    <thingClass>Building_Storage</thingClass>
    <graphicData>
      <texPath>Things/Building/Production/Hopper</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <damageData>
        <rect>(0.05,0.1,0.9,0.9)</rect>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
      </damageData>
    </graphicData>
    <altitudeLayer>Building</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <fillPercent>0.5</fillPercent>
    <pathCost>70</pathCost>
    <canOverlapZones>false</canOverlapZones>
    <building>
      <fixedStorageSettings>
        <priority>Important</priority>
        <filter>
          <categories>
            <li>FoodRaw</li>
          </categories>
          <disallowedSpecialFilters>
            <li>AllowPlantFood</li>
          </disallowedSpecialFilters>
        </filter>
      </fixedStorageSettings>
      <defaultStorageSettings>
        <priority>Important</priority>
        <filter>
          <categories>
            <li>FoodRaw</li>
          </categories>
          <exceptedThingDefs>
            <li>Human_Meat</li>
            <li>Megaspider_Meat</li>
          </exceptedThingDefs>
        </filter>
      </defaultStorageSettings>
    </building>
    <inspectorTabs>
      <li>ITab_Storage</li>
    </inspectorTabs>
    <castEdgeShadows>true</castEdgeShadows>
    <statBases>
      <WorkToBuild>450</WorkToBuild>
      <MaxHitPoints>100</MaxHitPoints>
      <Flammability>1.0</Flammability>
    </statBases>
    <description>Holds resources for use by machines like nutrient paste dispensers.</description>
    <costList>
      <Steel>15</Steel>
    </costList>
    <tickerType>Never</tickerType>
    <rotatable>true</rotatable>
    <neverMultiSelect>true</neverMultiSelect>
    <designationCategory>Production</designationCategory>
    <staticSunShadowHeight>0.3</staticSunShadowHeight>
    <surfaceType>Item</surfaceType>
    <placeWorkers>
      <li>PlaceWorker_NextToHopperAccepter</li>
    </placeWorkers>
    <constructEffect>ConstructMetal</constructEffect>
  </ThingDef>
  
</Defs>
