# SPDX-FileCopyrightText: 2021 20kdc <asdd2808@gmail.com>
# SPDX-FileCopyrightText: 2021 Julian Giebel <j.giebel@netrocks.info>
# SPDX-FileCopyrightText: 2021 Julian Giebel <juliangiebel@live.de>
# SPDX-FileCopyrightText: 2021 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2021 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Moony <moonheart08@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Vordenburg <114301317+Vordenburg@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 chromiumboy <50505512+chromiumboy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: CableTerminal
  name: cable terminal
  description: You see a small warning on the red cables in grungy black ink. "CONNECT RED TO BATTERY FOR CHARGE."
  placement:
    mode: SnapgridCenter
  components:
    - type: Sprite
      sprite: Structures/Power/cable_terminal.rsi
      state: term
      drawdepth: BelowFloor
    - type: Clickable
    - type: InteractionOutline
    - type: CollideOnAnchor
    - type: Transform
      anchored: true
    - type: Damageable
      damageContainer: StructuralInorganic
      damageModifierSet: Metallic
    - type: RCDDeconstructable
      cost: 2
      delay: 0
      fx: EffectRCDConstruct0
    - type: Destructible
      thresholds:
        - trigger:
            !type:DamageTrigger
            damage: 100
          behaviors:
            - !type:DoActsBehavior
              acts: ["Destruction"]
    - type: Visibility
      layer: 1
    - type: Appearance
    - type: SubFloorHide
      blockAmbience: false
      blockInteractions: false
    - type: Construction
      graph: CableTerminal
      node: cable_terminal
    - type: NodeContainer
      nodes:
        # Just define nodes for both MV and HV. One will end up unused in 99% of cases
        # but it means one cable terminal type.
        powerHV:
          !type:CableTerminalNode
          nodeGroupID: HVPower
        powerMV:
          !type:CableTerminalNode
          nodeGroupID: MVPower

- type: entity
  id: CableTerminalUncuttable
  parent: CableTerminal
  suffix: uncuttable
  components:
  - type: Cable
    cuttingQuality: null
