# SPDX-FileCopyrightText: 2021 Julian Giebel <j.giebel@netrocks.info>
# SPDX-FileCopyrightText: 2021 Julian Giebel <juliangiebel@live.de>
# SPDX-FileCopyrightText: 2022 Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Profane McBane <profanedbane+github@gmail.com>
# SPDX-FileCopyrightText: 2022 keronshb <54602815+keronshb@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2023 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 degradka <69397649+degradka@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: DisposalMachineFrame
  name: high pressure machine frame
  description: A machine frame made to withstand the amount of pressure used in the station's disposal system.
  placement:
    mode: SnapgridCenter
  components:
    - type: Transform
      anchored: true
      noRot: true
    - type: Physics
      bodyType: Static
    - type: Fixtures
      fixtures:
        fix1:
          shape:
            !type:PhysShapeAabb
            bounds: "-0.25,-0.4,0.25,0.4"
          density: 190
          mask:
          - MachineMask
          layer:
          - MachineLayer
    - type: Clickable
    - type: InteractionOutline
    - type: Anchorable
    - type: Pullable
    - type: Construction
      graph: DisposalMachine
      node: frame
    - type: Damageable
      damageContainer: StructuralInorganic
      damageModifierSet: Metallic
    - type: Destructible
      thresholds:
        - trigger:
            !type:DamageTrigger
            damage: 100
          behaviors:
            - !type:PlaySoundBehavior
              sound:
                collection: MetalBreak
            - !type:ChangeConstructionNodeBehavior
              node: start
            - !type:DoActsBehavior
              acts: [ "Destruction" ]
    - type: Sprite
      sprite: Structures/Piping/high_pressure_machine_frame.rsi
      layers:
      - state: frame
        map: [ "enum.ConstructionVisuals.Layer" ]
    - type: Appearance
    - type: GenericVisualizer
      visuals:
        enum.ConstructionVisuals.Key:
          enum.ConstructionVisuals.Layer:
            frame_cable: { state: frame_cables }
            frame_electronics: { state: frame_electronics }
            frame_unit: { state: frame_unit }
            frame_mailing: { state: frame_unit } # not a typo, there is no frame_mailing state.
            frame_inlet: { state: frame_inlet }
            frame_outlet: { state: frame_outlet }