- type: entity
  abstract: true
  id: WireBase
  placement:
    mode: SnapgridCenter
  components:
  - type: Clickable
  - type: Physics
    fixtures:
      - shape:
          !type:PhysShapeAabb
            bounds: "-0.5, -0.5, 0.5, 0.5"
        layer:
        - Underplating
  - type: InteractionOutline
  - type: SnapGrid
  - type: Sprite
    netsync: false
    drawdepth: BelowFloor
  - type: IconSmooth
    mode: CardinalFlags
  - type: Damageable
    resistances: metallicResistances
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: SubFloorHide

- type: entity
  parent: WireBase
  id: HVWire
  name: HV Wire
  description: An orange high voltage power cable.
  components:
  - type: Sprite
    sprite: Constructible/Power/Wires/hv_cable.rsi
    state: hvcable_0
  - type: Icon
    sprite: Constructible/Power/Wires/hv_cable.rsi
    state: hvcable_4
  - type: IconSmooth
    base: hvcable_
    key: hv_cables
  - type: NodeContainer
    nodes:
      power:
        !type:AdjacentNode
        nodeGroupID: HVPower
      wire:
        !type:AdjacentNode
        nodeGroupID: WireNet
  - type: Wire
    wireDroppedOnCutPrototype: HVWireStack1
    wireType: HighVoltage
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          HVWireStack1:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]

- type: entity
  parent: WireBase
  id: MVWire
  name: MV Wire
  description: A medium voltage power cable.
  components:
  - type: Sprite
    color: Yellow
    sprite: Constructible/Power/Wires/mv_cable.rsi
    state: mvcable_0
  - type: Icon
    color: Yellow
    sprite: Constructible/Power/Wires/mv_cable.rsi
    state: mvcable_4
  - type: IconSmooth
    base: mvcable_
    key: mv_cables
  - type: NodeContainer
    nodes:
      power:
        !type:AdjacentNode
        nodeGroupID: MVPower
      wire:
        !type:AdjacentNode
        nodeGroupID: WireNet
  - type: Wire
    wireDroppedOnCutPrototype: MVWireStack1
    wireType: MediumVoltage
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          MVWireStack1:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]

- type: entity
  parent: WireBase
  id: ApcExtensionCable
  name: LV Wire
  description: A cable used to connect machines to an APC. #ACPs aren't area defined anymore so need this cable to connect things to the APC. This description should be dynamic in future.
  components:
  - type: Sprite
    color: Green
    sprite: Constructible/Power/Wires/lv_cable.rsi
    state: lvcable_0
  - type: Icon
    color: Green
    sprite: Constructible/Power/Wires/lv_cable.rsi
    state: lvcable_4
  - type: IconSmooth
    base: lvcable_
    key: lv_cables
  - type: NodeContainer
    nodes:
      power:
        !type:AdjacentNode
        nodeGroupID: Apc
      wire:
        !type:AdjacentNode
        nodeGroupID: WireNet
  - type: PowerProvider
    voltage: Apc
  - type: Wire
    wireDroppedOnCutPrototype: ApcExtensionCableStack1
    wireType: Apc
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          ApcExtensionCableStack1:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]

#Dummy wires

- type: entity
  abstract: true
  id: BaseDummyWire
  placement:
    mode: SnapgridCenter
  components:
  - type: SnapGrid
  - type: Sprite
    drawdepth: BelowFloor
  - type: IconSmooth
    mode: CardinalFlags
  - type: SubFloorHide

- type: entity
  abstract: true
  parent: BaseDummyWire
  id: HVDummyWire
  name: HV Connector Wire
  components:
  - type: Sprite
    sprite: Constructible/Power/Wires/hv_cable.rsi
    state: hvcable_0
  - type: IconSmooth
    base: hvcable_
    key: hv_cables

- type: entity
  abstract: true
  parent: BaseDummyWire
  id: MVDummyWire
  name: MV Connector Wire
  components:
  - type: Sprite
    sprite: Constructible/Power/Wires/mv_cable.rsi
    state: mvcable_0
    color: Yellow
  - type: IconSmooth
    base: mvcable_
    key: mv_cables

- type: entity
  abstract: true
  parent: BaseDummyWire
  id: LVDummyWire
  name: LV Connector Wire
  components:
  - type: Sprite
    sprite: Constructible/Power/Wires/lv_cable.rsi
    state: lvcable_0
    color: Green
  - type: IconSmooth
    base: lvcable_
    key: lv_cables
