# SPDX-FileCopyrightText: 2023 Jeff <velcroboy333@hotmail.com>
# SPDX-FileCopyrightText: 2023 Kevin Zheng <kevinz5000@gmail.com>
# SPDX-FileCopyrightText: 2023 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Velcroboy <107660393+IamVelcroboy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 chromiumboy <50505512+chromiumboy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Alice 'Arimah' Heurlin <30327355+arimah@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 JustCone <141039037+JustCone14@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mervill <mervills.email@gmail.com>
# SPDX-FileCopyrightText: 2024 PJBot <pieterjan.briers+bot@gmail.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 PopGamer46 <yt1popgamer@gmail.com>
# SPDX-FileCopyrightText: 2024 Spessmann <156740760+Spessmann@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TsjipTsjip <19798667+TsjipTsjip@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Winkarst <74284083+Winkarst-cpu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 coolboy911 <85909253+coolboy911@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 keronshb <54602815+keronshb@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lunarcomets <140772713+lunarcomets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 saintmuntzer <47153094+saintmuntzer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 starch <starchpersonal@gmail.com>
# SPDX-FileCopyrightText: 2024 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 whateverusername0 <whateveremail>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  parent: BaseItem
  id: AccessConfigurator
  name: access configurator
  description: Used to modify the access level requirements for airlocks and other lockable devices.
  components:
    - type: EmitSoundOnLand
      sound:
        path: /Audio/Items/multitool_drop.ogg
    - type: Sprite
      sprite: Objects/Tools/access_configurator.rsi
      state: icon
    - type: Item
      size: Small
    - type: Clothing
      sprite: Objects/Tools/access_configurator.rsi
      quickEquip: false
      slots:
        - Belt
    - type: AccessOverrider
      accessLevels:
      - Armory
      - Atmospherics
      - Bar
      - Brig
      - Detective
      - Captain
      - Cargo
      - Chapel
      - Chemistry
      - ChiefEngineer
      - ChiefMedicalOfficer
      - Command
      - Engineering
      - External
      - HeadOfPersonnel
      - HeadOfSecurity
      - Hydroponics
      - Janitor
      - Kitchen
      - Lawyer
      - Maintenance
      - Medical
      - Quartermaster
      - Research
      - Robotics # goobstation
      - Journalism # goobstation
      - ResearchDirector
      - Salvage
      - Security
      - Service
      - Theatre
      - GenpopEnter
      - GenpopLeave
      privilegedIdSlot:
        name: id-card-console-privileged-id
        ejectSound: /Audio/Machines/id_swipe.ogg
        insertSound: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
        ejectOnBreak: true
        swap: false
        whitelist:
          components:
          - IdCard
      denialSound:
        path: /Audio/Machines/custom_deny.ogg
      doAfter: 0.5
    - type: UserInterface
      interfaces:
        enum.AccessOverriderUiKey.Key:
          type: AccessOverriderBoundUserInterface
    - type: ActivatableUI
      key: enum.AccessOverriderUiKey.Key
      requiresComplex: true
      requireActiveHand: false
      singleUser: true
      inHandsOnly: true
    - type: ItemSlots
    - type: ContainerContainer
      containers:
        AccessOverrider-privilegedId: !type:ContainerSlot

- type: entity
  parent: AccessConfigurator
  id: AccessConfiguratorUniversal
  name: universal access configurator
  suffix: Admin
  description: A modified access configurator used only by the mythical Administrator.
  components:
  - type: Sprite
    sprite: Objects/Tools/universal_access_configurator.rsi
  - type: Clothing
    sprite: Objects/Tools/universal_access_configurator.rsi
  - type: AccessOverrider
    accessLevels:
    - Armory
    - Atmospherics
    - Bar
    - BasicSilicon
    - Borg
    - Brig
    - Detective
    - Captain
    - Cargo
    - Chapel
    - Chemistry
    - ChiefEngineer
    - ChiefMedicalOfficer
    - Command
    - Cryogenics
    - EmergencyShuttleRepealAll
    - Engineering
    - External
    - HeadOfPersonnel
    - HeadOfSecurity
    - Hydroponics
    - Janitor
    - Kitchen
    - Lawyer
    - Maintenance
    - Medical
    - Quartermaster
    - Research
    - ResearchDirector
    - Salvage
    - Security
    - Service
    - StationAi
    - Theatre
    - CentralCommand
    - NuclearOperative
    - SyndicateAgent
    - NanotrasenRepresentative # goobstation
    - BlueshieldOfficer # goobstation
    - Robotics # goobstation
    - Journalism # goobstation
    - Wizard
    - Xenoborg
    - GenpopEnter
    - GenpopLeave
    privilegedIdSlot:
      name: id-card-console-privileged-id
      startingItem: UniversalIDCard
      ejectSound: /Audio/Machines/id_swipe.ogg
      insertSound: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
      ejectOnBreak: true
      swap: false
      whitelist:
        components:
        - IdCard
    denialSound:
      path: /Audio/Machines/custom_deny.ogg
    doAfter: 0.5
