<?xml version="1.0" encoding="utf-8" ?>
<Defs>
  <!--==================================== 오토마톤 제작대 ====================================-->
  <ThingDef ParentName="BenchBase">
    <defName>PN_AutomatonBench</defName>
    <label>automaton fabrication bench</label>
    <description>...</description>
    <thingClass>Building_WorkTable</thingClass>
    <altitudeLayer>Building</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <pathCost>50</pathCost>
    <statBases>
      <MaxHitPoints>300</MaxHitPoints>
      <WorkToBuild>5000</WorkToBuild>
      <Flammability>1.0</Flammability>
    </statBases>
    <minifiedDef />
    <thingCategories Inherit="false" />
    <size>(5,2)</size>
    <costList>
      <Steel>200</Steel>
      <ComponentIndustrial>8</ComponentIndustrial>
    </costList>
    <comps>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>ToolCabinet</li>
        </linkableFacilities>
      </li>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>250</basePowerConsumption>
        <shortCircuitInRain>true</shortCircuitInRain>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_Breakdownable"/>
    </comps>
    <recipes>
      <li>Make_ComponentIndustrial</li>
      <li>Make_ComponentSpacer</li>
    </recipes>
    <graphicData>
      <texPath>Things/Building/PNAutomatonBench</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>
    <castEdgeShadows>true</castEdgeShadows>
    <staticSunShadowHeight>0.20</staticSunShadowHeight>
    <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>
    <constructionSkillPrerequisite>6</constructionSkillPrerequisite>
    <placeWorkers>
      <li>PlaceWorker_ShowFacilitiesConnections</li>
      <li>PlaceWorker_PreventInteractionSpotOverlap</li>
    </placeWorkers>
    <researchPrerequisites>
      <li>PNRP_Production</li>
    </researchPrerequisites>
  </ThingDef>

  <!--==================================== 오토캐논 ====================================-->
  <ThingDef ParentName="BuildingBase">
    <defName>PN_Artillery_Base</defName>
    <label>PnL Auto Artillery</label>
    <description>...</description>
    <thingClass>Building_TurretGun</thingClass>
    <graphicData>
      <texPath>Things/Building/PN_Artillery_Base</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <shaderType>CutoutComplex</shaderType>
      <drawSize>(3,3)</drawSize>
      <damageData>
        <rect>(0.2,0.2,0.6,0.6)</rect>
      </damageData>
    </graphicData>
    <uiIconPath>Things/Building/PN_Artillery_Ui</uiIconPath>
    <altitudeLayer>Building</altitudeLayer>
    <minifiedDef>MinifiedThing</minifiedDef>
    <thingCategories>
      <li>BuildingsSecurity</li>
    </thingCategories>
    <stealable>false</stealable>
    <size>(3,3)</size>
    <statBases>
      <MaxHitPoints>220</MaxHitPoints>
      <Flammability>0.7</Flammability>
      <WorkToBuild>15000</WorkToBuild>
      <Mass>100</Mass>
      <Beauty>-20</Beauty>
      <ShootingAccuracyTurret>0.996</ShootingAccuracyTurret>
    </statBases>
    <tickerType>Normal</tickerType>
    <comps>
      <li Class="CompProperties_Explosive">
        <explosiveRadius>5.9</explosiveRadius>
        <explosiveDamageType>Bomb</explosiveDamageType>
        <chanceNeverExplodeFromDamage>0.5</chanceNeverExplodeFromDamage>
      </li>
      <li Class="CompProperties_Refuelable">
        <fuelLabel>Shells Remaining</fuelLabel>
        <fuelGizmoLabel>Shell</fuelGizmoLabel>
        <fuelFilter>
          <thingDefs>
            <li>PN_Shell_HighExplosive</li>
          </thingDefs>
        </fuelFilter>
        <fuelCapacity>8</fuelCapacity>
        <initialFuelPercent>0</initialFuelPercent>
        <autoRefuelPercent>1</autoRefuelPercent>
        <showFuelGizmo>true</showFuelGizmo>
        <minimumFueledThreshold>1</minimumFueledThreshold>
        <fuelMultiplier>1</fuelMultiplier>
        <consumeFuelOnlyWhenUsed>true</consumeFuelOnlyWhenUsed>
        <outOfFuelMessage>Cannot shoot: No shells</outOfFuelMessage>
        <fuelIconPath>Things/Building/PN_shellfuel</fuelIconPath>
      </li>
    </comps>
    <passability>PassThroughOnly</passability>
    <pathCost>50</pathCost>
    <fillPercent>0.5</fillPercent>
    <hasTooltip>true</hasTooltip>
    <stuffCategories>
      <li>Metallic</li>
    </stuffCategories>
    <costStuffCount>50</costStuffCount>
    <costList>
      <Steel>250</Steel>
      <ComponentIndustrial>15</ComponentIndustrial>
    </costList>
    <terrainAffordanceNeeded>Heavy</terrainAffordanceNeeded>
    <designationCategory>Security</designationCategory>
    <specialDisplayRadius>14.9</specialDisplayRadius>
    <constructionSkillPrerequisite>6</constructionSkillPrerequisite>
    <building>
      <ai_combatDangerous>true</ai_combatDangerous>
      <turretGunDef>PN_Artillery_Turret</turretGunDef>
      <turretBurstCooldownTime>10</turretBurstCooldownTime>      <!--사격 쿨타임-->
      <turretTopDrawSize>3.0</turretTopDrawSize>
      <turretTopOffset>(0, 0.35)</turretTopOffset>
    </building>
    <placeWorkers>
      <li>PlaceWorker_TurretTop</li>
    </placeWorkers>
    <researchPrerequisites>
      <li>PNRP_AutoArtillery</li>
    </researchPrerequisites>
    <uiIconScale>0.6</uiIconScale>
  </ThingDef>

  <ThingDef ParentName="BaseWeaponTurret">
    <defName>PN_Artillery_Turret</defName>
    <label>PnL Auto Artillery Turret</label>
    <description>...</description>
    <graphicData>
      <texPath>Things/Building/PN_Artillery_Turret</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>(6.0,6.0)</drawSize>
    </graphicData>
    <soundInteract>Interact_Rifle</soundInteract>
    <menuHidden>true</menuHidden>
    <destroyOnDrop>true</destroyOnDrop>
    <tradeability>None</tradeability>
    <useHitPoints>false</useHitPoints>
    <statBases>
      <AccuracyTouch>0.20</AccuracyTouch>
      <AccuracyShort>0.30</AccuracyShort>
      <AccuracyMedium>0.40</AccuracyMedium>
      <AccuracyLong>0.95</AccuracyLong>
      <RangedWeapon_Cooldown>0</RangedWeapon_Cooldown>
      <DeteriorationRate>0</DeteriorationRate>
      <Mass>40</Mass>
      <Flammability>0</Flammability>
    </statBases>
    <weaponTags Inherit="false">
      <li>Artillery_BaseDestroyer</li>
    </weaponTags>
    <verbs>
      <li>
        <verbClass>Verb_Shoot</verbClass>
        <forceNormalTimeSpeed>false</forceNormalTimeSpeed>
        <hasStandardCommand>true</hasStandardCommand>
        <defaultProjectile>PN_Bullet_Shell_HighExplosive</defaultProjectile>
        <warmupTime>5.0</warmupTime>
        <forcedMissRadius>4</forcedMissRadius>
        <requireLineOfSight>false</requireLineOfSight>
        <minRange>14.9</minRange>
        <range>500</range>
        <burstShotCount>1</burstShotCount>
        <soundCast>PNCannonSound</soundCast>
        <muzzleFlashScale>16</muzzleFlashScale>
        <consumeFuelPerShot>1</consumeFuelPerShot>
      </li>
    </verbs>
  </ThingDef>

  <ThingDef ParentName="MakeableShellBase">
    <defName>PN_Shell_HighExplosive</defName>
    <label>PnL high-explosive shell</label>
    <description>A shell filled with high explosives. Can be fired from mortars or installed as a trap. Explodes when damaged.</description>
    <graphicData>
      <texPath>Things/Item/Resource/Shell/Shell_HighExplosive</texPath>
      <graphicClass>Graphic_StackCount</graphicClass>
    </graphicData>
    <comps>
      <li Class="CompProperties_Explosive">
        <explosiveRadius>3.9</explosiveRadius>
        <explosiveDamageType>Bomb</explosiveDamageType>
        <explosiveExpandPerStackcount>0.4</explosiveExpandPerStackcount>
        <startWickHitPointsPercent>0.7</startWickHitPointsPercent>
        <wickTicks>30~60</wickTicks>
      </li>
    </comps>
    <costList>
      <Steel>25</Steel>
      <PN_AutomatonFuel>15</PN_AutomatonFuel>
    </costList>
    <recipeMaker>
      <recipeUsers Inherit="false">
        <li>PN_AutomatonBench</li>
      </recipeUsers>
      <researchPrerequisite>PNRP_AutoArtillery</researchPrerequisite>
    </recipeMaker>
  </ThingDef>

  <ThingDef ParentName="BaseBullet">
    <defName>PN_Bullet_Shell_HighExplosive</defName>
    <label>high-explosive shell</label>
    <graphicData>
      <texPath>Things/Projectile/ShellHighExplosive</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <shaderType>TransparentPostLight</shaderType>
    </graphicData>
    <thingClass>Projectile_Explosive</thingClass>
    <projectile>
      <damageDef>Bomb</damageDef>
      <!-- damage amount is the damage def default -->
      <speed>100</speed>
      <explosionRadius>3.9</explosionRadius>
      <flyOverhead>true</flyOverhead>
      <soundHitThickRoof>Artillery_HitThickRoof</soundHitThickRoof>
      <soundExplode>MortarBomb_Explode</soundExplode>
      <soundImpactAnticipate>MortarRound_PreImpact</soundImpactAnticipate>
      <soundAmbient>MortarRound_Ambient</soundAmbient>
    </projectile>
  </ThingDef>
</Defs>