- type: entity
  id: BasePowerCell
  abstract: true
  parent: BaseItem
  components:
  - type: Item
    storedRotation: -90
  - type: Battery
    pricePerJoule: 0.15
  - type: PowerCell
  - type: Explosive
    explosionType: Default
    maxIntensity: 200
    intensitySlope: 1.5
  - type: Sprite
    sprite: Objects/Power/power_cells.rsi
  - type: SolutionContainerManager
    solutions:
      battery:
        maxVol: 5
  - type: InjectableSolution
    solution: battery
  - type: DrawableSolution
    solution: battery
  - type: Extractable
    juiceSolution:
      reagents:
        - ReagentId: Zinc
          Quantity: 5
  - type: Tag
    tags:
      - PowerCell
  - type: Riggable
  - type: Appearance
  - type: BatteryVisuals
  - type: GenericVisualizer
    visuals:
      enum.BatteryVisuals.State:
        enum.PowerCellVisualLayers.Unshaded:
          Full: {visible: true, state: o2}
          Neither: {visible: true, state: o1}
          Empty: {visible: false}

- type: entity
  name: potato battery
  description: Someone's stuck two nails and some wire in a large potato. Somehow it provides a little charge.
  id: PowerCellPotato
  parent: BasePowerCell
  components:
  - type: Sprite
    layers:
    - state: potato
  - type: Battery
    maxCharge: 70
    startingCharge: 70
  - type: Tag
    tags:
      - PotatoBattery
  - type: Construction
    graph: PowerCellPotato
    node: potatobattery

- type: entity
  name: small-capacity power cell
  description: A rechargeable power cell. This is the cheapest kind you can find.
  id: PowerCellSmall
  suffix: Full
  parent: BasePowerCell
  components:
  - type: Sprite
    layers:
    - map: [ "enum.PowerCellVisualLayers.Base" ]
      state: small
    - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
      state: o2
      shader: unshaded
  - type: Battery
    maxCharge: 360
    startingCharge: 360
  - type: Tag
    tags:
      - PowerCellSmall

- type: entity
  id: PowerCellSmallPrinted
  suffix: Empty
  parent: PowerCellSmall
  components:
  - type: Sprite
    layers:
      - map: [ "enum.PowerCellVisualLayers.Base" ]
        state: small
      - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
        state: o2
        shader: unshaded
        visible: false
  - type: Battery
    maxCharge: 360
    startingCharge: 0

- type: entity
  parent: PowerCellSmall
  id: PowerCellSmallNuclear
  name: small-capacity nuclear power cell
  description: A self rechargeable power cell, designed for fast recharge rate at the expense of capacity.
  components:
  - type: BatterySelfRecharger
    autoRechargeRate: 36 # 10 seconds to recharge
    autoRechargePauseTime: 30

- type: entity
  name: medium-capacity power cell
  description: A rechargeable power cell. This is the popular and reliable version.
  id: PowerCellMedium
  suffix: Full
  parent: BasePowerCell
  components:
  - type: Sprite
    layers:
    - map: [ "enum.PowerCellVisualLayers.Base" ]
      state: medium
    - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
      state: o2
      shader: unshaded
  - type: Battery
    maxCharge: 720
    startingCharge: 720

- type: entity
  id: PowerCellMediumPrinted
  suffix: Empty
  parent: PowerCellMedium
  components:
  - type: Sprite
    layers:
      - map: [ "enum.PowerCellVisualLayers.Base" ]
        state: medium
      - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
        state: o2
        shader: unshaded
        visible: false
  - type: Battery
    maxCharge: 720
    startingCharge: 0

- type: entity
  name: high-capacity power cell
  description: A rechargeable standardized power cell. This premium brand stores up to 50% more energy than the competition.
  id: PowerCellHigh
  suffix: Full
  parent: BasePowerCell
  components:
  - type: Sprite
    layers:
    - map: [ "enum.PowerCellVisualLayers.Base" ]
      state: high
    - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
      state: o2
      shader: unshaded
  - type: Battery
    maxCharge: 1080
    startingCharge: 1080

- type: entity
  id: PowerCellHighPrinted
  suffix: Empty
  parent: PowerCellHigh
  components:
  - type: Sprite
    layers:
      - map: [ "enum.PowerCellVisualLayers.Base" ]
        state: high
      - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
        state: o2
        shader: unshaded
        visible: false
  - type: Battery
    maxCharge: 1080
    startingCharge: 0

- type: entity
  name: hyper-capacity power cell
  description: A rechargeable standardized power cell. This iteration pushes the upper limits of portable power storage, boasting 66% more capacity than its predecessor.
  id: PowerCellHyper
  suffix: Full
  parent: BasePowerCell
  components:
  - type: Sprite
    layers:
    - map: [ "enum.PowerCellVisualLayers.Base" ]
      state: hyper
    - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
      state: o2
      shader: unshaded
  - type: Battery
    maxCharge: 1800
    startingCharge: 1800

- type: entity
  id: PowerCellHyperPrinted
  suffix: Empty
  parent: PowerCellHyper
  components:
  - type: Sprite
    layers:
      - map: [ "enum.PowerCellVisualLayers.Base" ]
        state: hyper
      - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
        state: o2
        shader: unshaded
        visible: false
  - type: Battery
    maxCharge: 1800
    startingCharge: 0

- type: entity
  parent: BasePowerCell
  id: PowerCellMicroreactor
  name: microreactor power cell
  description: A rechargeable standardized microreactor cell. Has lower capacity but slowly recharges by itself.
  suffix: Full
  components:
  - type: Sprite
    layers:
    - map: [ "enum.PowerCellVisualLayers.Base" ]
      state: microreactor
    - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
      state: o2
      shader: unshaded
  - type: Battery
    maxCharge: 720
    startingCharge: 720
  - type: BatterySelfRecharger
    autoRechargeRate: 12 # takes 1 minute to charge itself back to full

- type: entity
  parent: PowerCellMicroreactor
  id: PowerCellMicroreactorPrinted
  suffix: Empty
  components:
  - type: Sprite
    layers:
    - map: [ "enum.PowerCellVisualLayers.Base" ]
      state: microreactor
    - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
      state: o2
      shader: unshaded
      visible: false
  - type: Battery
    startingCharge: 0

- type: entity
  name: antique power cell prototype
  description: A small cell that self recharges. Used in old laser arms research.
  id: PowerCellAntiqueProto
  parent: BasePowerCell
  components:
    - type: Sprite
      layers:
      - map: [ "enum.PowerCellVisualLayers.Base" ]
        state: antique
      - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
        state: o2
        shader: unshaded
    - type: Battery
      maxCharge: 1200
      startingCharge: 1200
    - type: BatterySelfRecharger
      autoRechargeRate: 40

# Power cage (big heavy power cell for big devices)

- type: entity
  id: BasePowerCage
  abstract: true
  parent: BasePowerCell
  components:
  - type: Item
    size: Ginormous
  - type: MultiHandedItem
  - type: SolutionContainerManager
    solutions:
      battery:
        maxVol: 15
  - type: Extractable
    juiceSolution:
      reagents:
        - ReagentId: Zinc
          Quantity: 15
  - type: Tag
    tags:
      - PowerCage
  - type: ClothingSpeedModifier
    walkModifier: 0.8
    sprintModifier: 0.8
  - type: HeldSpeedModifier

- type: entity
  id: PowerCageSmall
  parent: BasePowerCage
  name: small-capacity power cage
  description: A rechargeable power cage for big devices. This is the cheapest kind you can find.
  components:
  - type: Sprite
    sprite: Objects/Power/power_cages.rsi
    layers:
    - map: [ "enum.PowerCellVisualLayers.Base" ]
      state: small
    - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
      state: o2
      shader: unshaded
  - type: Battery
    maxCharge: 1400
    startingCharge: 1400

- type: entity
  id: PowerCageMedium
  parent: BasePowerCage
  name: medium-capacity power cage
  description: A rechargeable power cage for big devices. The gold standard of capacity and cost.
  components:
  - type: Sprite
    sprite: Objects/Power/power_cages.rsi
    layers:
    - map: [ "enum.PowerCellVisualLayers.Base" ]
      state: medium
    - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
      state: o2
      shader: unshaded
  - type: Battery
    maxCharge: 2700
    startingCharge: 2700

- type: entity
  id: PowerCageHigh
  parent: BasePowerCage
  name: high-capacity power cage
  description: A rechargeable power cage for big devices. Increased capacity for increased power levels.
  components:
  - type: Sprite
    sprite: Objects/Power/power_cages.rsi
    layers:
    - map: [ "enum.PowerCellVisualLayers.Base" ]
      state: high
    - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
      state: o2
      shader: unshaded
  - type: Battery
    maxCharge: 6200
    startingCharge: 6200

- type: entity
  id: PowerCageSmallEmpty
  parent: PowerCageSmall
  suffix: Empty
  components:
  - type: Sprite
    sprite: Objects/Power/power_cages.rsi
    layers:
    - map: [ "enum.PowerCellVisualLayers.Base" ]
      state: small
    - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
      state: o2
      shader: unshaded
      visible: false
  - type: Battery
    maxCharge: 1400
    startingCharge: 0

- type: entity
  id: PowerCageMediumEmpty
  parent: PowerCageMedium
  suffix: Empty
  components:
  - type: Sprite
    sprite: Objects/Power/power_cages.rsi
    layers:
    - map: [ "enum.PowerCellVisualLayers.Base" ]
      state: small
    - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
      state: o2
      shader: unshaded
      visible: false
  - type: Battery
    startingCharge: 0

- type: entity
  id: PowerCageHighEmpty
  parent: PowerCageHigh
  suffix: Empty
  components:
  - type: Sprite
    sprite: Objects/Power/power_cages.rsi
    layers:
    - map: [ "enum.PowerCellVisualLayers.Base" ]
      state: small
    - map: [ "enum.PowerCellVisualLayers.Unshaded" ]
      state: o2
      shader: unshaded
      visible: false
  - type: Battery
    startingCharge: 0
