<?xml version="1.0" encoding="utf-8"?>
<Items>
  <Item name="" identifier="defibrillator" category="Equipment" cargocontaineridentifier="mediccrate" Tags="smallitem,medical" description="" useinhealthinterface="True" scale="0.3">
    <PreferredContainer primary="medcab" minamount="1" maxamount="1" spawnprobability="1" />
    <PreferredContainer primary="wreckmedcab,abandonedmedcab" minamount="1" maxamount="1" spawnprobability="0.3" />
    <Fabricate suitablefabricators="fabricator" requiredtime="10">
      <RequiredSkill identifier="electrical" level="40" />
      <RequiredSkill identifier="medical" level="30" />
      <RequiredItem identifier="plastic" mincondition="0.5" usecondition="true" />
      <RequiredItem identifier="fpgacircuit" />
      <RequiredItem identifier="aluminium" mincondition="0.5" usecondition="true" />
    </Fabricate>
    <Deconstruct time="5">
      <Item identifier="plastic" mincondition="0.1" />
      <Item identifier="copper" mincondition="0.1" />
    </Deconstruct>
    <Price baseprice="100" soldbydefault="false">
      <Price storeidentifier="merchantmedical" sold="true" multiplier="0.9" />
    </Price>
    <InventoryIcon texture="%ModDir%/Images/InventoryItemIconAtlas.png" sourcerect="128,196,64,64" origin="0.5,0.5" />
    <Sprite texture="%ModDir%/Images/InGameItemIconAtlas.png" sourcerect="768,128,128,128" depth="0.55" origin="0.5,0.5" />
    <Body width="90" height="80" density="20" />
    <SuitableTreatment identifier="tachycardia" suitability="50" />
    <SuitableTreatment identifier="fibrillation" suitability="50" />
    <SuitableTreatment identifier="cardiacarrest" suitability="10" />
    <!-- TODO: improvements: must aim it on the person to successfully apply the effect, remove code for application from health UI and might need use of a Lua XML hook -->
    <MeleeWeapon slots="RightHand+LeftHand,Any" controlpose="true" aimpos="5,0" handle1="-5,0" holdangle="10" reload="9.0">
      <RequiredItems identifier="mobilebattery" type="Contained" msg="ItemMsgBatteryCellRequired" />
      <StatusEffect type="OnUse" target="This" Condition="-100" />
      <StatusEffect type="OnBroken" target="This" Condition="100" disabledeltatime="true" delay="5" stackable="false" />
    </MeleeWeapon>
    <Pickable msg="ItemMsgPickUpSelect" />
    <ItemContainer capacity="1" maxstacksize="60" hideitems="true" containedstateindicatorstyle="battery">
      <Containable items="mobilebattery" />
    </ItemContainer>
  </Item>
  <Item name="" identifier="aed" category="Equipment" cargocontaineridentifier="mediccrate" Tags="smallitem,medical" description="" useinhealthinterface="True" scale="0.3">
    <PreferredContainer primary="medcab" />
    <Fabricate suitablefabricators="fabricator" requiredtime="40">
      <RequiredSkill identifier="electrical" level="50" />
      <RequiredSkill identifier="medical" level="40" />
      <RequiredItem identifier="plastic" />
      <RequiredItem identifier="fpgacircuit" />
      <RequiredItem identifier="fulgurium" />
    </Fabricate>
    <Deconstruct time="5">
      <Item identifier="plastic" />
      <Item identifier="copper" />
    </Deconstruct>
    <Price baseprice="400" soldbydefault="false" />
    <InventoryIcon texture="%ModDir%/Images/InventoryItemIconAtlas.png" sourcerect="64,0,64,64" origin="0.5,0.5" />
    <Sprite texture="%ModDir%/Images/InGameItemIconAtlas.png" sourcerect="128,0,128,128" depth="0.55" origin="0.5,0.5" />
    <Body width="90" height="80" density="20" />
    <SuitableTreatment identifier="tachycardia" suitability="60" />
    <SuitableTreatment identifier="fibrillation" suitability="60" />
    <SuitableTreatment identifier="cardiacarrest" suitability="15" />
    <!-- TODO: improvements: must aim it on the person to successfully apply the effect, remove code for application from health UI and might need use of a Lua XML hook -->
    <MeleeWeapon slots="RightHand+LeftHand,Any" controlpose="true" aimpos="5,0" handle1="-5,0" holdangle="10" reload="9.0">
      <RequiredItems identifier="mobilebattery" type="Contained" msg="ItemMsgBatteryCellRequired" />
      <StatusEffect type="OnUse" target="This" Condition="-100" />
      <StatusEffect type="OnBroken" target="This" Condition="100" disabledeltatime="true" delay="5" stackable="false" />
    </MeleeWeapon>
    <Pickable msg="ItemMsgPickUpSelect" />
    <ItemContainer capacity="1" maxstacksize="60" hideitems="true" containedstateindicatorstyle="battery">
      <Containable items="mobilebattery" />
    </ItemContainer>
  </Item>
</Items>