<?xml version="1.0" encoding="utf-8" ?>
<Defs>

  <!-- Ancient terminals -->
  <ThingDef Name="AncientTerminalBase" ParentName="BuildingBase" Abstract="True">
    <label>ancient terminal</label>
    <description>An ancient computer terminal. It can be hacked to reveal long-forgotten information.</description>
    <graphicData>
      <graphicClass>Graphic_Multi</graphicClass>
      <texPath>Things/Building/Misc/AncientTerminal/AncientTerminal</texPath>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
      <shadowData>
        <volume>(0.55, 0.30, 0.40)</volume>
      </shadowData>
    </graphicData>
    <size>(1,1)</size>
    <fillPercent>0.20</fillPercent>
    <altitudeLayer>Building</altitudeLayer>
    <defaultPlacingRot>South</defaultPlacingRot>
    <hasInteractionCell>true</hasInteractionCell>
    <interactionCellOffset>(0,0,1)</interactionCellOffset>
    <statBases>
      <MaxHitPoints>200</MaxHitPoints>
      <WorkToBuild>1000</WorkToBuild>
      <Flammability>0</Flammability>
    </statBases>
    <passability>PassThroughOnly</passability>
    <pathCost>50</pathCost>
    <comps>
      <li Class="CompProperties_ThrownFleckEmitter">
        <fleck>TerminalScreenLensFlare</fleck>
        <offsetMin>(-0.3,0,0.35)</offsetMin>
        <offsetMax>(0.3,0,0.35)</offsetMax>
        <emissionInterval>90</emissionInterval>
        <scale>1~1.1</scale>
        <colorA>(0,235,31,255)</colorA>
        <colorB>(0,235,31,255)</colorB>
      </li>
      <li Class="CompProperties_Glower">
        <glowRadius>2</glowRadius>
        <glowColor>(0,235,31,0)</glowColor>
      </li>
    </comps>
    <tickerType>Normal</tickerType>
  </ThingDef>

  <ThingDef ParentName="AncientTerminalBase">
    <defName>AncientTerminal_Worshipful</defName>
    <comps>
      <li Class="CompProperties_Hackable">
        <defence>180</defence>
        <effectHacking>HackingTerminal</effectHacking>
      </li>
    </comps>
  </ThingDef>

  <ThingDef Name="AncientTerminal" ParentName="AncientTerminalBase">
    <defName>AncientTerminal</defName>
    <comps>
      <li Class="CompProperties_Hackable">
        <defence>5000</defence>
        <effectHacking>HackingTerminal</effectHacking>
      </li>
    </comps>
  </ThingDef>

  <ThingDef ParentName="AncientTerminal">
    <defName>AncientEnemyTerminal</defName>
    <label>ancient enemy terminal</label>
    <description>An ancient computer terminal. It can be hacked to call nearby enemies.</description>
    <graphicData>
      <texPath>Things/Building/Ruins/AncientEnemyTerminal</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
    </graphicData>
    <comps Inherit="False">
      <li Class="CompProperties_Hackable">
        <defence>200</defence>
        <effectHacking>HackingTerminal</effectHacking>
      </li>
      <li Class="CompProperties_ThrownFleckEmitter">
        <fleck>TerminalScreenLensFlare</fleck>
        <offsetMin>(-0.3,0,0.35)</offsetMin>
        <offsetMax>(0.3,0,0.35)</offsetMax>
        <emissionInterval>90</emissionInterval>
        <scale>1~1.1</scale>
        <colorA>(214,46,31,255)</colorA>
        <colorB>(214,46,31,255)</colorB>
      </li>
      <li Class="CompProperties_Glower">
        <glowRadius>2</glowRadius>
        <glowColor>(214,46,31,0)</glowColor>
      </li>
    </comps>
    <tickerType>Normal</tickerType>
  </ThingDef>

  <!-- Ancient crates -->
  <ThingDef Abstract="True" Name="CrateBase" ParentName="BuildingBase">
    <thingClass>Building_Crate</thingClass>
    <drawerType>MapMeshAndRealTime</drawerType>
    <altitudeLayer>Building</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <pathCost>50</pathCost>
    <hasInteractionCell>true</hasInteractionCell>
    <building>
      <openingStartedSound>CrateOpeningStarted</openingStartedSound>
    </building>
  </ThingDef>

  <ThingDef ParentName="CrateBase">
    <defName>AncientHermeticCrate</defName>
    <label>hermetic crate</label>
    <description>A self-powered hermetically-sealed crate for preserving valuable items. These can preserve their contents for a long time.</description>
    <size>(1, 2)</size>
    <fillPercent>0.40</fillPercent>
    <graphicData>
      <texPath>Things/Building/Ruins/AncientHermeticCrate</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(1, 2)</drawSize>
      <shadowData>
        <volume>(1, 0.45, 2)</volume>
      </shadowData>
    </graphicData>
    <statBases>
      <MaxHitPoints>250</MaxHitPoints>
      <WorkToBuild>1000</WorkToBuild>
    </statBases>  
    <interactionCellOffset>(0,0,2)</interactionCellOffset>
    <building>
      <openingEffect>HermeticCrateOpened</openingEffect>
    </building>
    <comps>
      <li Class="CompProperties_EmptyStateGraphic">
        <graphicData>
          <texPath>Things/Building/Ruins/AncientHermeticCrateOpen</texPath>
          <graphicClass>Graphic_Multi</graphicClass>
          <drawSize>(1, 2)</drawSize>
        </graphicData>
      </li>
      <li Class="CompProperties_ThrownFleckEmitter">
        <fleck>TerminalScreenLensFlare</fleck>
        <offsetMin>(-0.3,0,-0.7)</offsetMin>
        <offsetMax>(0.3,0,-0.7)</offsetMax>
        <emissionInterval>90</emissionInterval>
        <scale>1~1.1</scale>
        <colorA>(239,133,50,255)</colorA>
        <colorB>(239,133,50,255)</colorB>
      </li>
      <li Class="CompProperties_Glower">
        <glowRadius>3</glowRadius>
        <glowColor>(239,133,50,0)</glowColor>
      </li>
    </comps>
    <tickerType>Normal</tickerType>
  </ThingDef>

  <ThingDef ParentName="CrateBase">
    <defName>AncientSecurityCrate</defName>
    <label>security crate</label>
    <description>A large self-powered hermetically-sealed crate with built-in security alarms. These can preserve their contents for a long time. If it is opened without the proper code, it will probably activate some nearby security system.</description>
    <size>(2, 2)</size>
    <fillPercent>0.50</fillPercent>
    <graphicData>
      <texPath>Things/Building/Ruins/AncientSecurityCrate</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(2, 2)</drawSize>
      <shadowData>
        <volume>(2, 0.45, 1.75)</volume>
      </shadowData>
    </graphicData>
    <statBases>
      <MaxHitPoints>400</MaxHitPoints>
      <WorkToBuild>2000</WorkToBuild>
      <Flammability>0</Flammability>
    </statBases>  
    <interactionCellOffset>(0,0,2)</interactionCellOffset>
    <building>
      <openingEffect>SecurityCrateOpened</openingEffect>
    </building>
    <comps>
      <li Class="CompProperties_EmptyStateGraphic">
        <graphicData>
          <texPath>Things/Building/Ruins/AncientSecurityCrateOpen</texPath>
          <graphicClass>Graphic_Multi</graphicClass>
          <drawSize>(2, 2)</drawSize>
        </graphicData>
      </li>
      <li Class="CompProperties_ThrownFleckEmitter">
        <fleck>TerminalScreenLensFlare</fleck>
        <offsetMin>(-0.7,0,0.9)</offsetMin>
        <offsetMax>(0,0,0.9)</offsetMax>
        <emissionInterval>90</emissionInterval>
        <scale>1~1.1</scale>
        <colorA>(214,46,31,255)</colorA>
        <colorB>(214,46,31,255)</colorB>
      </li>
      <li Class="CompProperties_Glower">
        <glowRadius>4</glowRadius>
        <glowColor>(214,46,31,0)</glowColor>
      </li>
    </comps>
    <tickerType>Normal</tickerType>
  </ThingDef>

  <!-- Misc -->
  <ThingDef ParentName="BuildingBase">
    <defName>AncientCommsConsole</defName>
    <label>ancient comms console</label>
    <description>An ancient console with an attached communications dish. Valuable parts are missing, and everything else is degraded to uselessness.</description>
    <thingClass>Building_AncientCommsConsole</thingClass>
    <size>(3, 2)</size>
    <fillPercent>0.50</fillPercent>
    <graphicData>
      <texPath>Things/Building/Ruins/AncientCommsConsole</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(3, 2)</drawSize>
      <shadowData>
        <offset>(0.5, 0, 0)</offset>
        <volume>(2, 0.5, 1.8)</volume>
      </shadowData>
    </graphicData>
    <altitudeLayer>Building</altitudeLayer>
    <hasInteractionCell>true</hasInteractionCell>
    <interactionCellOffset>(0,0,2)</interactionCellOffset>
    <statBases>
      <MaxHitPoints>250</MaxHitPoints>
      <WorkToBuild>2000</WorkToBuild>
      <Flammability>0.5</Flammability>
    </statBases>
    <passability>PassThroughOnly</passability>
    <pathCost>50</pathCost>
    <comps>
      <li Class="CompProperties_Hackable">
        <defence>200</defence>
        <effectHacking>HackingTerminal</effectHacking>
        <completedQuest>AncientSignalActivation</completedQuest>
        <hackingCompletedSound>AncientCommsConsoleActivated</hackingCompletedSound>
      </li>
      <li Class="CompProperties_ThrownFleckEmitter">
        <fleck>TerminalScreenLensFlare</fleck>
        <offsetMin>(-0.3,0,0.3)</offsetMin>
        <offsetMax>(0.3,0,0.3)</offsetMax>
        <emissionInterval>90</emissionInterval>
        <scale>1~1.1</scale>
        <colorA>(239,133,50,255)</colorA>
        <colorB>(239,133,50,255)</colorB>
      </li>
      <li Class="CompProperties_Glower">
        <glowRadius>4.5</glowRadius>
        <glowColor>(239,133,50,0)</glowColor>
      </li>
    </comps>
    <tickerType>Normal</tickerType>
  </ThingDef>

  <ThingDef ParentName="BuildingBase">
    <defName>AncientFuelNode</defName>
    <label>ancient unstable fuel node</label>
    <description>An ancient, unstable fuel node once used to charge machines with fuel. It has become unstable over the years due to lack of maintenance.</description>
    <rotatable>false</rotatable>
    <graphicData>
      <texPath>Things/Building/Ruins/AncientFuelNode</texPath>
      <graphicClass>Graphic_Random</graphicClass>
      <drawSize>(1,1)</drawSize>
      <shadowData>
        <volume>(0.7, 0.5, 0.7)</volume>
      </shadowData>
    </graphicData>
    <size>(1, 1)</size>
    <fillPercent>0.30</fillPercent>
    <altitudeLayer>Building</altitudeLayer>
    <statBases>
      <MaxHitPoints>50</MaxHitPoints>
      <WorkToBuild>3000</WorkToBuild>
      <Flammability>1.5</Flammability>
    </statBases>
    <comps>
      <li Class="CompProperties_Explosive">
        <wickTicks>480</wickTicks>
        <explosiveRadius>6.9</explosiveRadius>
        <explosiveDamageType>Flame</explosiveDamageType>
        <explodeOnKilled>true</explodeOnKilled>
        <startWickHitPointsPercent>0.99</startWickHitPointsPercent>
        <extraInspectStringKey>ExplosionOnDamageWarning</extraInspectStringKey>
        <preExplosionSpawnThingDef>Filth_Fuel</preExplosionSpawnThingDef>
        <preExplosionSpawnChance>0.25</preExplosionSpawnChance>
      </li>
    </comps>
    <passability>PassThroughOnly</passability>
    <pathCost>50</pathCost>
    <tickerType>Normal</tickerType>
  </ThingDef>

</Defs>