# SPDX-FileCopyrightText: 2018 clusterfack <clusterfack@users.noreply.github.com>
# SPDX-FileCopyrightText: 2019 DamianX <DamianX@users.noreply.github.com>
# SPDX-FileCopyrightText: 2019 L.E.D <10257081+unusualcrow@users.noreply.github.com>
# SPDX-FileCopyrightText: 2019 Odin Hultgren Van Der Horst <odinhorst@hotmail.com>
# SPDX-FileCopyrightText: 2020 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 Campbell Suter <znix@znix.xyz>
# SPDX-FileCopyrightText: 2020 ComicIronic <comicironic@gmail.com>
# SPDX-FileCopyrightText: 2020 Exp <theexp111@gmail.com>
# SPDX-FileCopyrightText: 2020 Hugo Laloge <hugo.laloge@gmail.com>
# SPDX-FileCopyrightText: 2020 Paul Ritter <ritter.paul1@googlemail.com>
# SPDX-FileCopyrightText: 2020 Pieter-Jan Briers <pieterjan.briers@gmail.com>
# SPDX-FileCopyrightText: 2020 Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 Víctor Aguilera Puerto <zddm@outlook.es>
# SPDX-FileCopyrightText: 2020 ike709 <ike709@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 py01 <60152240+collinlunn@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 py01 <pyronetics01@gmail.com>
# SPDX-FileCopyrightText: 2020 silicons <2003111+silicons@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 20kdc <asdd2808@gmail.com>
# SPDX-FileCopyrightText: 2021 Acruid <shatter66@gmail.com>
# SPDX-FileCopyrightText: 2021 Galactic Chimp <GalacticChimpanzee@gmail.com>
# SPDX-FileCopyrightText: 2021 Julian Giebel <j.giebel@netrocks.info>
# SPDX-FileCopyrightText: 2021 Julian Giebel <juliangiebel@live.de>
# SPDX-FileCopyrightText: 2021 Metal Gear Sloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2021 SETh lafuente <cetaciocascarudo@gmail.com>
# SPDX-FileCopyrightText: 2021 SethLafuente <84478872+SethLafuente@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <zddm@outlook.es>
# SPDX-FileCopyrightText: 2021 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2021 tmtmtl30 <53132901+tmtmtl30@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Alex Evgrashin <aevgrashin@yandex.ru>
# SPDX-FileCopyrightText: 2022 Andreas Kämper <andreas@kaemper.tech>
# SPDX-FileCopyrightText: 2022 Flipp Syder <76629141+vulppine@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Joosep Jääger <joosep.jaager@gmail.com>
# SPDX-FileCopyrightText: 2022 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 Moony <moonheart08@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 WlarusFromDaSpace <44726328+WlarusFromDaSpace@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 lajolico <55922029+lajolico@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Guilherme Ornel <86210200+joshepvodka@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Morb <14136326+Morb0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 TemporalOroboros <TemporalOroboros@gmail.com>
# SPDX-FileCopyrightText: 2023 Tom Leys <tom@crump-leys.com>
# SPDX-FileCopyrightText: 2023 chromiumboy <50505512+chromiumboy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 c4llv07e <38111072+c4llv07e@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 BombasterDS <deniskaporoshok@gmail.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 K-Dynamic <20566341+K-Dynamic@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: HighSecDoor
  parent: BaseStructure
  name: high security door
  description: Keeps the bad out and keeps the good in.
  placement:
    mode: SnapgridCenter
  components:
  - type: StationAiWhitelist
  - type: InteractionOutline
  - type: Sprite
    sprite: Structures/Doors/Airlocks/highsec/highsec.rsi
    layers:
    - state: closed
      map: ["enum.DoorVisualLayers.Base"]
    - state: closed_unlit
      shader: unshaded
      map: ["enum.DoorVisualLayers.BaseUnlit"]
      visible: false
    - state: welded
      map: ["enum.WeldableLayers.BaseWelded"]
    - state: bolted_unlit
      shader: unshaded
      map: ["enum.DoorVisualLayers.BaseBolted"]
    - state: emergency_unlit
      map: ["enum.DoorVisualLayers.BaseEmergencyAccess"]
      shader: unshaded
    - state: panel_open
      map: ["enum.WiresVisualLayers.MaintenancePanel"]
    - state: electrified_ai
      sprite: Interface/Misc/ai_hud.rsi
      shader: unshaded
      visible: false
      map: ["enum.ElectrifiedLayers.HUD"]
    - state: electrified
      sprite: Effects/electricity.rsi
      shader: unshaded
      visible: false
      map: ["enum.ElectrifiedLayers.Sparks"]
  - type: AnimationPlayer
  - type: Physics
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.49,-0.49,0.49,0.49" # don't want this colliding with walls or they won't close
        density: 100
        mask:
        - FullTileMask
        layer:
        - WallLayer
  - type: ContainerFill
    containers:
      board: [ DoorElectronics ]
  - type: ContainerContainer
    containers:
      board: !type:Container
  - type: Door
    crushDamage:
      types:
        Blunt: 50
    openSound:
      path: /Audio/Machines/airlock_open.ogg
    closeSound:
      path: /Audio/Machines/airlock_close.ogg
    denySound:
      path: /Audio/Machines/airlock_deny.ogg
  - type: Weldable
    fuel: 10
    time: 10
  - type: Airlock
  - type: NavMapDoor
  - type: DoorBolt
  - type: AccessReader
    containerAccessProvider: board
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.ElectrifiedVisuals.ShowSparks:
        enum.ElectrifiedLayers.Sparks:
          True: { visible: True }
          False: { visible: False }
  - type: WiresVisuals
  - type: ElectrocutionHUDVisuals
  - type: ApcPowerReceiver
    powerLoad: 20
  - type: ExtensionCableReceiver
  - type: Electrified
    enabled: false
    usesApcPower: true
  - type: WiresPanel
  - type: WiresPanelSecurity
    securityLevel: maxSecurity
  - type: Wires
    boardName: wires-board-name-highsec
    layoutId: HighSec
    alwaysRandomize: true
  - type: UserInterface
    interfaces:
      enum.AiUi.Key:
        type: StationAiBoundUserInterface
      enum.WiresUiKey.Key:
        type: WiresBoundUserInterface
  - type: Airtight
  - type: Occluder
  - type: Damageable
    damageContainer: StructuralInorganic
    damageModifierSet: StrongMetallic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 1500
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: Construction
    graph: Airlock
    node: highSecDoor
  - type: Tag
    tags:
      - HighSecDoor
      # This tag is used to nagivate the Airlock construction graph. It's needed because this construction graph is shared between Airlock, AirlockGlass, and HighSecDoor
  - type: Penetratable # Goobstation - Better snipers
    penetrateDamage: 200
    damagePenalty: 0.4
  - type: WeldingSparksAnimation # Goobstation
    startingOffset: 0, 0.5
