# SPDX-FileCopyrightText: 2021 Elijahrane <60792108+Elijahrane@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Mith-randalf <84274729+Mith-randalf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2022 ElectroJr <leonsfriedrich@gmail.com>
# SPDX-FileCopyrightText: 2022 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 Lamrr <96937466+Lamrr@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 Rane <60792108+Elijahrane@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 moonheart08 <moonheart08@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 theashtronaut <112137107+theashtronaut@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Jeff <velcroboy333@hotmail.com>
# SPDX-FileCopyrightText: 2023 MagnusCrowe <whiterider1988@yahoo.com>
# SPDX-FileCopyrightText: 2023 Maxtone <124747282+MagnusCrowe@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Nim <128169402+Nimfar11@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Puro <103608145+PuroSlavKing@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 TemporalOroboros <TemporalOroboros@gmail.com>
# SPDX-FileCopyrightText: 2023 Tunguso4ka <71643624+Tunguso4ka@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Velcroboy <107660393+ChilbroBaggins@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 BombasterDS <115770678+BombasterDS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ty Ashley <42426760+TyAshley@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Vasilis <vasilis@pikachu.systems>
# SPDX-FileCopyrightText: 2024 crazybrain23 <44417085+crazybrain23@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 potato1234_x <79580518+potato1234x@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Fishbait <Fishbait@git.ml>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 fishbait <gnesse@gmail.com>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: LockerBooze
  parent: LockerBase
  name: booze storage
  description: This is where the bartender keeps the booze.
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: cabinet
    stateDoorOpen: cabinet_open
    stateDoorClosed: cabinet_door

  - type: AccessReader
    access: [["Bar"]]
  - type: EntityStorage
    closeSound:
      path: /Audio/Effects/woodenclosetclose.ogg
    openSound:
      path: /Audio/Effects/woodenclosetopen.ogg
  - type: PhysicalComposition #Goobstation - Recycle update
    materialComposition:
      Wood: 100
      Steel: 25
  - type: Paintable
    group: null # not shaped like other lockers

# Basic
- type: entity
  id: LockerSteel
  parent: LockerBaseSecure
  name: secure closet
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: secure
    stateDoorOpen: secure_open
    stateDoorClosed: secure_door

# Cargo
- type: entity
  id: LockerQuarterMaster
  parent: LockerBaseSecure
  name: quartermaster's locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: qm
    stateDoorOpen: qm_open
    stateDoorClosed: qm_door
  - type: AccessReader
    access: [["Quartermaster"]]

- type: entity
  id: LockerSalvageSpecialist
  parent: LockerBase
  name: salvage specialist's equipment
  description: Nevermind the pickaxe.
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: mining
    stateDoorOpen: mining_open
    stateDoorClosed: mining_door
  - type: AccessReader
    access: [["Salvage"]]

# Command
- type: entity
  id: LockerCaptain
  parent: LockerBaseSecure
  name: captain's locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: cap
    stateDoorOpen: cap_open
    stateDoorClosed: cap_door
  - type: AccessReader
    access: [["Captain"]]

- type: entity
  id: LockerHeadOfPersonnel
  parent: LockerBaseSecure
  name: head of personnel's locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: hop
    stateDoorOpen: hop_open
    stateDoorClosed: hop_door
  - type: AccessReader
    access: [["HeadOfPersonnel"]]

# CE
- type: entity
  id: LockerChiefEngineer
  parent: LockerBaseSecure
  name: chief engineer's locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: ce
    stateDoorOpen: ce_open
    stateDoorClosed: ce_door
  - type: AccessReader
    access: [ [ "ChiefEngineer" ] ]

# Electrical supplies
- type: entity
  id: LockerElectricalSupplies
  parent: LockerBase
  name: electrical supplies locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: eng
    stateDoorOpen: eng_open
    stateDoorClosed: eng_elec_door
  - type: AccessReader
    access: [ [ "Engineering" ] ]

# Welding supplies
- type: entity
  id: LockerWeldingSupplies
  parent: LockerBase
  name: welding supplies locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: eng
    stateDoorOpen: eng_open
    stateDoorClosed: eng_weld_door
  - type: AccessReader
    access: [ [ "Engineering" ] ]

# Atmos tech
- type: entity
  id: LockerAtmospherics
  parent: LockerBase
  name: atmospheric technician's locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: atmos
    stateDoorOpen: atmos_open
    stateDoorClosed: atmos_door
  - type: AccessReader
    access: [ [ "Atmospherics" ] ]

# Engineer
- type: entity
  id: LockerEngineer
  parent: LockerBase
  name: engineer's locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: eng_secure
    stateDoorOpen: eng_secure_open
    stateDoorClosed: eng_secure_door
  - type: AccessReader
    access: [ [ "Engineering" ] ]

# Evac Repair
- type: entity
  parent: LockerBase
  id: LockerEvacRepair
  name: emergency shuttle emergency locker
  description: It's emergencies all the way down.
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: eng
    stateDoorOpen: eng_open
    stateDoorClosed: eng_evac_door
  - type: AccessReader
    access: [ [ "Engineering" ] ]

# Freezer
- type: entity
  id: LockerFreezerBase
  parent: LockerBase
  name: freezer
  suffix: No Access
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: freezer
    stateDoorOpen: freezer_open
    stateDoorClosed: freezer_door
  - type: ExplosionResistance
    damageCoefficient: 0.01
  - type: AntiRottingContainer
  - type: Construction
    graph: ClosetFreezer
    node: done
    containers:
    - entity_storage
  - type: Paintable
    group: null

- type: entity
  id: LockerFreezer
  parent: LockerFreezerBase
  name: freezer
  suffix: Kitchen, Locked
  components:
  - type: AccessReader
    access: [ [ "Kitchen" ] ]

# Botanist
- type: entity
  id: LockerBotanist
  parent: LockerBase
  name: botanist's locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: hydro
    stateDoorOpen: hydro_open
    stateDoorClosed: hydro_door
  - type: AccessReader
    access: [ [ "Hydroponics" ] ]

# Medicine
- type: entity
  id: LockerMedicine
  parent: LockerBase
  name: medicine locker
  description: Filled to the brim with medical junk.
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: med
    stateDoorOpen: med_open
    stateDoorClosed: med_door
  - type: AccessReader
    access: [ [ "Medical" ] ]

# Medical doctor
- type: entity
  id: LockerMedical
  parent: LockerBase
  name: medical doctor's locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: med_secure
    stateDoorOpen: med_secure_open
    stateDoorClosed: med_secure_door
  - type: AccessReader
    access: [ [ "Medical" ] ]

# Paramedic
- type: entity
  id: LockerParamedic
  parent: LockerBase
  name: paramedic's locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: paramed
    stateDoorOpen: paramed_open
    stateDoorClosed: paramed_door
  - type: AccessReader
    access: [ [ "Medical" ] ]


# Chemical
- type: entity
  id: LockerChemistry
  parent: LockerBase
  name: chemical locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: med
    stateDoorOpen: med_open
    stateDoorClosed: chemical_door
  - type: AccessReader
    access: [ [ "Chemistry" ] ]

# CMO
- type: entity
  id: LockerChiefMedicalOfficer
  parent: LockerBaseSecure
  name: chief medical officer's locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: cmo
    stateDoorOpen: cmo_open
    stateDoorClosed: cmo_door
  - type: AccessReader
    access: [ [ "ChiefMedicalOfficer" ] ]

# Science
- type: entity
  id: LockerResearchDirector
  parent: LockerBase
  name: research director's locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: rd
    stateDoorOpen: rd_open
    stateDoorClosed: rd_door
  - type: AccessReader
    access: [ [ "ResearchDirector" ] ]

- type: entity
  id: LockerScientist
  parent: LockerBase
  name: scientist's locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: science
    stateDoorOpen: science_open
    stateDoorClosed: science_door
  - type: AccessReader
    access: [ [ "Research" ] ]

# HoS
- type: entity
  id: LockerHeadOfSecurity
  parent: LockerBaseSecure
  name: head of security's locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: hos
    stateDoorOpen: hos_open
    stateDoorClosed: hos_door
  - type: AccessReader
    access: [["HeadOfSecurity"]]

# Warden
- type: entity
  id: LockerWarden
  parent: LockerBaseSecure
  name: warden's locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: warden
    stateDoorOpen: warden_open
    stateDoorClosed: warden_door
  - type: AccessReader
    access: [["Armory"]]

# Brigmedic
- type: entity
  id: LockerBrigmedic
  parent: LockerBaseSecure
  name: brigmedic locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: brigmedic
    stateDoorOpen: armory_open
    stateDoorClosed: brigmedic_door
  - type: AccessReader
    access: [["Security"]] # goob edit

# Security Officer
- type: entity
  id: LockerSecurity
  parent: LockerBaseSecure
  name: security officer's locker
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: sec
    stateDoorOpen: sec_open
    stateDoorClosed: sec_door
  - type: AccessReader
    access: [["Security"]]

- type: entity
  id: GunSafe
  parent: LockerBaseSecure
  name: gun safe
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: shotguncase
    stateDoorOpen: shotguncase_open
    stateDoorClosed: shotguncase_door
  - type: AccessReader
  - type: Construction
    graph: GunSafe
    node: done
    containers:
    - entity_storage
  - type: StaticPrice
    price: 660

- type: entity
  id: GunSafeBaseSecure
  parent: GunSafe
  suffix: Armory, Locked
  components:
  - type: AccessReader
    access: [["Armory"]]

# Genpop Storage
- type: entity
  id: GenpopBase
  abstract: true
  components:
  - type: GenpopLocker
  - type: EntityStorageVisuals
    stateBaseClosed: genpop
    stateDoorOpen: genpop_open
    stateDoorClosed: genpop_door_1
  - type: UserInterface
    interfaces:
      enum.GenpopLockerUiKey.Key:
        type: GenpopLockerBoundUserInterface
  - type: AccessReader # note! this access is for the UI, not the door. door access is handled on GenpopLocker
    access: [["Security"]]
  - type: Lock
    locked: false
    useAccess: false
  - type: EntityStorage
    open: True
    removedMasks: 20
  - type: PlaceableSurface
    isPlaceable: True

- type: entity
  parent: [ GenpopBase , LockerBaseSecure ]
  id: LockerPrisoner
  name: prisoner closet
  description: It's a secure locker for an inmate's personal belongings during their time in prison.
  suffix: 1
  components:
  - type: Fixtures
    fixtures:
      fix1:
        shape: !type:PolygonShape
          radius: 0.01
          vertices:
          - -0.25,-0.48
          - 0.25,-0.48
          - 0.25,0.48
          - -0.25,0.48
        mask:
        - Impassable
        - TableLayer
        - LowImpassable
        layer:
        - BulletImpassable
        - Opaque
        density: 75
        hard: True
        restitution: 0
        friction: 0.4

- type: entity
  parent: LockerPrisoner
  id: LockerPrisoner2
  suffix: 2
  components:
  - type: EntityStorageVisuals
    stateDoorClosed: genpop_door_2

- type: entity
  parent: LockerPrisoner
  id: LockerPrisoner3
  suffix: 3
  components:
  - type: EntityStorageVisuals
    stateDoorClosed: genpop_door_3

- type: entity
  parent: LockerPrisoner
  id: LockerPrisoner4
  suffix: 4
  components:
  - type: EntityStorageVisuals
    stateDoorClosed: genpop_door_4

- type: entity
  parent: LockerPrisoner
  id: LockerPrisoner5
  suffix: 5
  components:
  - type: EntityStorageVisuals
    stateDoorClosed: genpop_door_5

- type: entity
  parent: LockerPrisoner
  id: LockerPrisoner6
  suffix: 6
  components:
  - type: EntityStorageVisuals
    stateDoorClosed: genpop_door_6

- type: entity
  parent: LockerPrisoner
  id: LockerPrisoner7
  suffix: 7
  components:
  - type: EntityStorageVisuals
    stateDoorClosed: genpop_door_7

- type: entity
  parent: LockerPrisoner
  id: LockerPrisoner8
  suffix: 8
  components:
  - type: EntityStorageVisuals
    stateDoorClosed: genpop_door_8

# Detective
- type: entity
  id: LockerDetective
  parent: LockerBooze
  name: detective's cabinet
  description: Usually cold and empty... like your heart.
  components:
  - type: AccessReader
    access: [["Detective"]]

- type: entity
  id: LockerEvidence
  parent: LockerSecurity
  name: evidence locker
  description: To store bags of bullet casings and detainee belongings.
  components:
  - type: AccessReader
    access: [["Security"]]

# Syndicate
- type: entity
  id: LockerSyndicatePersonal
  name: armory closet
  parent: LockerBaseSecure
  description: It's a personal storage unit for operative gear.
  components:
  - type: Appearance
  - type: EntityStorageVisuals
    stateBaseClosed: syndicate
    stateDoorOpen: syndicate_open
    stateDoorClosed: syndicate_door

# Bluespace
- type: entity
  id: LockerBluespaceStation
  name: bluespace locker
  suffix: once to station
  parent: LockerSyndicatePersonal
  description: Advanced locker technology.
  components:
    - type: ArrivalsBlacklist
    - type: BluespaceLocker
      minBluespaceLinks: 1
      behaviorProperties:
        delay: 1
        actOnOpen: false
        bluespaceEffectOnInit: true
        bluespaceEffectOnTeleportSource: true
        bluespaceEffectOnTeleportTarget: true
        destroyAfterUses: 1
        destroyAfterUsesMinItemsToCountUse: 1
        destroyType: Delete
      autoLinksUseProperties: true
      autoLinkProperties:
        actOnOpen: false
        actOnClose: false
        destroyAfterUses: 2
        destroyType: DeleteComponent

# Clown
- type: entity
  id: LockerClown
  name: clown locker
  parent: LockerBaseSecure
  components:
  - type: Appearance
  - type: AccessReader
    access: [["Theatre"]]
  - type: EntityStorageVisuals
    stateBaseClosed: clown
    stateDoorOpen: clown_open
    stateDoorClosed: clown_door
  - type: StorageFill #Goobstation - clowncar
    contents:
    - id: VehicleClowncarTrainee
    - id: ClownMegaphone # goob - loudspeakers

# Mime
- type: entity
  id: LockerMime
  name: mime locker
  parent: LockerBaseSecure
  components:
  - type: Appearance
  - type: AccessReader
    access: [["Theatre"]]
  - type: EntityStorageVisuals
    stateBaseClosed: mime
    stateDoorOpen: mime_open
    stateDoorClosed: mime_door

# Representative
- type: entity
  id: LockerRepresentative
  name: representative locker
  parent: LockerBaseSecure
  components:
  - type: Appearance
  - type: AccessReader
    access: [["Command"]]
  - type: EntityStorageVisuals
    stateBaseClosed: hop
    stateDoorOpen: hop_open
    stateDoorClosed: representative_door
