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


	<ThingDef Name="BuildingBase" Abstract="True">
		<category>Building</category>
		<soundBulletHit>BulletImpactMetal</soundBulletHit>
		<selectable>true</selectable>
		<drawerType>MapMeshAndRealTime</drawerType>
		<surfaceNeeded>Light</surfaceNeeded>
		<constructionEffect>ConstructMetal</constructionEffect>
		<repairEffect>Repair</repairEffect>
	</ThingDef>


  <!--============================== Beds ==============================-->

	<ThingDef ParentName="BuildingBase">
		<defName>SleepingSpot</defName>
    <EType>Bed</EType>
		<Label>Sleeping spot</Label>
		<Description>Designates a spot on the ground where people should sleep. Not comfortable. Rest effectiveness: 7/10</Description>
		<ThingClass>Building_Bed</ThingClass>
		<graphicPath>Things/Building/Bed/SleepSpot</graphicPath>
		<AltitudeLayer>FloorEmplacement</AltitudeLayer>
		<WorkToBuild>0</WorkToBuild>
		<UseStandardHealth>False</UseStandardHealth>
		<Size>(1,2)</Size>
		<Overdraw>True</Overdraw>
    <DesignationCategory>Furniture</DesignationCategory>
    <Passability>Standable</Passability>
    <DrawGUIOverlay>True</DrawGUIOverlay>
    <building>
      <!--<bed_graphicPath_forPrisoner>Things/Building/Bed/SleepSpot_ForPrisoner</bed_graphicPath_forPrisoner>-->
      <Bed_ShowSleeperBody>True</Bed_ShowSleeperBody>
      <Bed_HealTickInterval>3200</Bed_HealTickInterval>
      <bed_RestEffectiveness>0.7</bed_RestEffectiveness>
      <supportsPlants>true</supportsPlants>
      <canPlaceOverImpassablePlant>false</canPlaceOverImpassablePlant>
    </building>
	</ThingDef>



	<ThingDef ParentName="BuildingBase">
		<defName>Bed</defName>
		<EType>Bed</EType>
		<Label>Bed</Label>
		<Description>A cozy mattress and sheets on a frame for resting. Rest effectiveness: 10/10</Description>
		<ThingClass>Building_Bed</ThingClass>
    <graphicPath>Things/Building/Bed/Bed</graphicPath>
		<AltitudeLayer>Waist</AltitudeLayer>
		<MaxHealth>150</MaxHealth>
		<Size>(1,2)</Size>
		<WorkToBuild>580</WorkToBuild>
    <constructionEffect>ConstructWood</constructionEffect>
    <constructionAnimation>WoodTiles</constructionAnimation>
    <costList>
			<li>
				<thingDef>WoodLog</thingDef>
				<count>20</count>
			</li>
		</costList>
    <Overdraw>True</Overdraw>
    <building>
      <bed_graphicPath_forPrisoner>Things/Building/Bed/BedPrisoner</bed_graphicPath_forPrisoner>
      <Bed_ShowSleeperBody>False</Bed_ShowSleeperBody>
      <Bed_HealTickInterval>2000</Bed_HealTickInterval>
      <bed_RestEffectiveness>1.0</bed_RestEffectiveness>
    </building>
		<Beauty>Neutral</Beauty>
		<fillPercent>0.4</fillPercent>
		<PathCost>60</PathCost>
		<LeaveResourcesWhenKilled>True</LeaveResourcesWhenKilled>
		<killedLeavings>
			<li>
				<thingDef>ChunkSlag</thingDef>
				<count>1</count>
			</li>
		</killedLeavings>
		<StaticSunShadowHeight>0.17</StaticSunShadowHeight>
		<CastEdgeShadows>True</CastEdgeShadows>
		<DesignationCategory>Furniture</DesignationCategory>
		<Passability>PassThroughOnly</Passability>
		<DrawGUIOverlay>True</DrawGUIOverlay>
    <designationHotKey>B</designationHotKey>
  </ThingDef>





  <ThingDef ParentName="BuildingBase">
    <defName>RoyalBed</defName>
    <EType>Bed</EType>
    <label>Royal bed</label>
    <Description>A luxurious bed fit for the highborn.</Description>
    <ThingClass>Building_Bed</ThingClass>
    <graphicPath>Things/Building/Bed/RoyalBed</graphicPath>
    <AltitudeLayer>Waist</AltitudeLayer>
    <MaxHealth>200</MaxHealth>
    <Size>(2,2)</Size>
    <WorkToBuild>1000</WorkToBuild>
    <CostList>
      <li>
        <thingDef>Metal</thingDef>
        <count>60</count>
      </li>
    </CostList>
    <Overdraw>True</Overdraw>
    <building>
      <bed_graphicPath_forPrisoner>Things/Building/Bed/RoyalBedPrisoner</bed_graphicPath_forPrisoner>
      <Bed_ShowSleeperBody>False</Bed_ShowSleeperBody>
      <Bed_HealTickInterval>1900</Bed_HealTickInterval>
      <bed_RestEffectiveness>1.03</bed_RestEffectiveness>
    </building>
    <Beauty>Gorgeous</Beauty>
    <SurfaceNeeded>Light</SurfaceNeeded>
    <fillPercent>0.4</fillPercent>
    <PathCost>60</PathCost>
    <LeaveResourcesWhenKilled>True</LeaveResourcesWhenKilled>
    <killedLeavings>
      <li>
        <thingDef>ChunkSlag</thingDef>
        <count>2</count>
      </li>
    </killedLeavings>
    <StaticSunShadowHeight>0.17</StaticSunShadowHeight>
    <CastEdgeShadows>True</CastEdgeShadows>
    <DesignationCategory>Furniture</DesignationCategory>
    <Passability>PassThroughOnly</Passability>
    <designationHotKey>R</designationHotKey>
  </ThingDef>







  <!--======================= Basic domestic furniture ==============================-->


  <ThingDef ParentName="BuildingBase">
		<defName>Stool_Metal</defName>
		<eType>Building_Chair</eType>
		<label>Metal stool</label>
		<thingClass>Building_Chair</thingClass>
    <graphicPath>Things/Building/Furniture/StoolMetal</graphicPath>
    <altitudeLayer>Waist</altitudeLayer>
    <maxHealth>75</maxHealth>
    <description>People sit here.</description>
    <size>(1,1)</size>
    <workToBuild>500</workToBuild>
    <flammability>1.0</flammability>
    <costList>
      <li>
        <thingDef>Metal</thingDef>
        <count>15</count>
      </li>
    </costList>
    <filthLeavings>
      <li>
        <thingDef>SlagRubble</thingDef>
        <count>1</count>
      </li>
    </filthLeavings>
    <pathCost>30</pathCost>
    <building>
      <bed_RestEffectiveness>0.78</bed_RestEffectiveness>
    </building>
    <designationCategory>Furniture</designationCategory>
    <sunShadowInfo>
      <basewidth>0.3</basewidth>
      <baseHeight>0.3</baseHeight>
      <tallness>0.6</tallness>
    </sunShadowInfo>
    <designationHotKey>C</designationHotKey>

  </ThingDef>
  
  
  <ThingDef ParentName="BuildingBase">
		<defName>Stool_Wood</defName>
		<eType>Building_Chair</eType>
		<label>Wood stool</label>
		<thingClass>Building_Chair</thingClass>
		<graphicPath>Things/Building/Furniture/StoolWood</graphicPath>
    <altitudeLayer>Waist</altitudeLayer>
		<maxHealth>50</maxHealth>
		<description>People sit here.</description>
		<size>(1,1)</size>
		<workToBuild>450</workToBuild>
		<constructionEffect>ConstructWood</constructionEffect>
		<constructionAnimation>WoodTiles</constructionAnimation>
		<flammability>1.0</flammability>
		<costList>
			<li>
				<thingDef>WoodLog</thingDef>
				<count>15</count>
			</li>
		</costList>
		<pathCost>30</pathCost>
    <building>
      <bed_RestEffectiveness>0.6</bed_RestEffectiveness>
    </building>
		<designationCategory>Furniture</designationCategory>
		<sunShadowInfo>
			<basewidth>0.3</basewidth>
			<baseHeight>0.3</baseHeight>
			<tallness>0.6</tallness>
		</sunShadowInfo>
  </ThingDef>



  <!--======================= Tables ==============================-->


  <ThingDef Abstract="True" ParentName="BuildingBase" Name="TableBase">
    <eType>Building_Table</eType>
    <thingClass>Building</thingClass>
    <altitudeLayer>Waist</altitudeLayer>
    <description>People eat off tables when chairs are placed facing them.</description>
    <overdraw>false</overdraw>
    <passability>PassThroughOnly</passability>
    <castEdgeShadows>true</castEdgeShadows>
    <pathCost>60</pathCost>
    <fillPercent>0.4</fillPercent>
    <filthLeavings>
      <li>
        <thingDef>SlagRubble</thingDef>
        <count>1</count>
      </li>
    </filthLeavings>
    <leaveResourcesWhenKilled>true</leaveResourcesWhenKilled>
    <designationCategory>Furniture</designationCategory>
    <staticSunShadowHeight>0.20</staticSunShadowHeight>
    <itemSurface>true</itemSurface>
    <comps>
      <li>
        <compClass>CompGatherSpot</compClass>
      </li>
    </comps>
  </ThingDef>
  
  
	<ThingDef ParentName="TableBase">
		<defName>TableShort_Metal</defName>
		<label>Metal table (short)</label>
		<graphicPath>Things/Building/Furniture/TableShortMetal</graphicPath>
    <overdraw>true</overdraw>
    <maxHealth>100</maxHealth>
		<flammability>0</flammability>
		<size>(2,2)</size>
		<workToBuild>450</workToBuild>
		<costList>
			<li>
				<thingDef>Metal</thingDef>
				<count>20</count>
			</li>
		</costList>
		<killedLeavings>
			<li>
				<thingDef>ChunkSlag</thingDef>
				<count>1</count>
			</li>
		</killedLeavings>
	</ThingDef>


	<ThingDef ParentName="TableBase">
		<defName>TableLong_Metal</defName>
		<label>Metal table (long)</label>
    <graphicPath>Things/Building/Furniture/TableLongMetal</graphicPath>
    <overdraw>true</overdraw>
    <maxHealth>150</maxHealth>
    <flammability>0</flammability>
    <size>(2,4)</size>
    <workToBuild>830</workToBuild>
    <costList>
      <li>
        <thingDef>Metal</thingDef>
        <count>35</count>
      </li>
    </costList>
    <killedLeavings>
      <li>
        <thingDef>ChunkSlag</thingDef>
        <count>2</count>
      </li>
    </killedLeavings>

  </ThingDef>


  <ThingDef ParentName="TableBase">
    <defName>TableShort_Wood</defName>
    <label>Wood table (short)</label>
    <graphicPath>Things/Building/Furniture/TableShortWood</graphicPath>
    <overdraw>true</overdraw>
    <maxHealth>100</maxHealth>
    <flammability>1</flammability>
    <size>(2,2)</size>
    <workToBuild>415</workToBuild>
    <constructionEffect>ConstructWood</constructionEffect>
    <constructionAnimation>WoodTiles</constructionAnimation>
    <costList>
      <li>
        <thingDef>WoodLog</thingDef>
        <count>20</count>
      </li>
    </costList>

  </ThingDef>


  <ThingDef ParentName="TableBase">
    <label>Wood table (long)</label>
    <defName>TableLong_Wood</defName>
    <graphicPath>Things/Building/Furniture/TableLongWood</graphicPath>
    <overdraw>true</overdraw>
    <maxHealth>150</maxHealth>
    <flammability>1</flammability>
    <size>(2,4)</size>
    <workToBuild>900</workToBuild>
    <constructionEffect>ConstructWood</constructionEffect>
    <constructionAnimation>WoodTiles</constructionAnimation>
    <costList>
      <li>
        <thingDef>WoodLog</thingDef>
        <count>35</count>
      </li>
    </costList>
  </ThingDef>
  
  
  <!-- ======================== Lighting ======================= -->

	<ThingDef ParentName="BuildingBase">
		<defName>StandingLamp</defName>
		<eType>BuildingComplex</eType>
		<label>Standing lamp</label>
		<thingClass>Building</thingClass>
		<category>Building</category>
		<texturePath>Things/Building/LampStanding</texturePath>
		<altitudeLayer>BuildingTall</altitudeLayer>
		<passability>PassThroughOnly</passability>
		<maxHealth>50</maxHealth>
		<flammability>1.0</flammability>
		<selectable>true</selectable>
		<description>Standing lamp that lights an area.</description>
		<size>(1,1)</size>
		<workToBuild>115</workToBuild>
		<costList>
			<li>
				<thingDef>Metal</thingDef>
				<count>15</count>
			</li>
		</costList>
		<soundBulletHit>BulletImpactMetal</soundBulletHit>
		<leaveResourcesWhenKilled>false</leaveResourcesWhenKilled>
		<comps>
			<li>
				<compClass>CompPowerTrader</compClass>
				<basePowerConsumption>150</basePowerConsumption>
				<soundPowerOn>PowerOnSmall</soundPowerOn>
				<soundPowerOff>PowerOffSmall</soundPowerOff>
			</li>
			<li>
				<compClass>CompGlower</compClass>
				<glowRadius>12</glowRadius>
				<glowColor>(217,217,208,0)</glowColor>
			</li>
		</comps>
		<designationCategory>Furniture</designationCategory>
		<sunShadowInfo>
			<basewidth>0.3</basewidth>
			<baseHeight>0.3</baseHeight>
			<tallness>0.6</tallness>
			<offset>(0,0,-0.1)</offset>
		</sunShadowInfo>
		<rotatable>false</rotatable>
    <designationHotKey>L</designationHotKey>
  </ThingDef>






  <ThingDef ParentName="BuildingBase">
    <defName>StandingLamp_Red</defName>
    <eType>BuildingComplex</eType>
    <label>Standing lamp (red)</label>
    <thingClass>Building</thingClass>
    <category>Building</category>
    <texturePath>Things/Building/LampStanding</texturePath>
    <altitudeLayer>BuildingTall</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <maxHealth>50</maxHealth>
    <flammability>1.0</flammability>
    <selectable>true</selectable>
    <description>Standing lamp that lights an area in red.</description>
    <size>(1,1)</size>
    <workToBuild>130</workToBuild>
    <costList>
      <li>
        <thingDef>Metal</thingDef>
        <count>25</count>
      </li>
    </costList>
    <leaveResourcesWhenKilled>false</leaveResourcesWhenKilled>
    <comps>
      <li>
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>150</basePowerConsumption>
        <soundPowerOn>PowerOnSmall</soundPowerOn>
        <soundPowerOff>PowerOffSmall</soundPowerOff>
      </li>
      <li>
        <compClass>CompGlower</compClass>
        <glowRadius>12</glowRadius>
        <glowColor>(217,0,0,0)</glowColor>
      </li>
    </comps>
    <designationCategory>Furniture</designationCategory>
    <sunShadowInfo>
      <basewidth>0.3</basewidth>
      <baseHeight>0.3</baseHeight>
      <tallness>0.6</tallness>
      <offset>(0,0,-0.1)</offset>
    </sunShadowInfo>
    <rotatable>false</rotatable>
    <researchPrerequisite>ColoredLights</researchPrerequisite>
  </ThingDef>





  <ThingDef ParentName="BuildingBase">
    <defName>StandingLamp_Green</defName>
    <eType>BuildingComplex</eType>
    <label>Standing lamp (green)</label>
    <thingClass>Building</thingClass>
    <category>Building</category>
    <texturePath>Things/Building/LampStanding</texturePath>
    <altitudeLayer>BuildingTall</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <maxHealth>50</maxHealth>
    <flammability>1.0</flammability>
    <selectable>true</selectable>
    <description>Standing lamp that lights an area in green.</description>
    <size>(1,1)</size>
    <workToBuild>130</workToBuild>
    <costList>
      <li>
        <thingDef>Metal</thingDef>
        <count>25</count>
      </li>
    </costList>
    <leaveResourcesWhenKilled>false</leaveResourcesWhenKilled>
    <comps>
      <li>
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>150</basePowerConsumption>
        <soundPowerOn>PowerOnSmall</soundPowerOn>
        <soundPowerOff>PowerOffSmall</soundPowerOff>
      </li>
      <li>
        <compClass>CompGlower</compClass>
        <glowRadius>12</glowRadius>
        <glowColor>(0,217,0,0)</glowColor>
      </li>
    </comps>
    <designationCategory>Furniture</designationCategory>
    <sunShadowInfo>
      <basewidth>0.3</basewidth>
      <baseHeight>0.3</baseHeight>
      <tallness>0.6</tallness>
      <offset>(0,0,-0.1)</offset>
    </sunShadowInfo>
    <rotatable>false</rotatable>
    <researchPrerequisite>ColoredLights</researchPrerequisite>
  </ThingDef>



  <ThingDef ParentName="BuildingBase">
    <defName>StandingLamp_Blue</defName>
    <eType>BuildingComplex</eType>
    <label>Standing lamp (blue)</label>
    <thingClass>Building</thingClass>
    <category>Building</category>
    <texturePath>Things/Building/LampStanding</texturePath>
    <altitudeLayer>BuildingTall</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <maxHealth>50</maxHealth>
    <flammability>1.0</flammability>
    <selectable>true</selectable>
    <description>Standing lamp that lights an area in blue.</description>
    <size>(1,1)</size>
    <workToBuild>130</workToBuild>
    <costList>
      <li>
        <thingDef>Metal</thingDef>
        <count>25</count>
      </li>
    </costList>
    <leaveResourcesWhenKilled>false</leaveResourcesWhenKilled>
    <comps>
      <li>
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>150</basePowerConsumption>
        <soundPowerOn>PowerOnSmall</soundPowerOn>
        <soundPowerOff>PowerOffSmall</soundPowerOff>
      </li>
      <li>
        <compClass>CompGlower</compClass>
        <glowRadius>12</glowRadius>
        <glowColor>(0,0,217,0)</glowColor>
      </li>
    </comps>
    <designationCategory>Furniture</designationCategory>
    <sunShadowInfo>
      <basewidth>0.3</basewidth>
      <baseHeight>0.3</baseHeight>
      <tallness>0.6</tallness>
      <offset>(0,0,-0.1)</offset>
    </sunShadowInfo>
    <rotatable>false</rotatable>
    <researchPrerequisite>ColoredLights</researchPrerequisite>
  </ThingDef>




<!--============================== Storage ==============================-->


  <ThingDef ParentName="BuildingBase">
    <defName>EquipmentRack</defName>
    <eType>BuildingComplex</eType>
    <label>Equipment rack</label>
    <thingClass>Building_Storage</thingClass>
    <texturePath>Things/Building/Furniture/EquipmentRack</texturePath>
    <altitudeLayer>Waist</altitudeLayer>
    <passability>Impassable</passability>
    <castEdgeShadows>true</castEdgeShadows>
    <maxHealth>100</maxHealth>
    <flammability>1.0</flammability>
    <description>Haulers carry equipment here for storage.</description>
    <size>(2,1)</size>
    <workToBuild>580</workToBuild>
    <costList>
      <li>
        <thingDef>Metal</thingDef>
        <count>30</count>
      </li>
    </costList>
    <overdraw>true</overdraw>
    <killedLeavings>
      <li>
        <thingDef>ChunkSlag</thingDef>
        <count>1</count>
      </li>
    </killedLeavings>
    <filthLeavings>
      <li>
        <thingDef>SlagRubble</thingDef>
        <count>2</count>
      </li>
    </filthLeavings>
    <building>
      <fixedStorageSettings>
        <priority>Important</priority>
        <allowances>
          <categories>
            <li>Weapons</li>
          </categories>
        </allowances>
      </fixedStorageSettings> 
    </building>
    <inspectorTabs>
      <li>ITab_Storage</li>
    </inspectorTabs>
    <designationCategory>Furniture</designationCategory>
    <staticSunShadowHeight>0.5</staticSunShadowHeight>
    <itemSurface>true</itemSurface>
    <designationHotKey>I</designationHotKey>
  </ThingDef>









</Buildings>