# SPDX-FileCopyrightText: 2018 Pieter-Jan Briers <pieterjan.briers@gmail.com>
# SPDX-FileCopyrightText: 2019 Acruid <shatter66@gmail.com>
# SPDX-FileCopyrightText: 2019 PrPleGoo <PrPleGoo@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 Hugo Laloge <hugo.laloge@gmail.com>
# SPDX-FileCopyrightText: 2020 L.E.D <10257081+unusualcrow@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 Remie Richards <remierichards@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 moonheart08 <moonheart08@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 py01 <60152240+collinlunn@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 py01 <pyronetics01@gmail.com>
# SPDX-FileCopyrightText: 2020 unusualcrow <unusualcrow@protonmail.com>
# SPDX-FileCopyrightText: 2021 20kdc <asdd2808@gmail.com>
# SPDX-FileCopyrightText: 2021 Alex Evgrashin <aevgrashin@yandex.ru>
# SPDX-FileCopyrightText: 2021 Alex Evgrashin <evgrashin.adl@gmail.com>
# SPDX-FileCopyrightText: 2021 Galactic Chimp <GalacticChimpanzee@gmail.com>
# SPDX-FileCopyrightText: 2021 Julian Giebel <j.giebel@netrocks.info>
# SPDX-FileCopyrightText: 2021 Kara D <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2021 Metal Gear Sloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2021 Paul <ritter.paul1+git@googlemail.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <zddm@outlook.es>
# SPDX-FileCopyrightText: 2021 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2021 mirrorcult <notzombiedude@gmail.com>
# SPDX-FileCopyrightText: 2022 EmoGarbage404 <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Jack Fox <35575261+DubiousDoggo@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Matz05 <Matz05@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Paul Ritter <ritter.paul1@googlemail.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 T-Stalker <43253663+DogZeroX@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 AJCM <AJCM@tutanota.com>
# SPDX-FileCopyrightText: 2023 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 ElectroJr <leonsfriedrich@gmail.com>
# SPDX-FileCopyrightText: 2023 Julian Giebel <juliangiebel@live.de>
# SPDX-FileCopyrightText: 2023 Kit0vras <123590995+Kit0vras@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 TemporalOroboros <TemporalOroboros@gmail.com>
# SPDX-FileCopyrightText: 2023 Visne <39844191+Visne@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Alzore <140123969+Blackern5000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Boaz1111 <149967078+Boaz1111@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Boolean-Buckeye <36829021+Boolean-Buckeye@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 BooleanBuckeye <booleanbuckeye@gmail.com>
# SPDX-FileCopyrightText: 2024 Brandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 CaasGit <87243814+CaasGit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Cojoke <83733158+Cojoke-dot@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 Eoin Mcloughlin <helloworld@eoinrul.es>
# SPDX-FileCopyrightText: 2024 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Hrosts <35345601+Hrosts@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ian <ignaz.k@live.de>
# SPDX-FileCopyrightText: 2024 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Jeff <velcroboy333@hotmail.com>
# SPDX-FileCopyrightText: 2024 Joel Zimmerman <JoelZimmerman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 JustCone <141039037+JustCone14@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kukutis96513 <146854220+Kukutis96513@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Lye <128915833+Lyroth001@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MACMAN2003 <macman2003c@gmail.com>
# SPDX-FileCopyrightText: 2024 MerrytheManokit <167581110+MerrytheManokit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mervill <mervills.email@gmail.com>
# SPDX-FileCopyrightText: 2024 Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MureixloI <132683811+MureixloI@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 NakataRin <45946146+NakataRin@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 OrangeMoronage9622 <whyteterry0092@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 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Preston Smith <92108534+thetolbean@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Repo <47093363+Titian3@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 RiceMar1244 <138547931+RiceMar1244@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Simon <63975668+Simyon264@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Stalen <33173619+stalengd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TakoDragon <69509841+BackeTako@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Thomas <87614336+Aeshus@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TsjipTsjip <19798667+TsjipTsjip@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ubaser <134914314+UbaserB@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Unkn0wn_Gh0st <shadowstalkermll@gmail.com>
# SPDX-FileCopyrightText: 2024 Vasilis <vasilis@pikachu.systems>
# SPDX-FileCopyrightText: 2024 Velcroboy <107660393+IamVelcroboy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Vigers Ray <60344369+VigersRay@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 beck-thompson <107373427+beck-thompson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 chromiumboy <50505512+chromiumboy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deathride58 <deathride58@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 dffdff2423 <dffdff2423@gmail.com>
# SPDX-FileCopyrightText: 2024 eoineoineoin <github@eoinrul.es>
# SPDX-FileCopyrightText: 2024 foboscheshir <156405958+foboscheshir@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 github-actions[bot] <41898282+github-actions[bot]@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 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 saintmuntzer <47153094+saintmuntzer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 shamp <140359015+shampunj@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 strO0pwafel <153459934+strO0pwafel@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 stroopwafel <j.o.luijkx@student.tudelft.nl>
# SPDX-FileCopyrightText: 2024 superjj18 <gagnonjake@gmail.com>
# SPDX-FileCopyrightText: 2024 themias <89101928+themias@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 to4no_fix <156101927+chavonadelal@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 voidnull000 <18663194+voidnull000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 BombasterDS <deniskaporoshok@gmail.com>
# SPDX-FileCopyrightText: 2025 Firewars763 <35506916+Firewars763@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Southbridge <7013162+southbridge-fur@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 SpaceRox1244 <138547931+SpaceRox1244@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
#==Suffix Guide==
#Always Powered - light doesn't need power to give off life
#Empty - on map init, light spawns without bulb
#Blue/Sodium/etc. - the color of the light

#Basic lights
- type: entity
  id: AlwaysPoweredWallLight
  name: light
  description: "An always powered light."
  suffix: Always powered
  components:
  - type: MeleeSound
    soundGroups:
      Brute:
        collection: GlassSmash
  - type: Transform
    anchored: true
  - type: Clickable
  - type: InteractionOutline
  - type: Construction
    graph: LightFixture
    node: tubeLight
  - type: Sprite
    sprite: Structures/Wallmounts/Lighting/light_tube.rsi
    drawdepth: WallMountedItems
    layers:
    - map: ["enum.PoweredLightLayers.Base"]
      state: base
    - map: ["enum.PoweredLightLayers.Glow"]
      state: glow
      shader: unshaded
    state: base
  - type: PointLight
    color: "#FFE4CE" # 5000K color temp
    energy: 0.8
    radius: 10
    softness: 1
    offset: "0, -0.5"
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: Metallic
  - type: RCDDeconstructable
    cost: 4
    delay: 2
    fx: EffectRCDDeconstruct2
  - type: Physics
    bodyType: Static
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.4,0.5,0.4,0.35"
        density: 190
        mask:
        - None
        layer:
        - TabletopMachineLayer
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 200
      behaviors: #excess damage, don't spawn entities.
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:EmptyAllContainersBehaviour
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetSteel1:
            min: 2
            max: 2
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
  - type: Penetratable # Goobstation - Better snipers
    penetrateDamage: 10
  - type: Tag # Goobstation - Prevent RCD from making lights in one tile
    tags:
    - WallLight
  placement:
    mode: SnapgridCenter
    snap:
    - Wallmount

- type: entity
  name: light
  description: "A light fixture. Draws power and produces light when equipped with a light tube."
  id: PoweredlightEmpty
  suffix: Empty
  parent: AlwaysPoweredWallLight
  components:
  - type: Sprite
    sprite: Structures/Wallmounts/Lighting/light_tube.rsi
    state: empty
  - type: PointLight
    enabled: false
  - type: PoweredLight
    bulb: Tube
  - type: ContainerContainer
    containers:
      light_bulb: !type:ContainerSlot
  - type: ApcPowerReceiver
  - type: ExtensionCableReceiver
  - type: DeviceNetwork
    deviceNetId: Wireless
    receiveFrequencyId: SmartLight
  - type: WirelessNetworkConnection
    range: 200
  - type: DeviceLinkSink
    ports:
      - On
      - Off
      - Toggle
  - type: Appearance
  - type: PoweredLightVisuals
    blinkingSound:
      path: "/Audio/Machines/light_tube_on.ogg"
    spriteStateMap:
      empty: empty
      off: base
      on: base
      broken: broken
      burned: burned
  - type: DamageOnInteract
    damage:
      types:
        Heat: 2
    popupText: powered-light-component-burn-hand

- type: entity
  id: Poweredlight
  description: "A light fixture. Draws power and produces light when equipped with a light tube."
  suffix: ""
  parent: PoweredlightEmpty
  components:
  - type: Sprite
    state: base
  - type: PointLight
    enabled: true
  - type: PoweredLight
    hasLampOnSpawn: LightTube
  - type: AmbientOnPowered
  - type: AmbientSound
    volume: -15
    range: 2
    sound:
      path: /Audio/Ambience/Objects/light_hum.ogg
  - type: DamageOnInteract
    damage:
      types:
        Heat: 2
    popupText: powered-light-component-burn-hand

#LED lights
- type: entity
  id: PoweredlightLED
  description: "A light fixture. Draws power and produces light when equipped with a light tube."
  suffix: LED
  parent: Poweredlight
  components:
  - type: PoweredLight
    hasLampOnSpawn: LedLightTube
  - type: PointLight
    radius: 15
    energy: 1
    softness: 0.9
    color: "#EEEEFF"
  - type: DamageOnInteract
    damage:
      types:
        Heat: 1 # LEDs don't get as hot
    popupText: powered-light-component-burn-hand

- type: entity
  parent: AlwaysPoweredWallLight
  id: AlwaysPoweredLightLED
  suffix: Always Powered, LED
  components:
  - type: PointLight
    radius: 10
    energy: 2.5
    softness: 0.9
    color: "#EEEEFF"

#Exterior lights
- type: entity
  id: PoweredlightExterior
  description: "A light fixture. Draws power and produces light when equipped with a light tube."
  suffix: Exterior
  parent: Poweredlight
  components:
  - type: PoweredLight
    hasLampOnSpawn: ExteriorLightTube
  - type: DamageOnInteract
    damage:
      types:
        Heat: 4 # brighter light gets hotter
    popupText: powered-light-component-burn-hand

- type: entity
  parent: AlwaysPoweredWallLight
  id: AlwaysPoweredLightExterior
  suffix: Always Powered, Exterior
  components:
  - type: PointLight
    radius: 12
    energy: 4.5
    softness: 0.5
    color: "#B4FCF0"

#Sodium lights
- type: entity
  id: PoweredlightSodium
  description: "A light fixture. Draws power and produces light when equipped with a light tube."
  suffix: Sodium
  parent: Poweredlight
  components:
  - type: PoweredLight
    hasLampOnSpawn: SodiumLightTube
  - type: PointLight
    radius: 10
    energy: 2.5
    softness: 0.9
    color: "#FFAF38"
  - type: DamageOnInteract
    damage:
      types:
        Heat: 2
    popupText: powered-light-component-burn-hand

- type: entity
  parent: AlwaysPoweredWallLight
  id: AlwaysPoweredLightSodium
  suffix: Always Powered, Sodium
  components:
  - type: PointLight
    radius: 10
    energy: 4
    softness: 0.5
    color: "#FFAF38"

#Small lights
- type: entity
  name: small light
  description: "An always powered light."
  id: SmallLight
  suffix: Always Powered
  parent: AlwaysPoweredWallLight
  components:
    - type: AmbientSound
      volume: -15
      range: 2
      sound:
        path: /Audio/Ambience/Objects/light_hum.ogg
    - type: Sprite
      sprite: Structures/Wallmounts/Lighting/light_small.rsi
      state: base
    - type: PointLight
      energy: 1.0
      radius: 6
      softness: 1.1
      enabled: true
    - type: Physics
      bodyType: Static
    - type: Fixtures
      fixtures:
        fix1:
          shape:
            !type:PhysShapeAabb
            bounds: "-0.1,0.5,0.1,0.255"
          density: 190
          mask:
          - None
          layer:
          - TabletopMachineLayer
    - type: Damageable
      damageContainer: Inorganic
    - type: Destructible
      thresholds:
      - trigger:
          !type:DamageTrigger
          damage: 100
        behaviors: #excess damage, don't spawn entities.
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
      - trigger:
          !type:DamageTrigger
          damage: 25
        behaviors:
        - !type:EmptyAllContainersBehaviour
        - !type:SpawnEntitiesBehavior
          spawn:
            SheetSteel1:
              min: 1
              max: 1
        - !type:DoActsBehavior
          acts: ["Destruction"]
    - type: Construction
      graph: LightFixture
      node: bulbLight

- type: entity
  name: small light
  description: "A light fixture. Draws power and produces light when equipped with a light bulb."
  id: PoweredSmallLightEmpty
  suffix: Empty
  parent: SmallLight
  components:
  - type: Sprite
    sprite: Structures/Wallmounts/Lighting/light_small.rsi
    state: empty
  - type: AmbientSound
    enabled: false
  - type: PointLight
    enabled: false
    offset: "0, -0.5"
  - type: ContainerContainer
    containers:
      light_bulb: !type:ContainerSlot
  - type: PoweredLight
    bulb: Bulb
  - type: ApcPowerReceiver
  - type: ExtensionCableReceiver
  - type: DeviceNetwork
    deviceNetId: Wireless
    receiveFrequencyId: SmartLight
  - type: WirelessNetworkConnection
    range: 200
  - type: Appearance
  - type: PoweredLightVisuals
    spriteStateMap:
      empty: empty
      off: base
      on: base
      broken: broken
      burned: burned
  - type: DeviceLinkSink
    ports:
      - On
      - Off
      - Toggle
  - type: DamageOnInteract
    damage:
      types:
        Heat: 2
    popupText: powered-light-component-burn-hand

- type: entity
  id: PoweredLEDSmallLight
  suffix: LED
  parent: PoweredSmallLightEmpty
  components:
  - type: Sprite
    state: base
  - type: PointLight
    enabled: true
    radius: 8
    energy: 1
    softness: 1
    color: "#EEEEFF"
  - type: PoweredLight
    hasLampOnSpawn: LedLightBulb
  - type: DamageOnInteract
    damage:
      types:
        Heat: 1
    popupText: powered-light-component-burn-hand

- type: entity
  id: PoweredDimSmallLight
  suffix: Dim
  parent: PoweredSmallLightEmpty
  components:
  - type: Sprite
    state: base
  - type: PointLight
    enabled: true
    radius: 5
    energy: 0.5
    softness: 3
    color: "#ba473f"
  - type: PoweredLight
    hasLampOnSpawn: DimLightBulb
  - type: DamageOnInteract
    damage:
      types:
        Heat: 1
    popupText: powered-light-component-burn-hand

- type: entity
  id: PoweredWarmSmallLight
  suffix: Warm
  parent: PoweredSmallLightEmpty
  components:
  - type: Sprite
    state: base
  - type: PointLight
    enabled: true
    radius: 6
    energy: 1
    softness: 3
    color: "#FF8A0C"
  - type: PoweredLight
    hasLampOnSpawn: WarmLightBulb
  - type: DamageOnInteract
    damage:
      types:
        Heat: 2
    popupText: powered-light-component-burn-hand

- type: entity
  id: PoweredSmallLight
  suffix: ""
  parent: PoweredSmallLightEmpty
  components:
  - type: Sprite
    state: base
  - type: PointLight
    enabled: true
  - type: PoweredLight
    hasLampOnSpawn: LightBulb
  - type: DamageOnInteract
    damage:
      types:
        Heat: 2
    popupText: powered-light-component-burn-hand

#Emergency Lights
- type: entity
  id: EmergencyLight
  name: emergency light
  description: A small light with an internal battery that turns on as soon as it stops receiving any power. Nanotrasen technology allows it to adapt its color to alert crew to the conditions of the station.
  parent: AlwaysPoweredWallLight
  suffix: ""
  components:
  - type: PointLight
    enabled: false
    radius: 5
    energy: 0.6
    offset: "0, 0.4"
    color: "#7CFC00"
    mask: /Textures/Effects/LightMasks/double_cone.png
  - type: ApcPowerReceiver
  - type: ExtensionCableReceiver
  - type: Battery
    maxCharge: 30000
    startingCharge: 0
  - type: EmergencyLight
  - type: RotatingLight
    speed: 40
  - type: Sprite
    sprite: Structures/Wallmounts/Lighting/emergency_light.rsi
    layers:
    - state: base
      map: [ "enum.EmergencyLightVisualLayers.Base" ]
    - state: emergency_light_off
      map: [ "enum.EmergencyLightVisualLayers.LightOff" ]
      color: "#7CFC00"
    - state: emergency_light_on
      map: [ "enum.EmergencyLightVisualLayers.LightOn" ]
      color: "#7CFC00"
      shader: "unshaded"
      visible: false
  - type: Appearance
  - type: Construction
    graph: LightFixture
    node: emergencyLight
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors: #excess damage, don't spawn entities.
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
    - trigger:
        !type:DamageTrigger
        damage: 25
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetSteel1:
            min: 1
            max: 1
          ShardGlass:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
  placement:
    mode: SnapgridCenter
    snap:
    - Wallmount

#Coloured lights

- type: entity
  id: PoweredlightCyan
  suffix: Cyan
  parent: Poweredlight
  components:
  - type: PoweredLight
    hasLampOnSpawn: LightTubeCrystalCyan
  - type: PointLight
    radius: 8
    energy: 3
    softness: 0.5
    color: "#47f8ff"
  - type: DamageOnInteract
    damage:
      types:
        Heat: 2
    popupText: powered-light-component-burn-hand

- type: entity
  id: AlwaysPoweredlightCyan
  suffix: Always Powered, Cyan
  parent: AlwaysPoweredWallLight
  components:
  - type: PointLight
    radius: 8
    energy: 3
    softness: 0.5
    color: "#47f8ff"

- type: entity
  id: PoweredlightBlue
  suffix: Blue
  parent: Poweredlight
  components:
  - type: PoweredLight
    hasLampOnSpawn: LightTubeCrystalBlue
  - type: PointLight
    radius: 8
    energy: 3
    softness: 0.5
    color: "#39a1ff"
  - type: DamageOnInteract
    damage:
      types:
        Heat: 2
    popupText: powered-light-component-burn-hand

- type: entity
  id: AlwaysPoweredlightBlue
  suffix: Always Powered, Blue
  parent: AlwaysPoweredWallLight
  components:
  - type: PointLight
    radius: 8
    energy: 3
    softness: 0.5
    color: "#39a1ff"

- type: entity
  id: PoweredlightYellow
  suffix: Yellow
  parent: Poweredlight
  components:
  - type: PoweredLight
    hasLampOnSpawn: LightTubeCrystalYellow
  - type: PointLight
    radius: 8
    energy: 3
    softness: 0.5
    color: "#ffde46"
  - type: DamageOnInteract
    damage:
      types:
        Heat: 2
    popupText: powered-light-component-burn-hand

- type: entity
  id: AlwaysPoweredlightYellow
  suffix: Always Powered, Yellow
  parent: AlwaysPoweredWallLight
  components:
  - type: PointLight
    radius: 8
    energy: 3
    softness: 0.5
    color: "#ffde46"

- type: entity
  id: PoweredlightPink
  suffix: Pink
  parent: Poweredlight
  components:
  - type: PoweredLight
    hasLampOnSpawn: LightTubeCrystalPink
  - type: PointLight
    radius: 8
    energy: 3
    softness: 0.5
    color: "#ff66cc"
  - type: DamageOnInteract
    damage:
      types:
        Heat: 2
    popupText: powered-light-component-burn-hand

- type: entity
  id: AlwaysPoweredlightPink
  suffix: Always Powered, Pink
  parent: AlwaysPoweredWallLight
  components:
  - type: PointLight
    radius: 8
    energy: 3
    softness: 0.5
    color: "#ff66cc"

- type: entity
  id: PoweredlightOrange
  suffix: Orange
  parent: Poweredlight
  components:
  - type: PoweredLight
    hasLampOnSpawn: LightTubeCrystalOrange
  - type: PointLight
    radius: 8
    energy: 3
    softness: 0.5
    color: "#ff8227"
  - type: DamageOnInteract
    damage:
      types:
        Heat: 2
    popupText: powered-light-component-burn-hand

- type: entity
  id: AlwaysPoweredlightOrange
  suffix: Always Powered, Orange
  parent: AlwaysPoweredWallLight
  components:
  - type: PointLight
    radius: 8
    energy: 3
    softness: 0.5
    color: "#ff8227"

- type: entity
  id: PoweredlightBlack
  suffix: Black
  parent: Poweredlight
  description:
  components:
  - type: PoweredLight
    hasLampOnSpawn: LightTubeCrystalBlack
  - type: PointLight
    radius: 8
    energy: 1
    softness: 0.5
    color: "#363636"
  - type: DamageOnInteract
    damage:
      types:
        Heat: 2
    popupText: powered-light-component-burn-hand

- type: entity
  id: AlwaysPoweredlightBlack
  suffix: Always Powered, Black
  parent: AlwaysPoweredWallLight
  components:
  - type: PointLight
    radius: 8
    energy: 1
    softness: 0.5
    color: "#363636"

- type: entity
  id: PoweredlightRed
  suffix: Red
  parent: Poweredlight
  components:
  - type: PoweredLight
    hasLampOnSpawn: LightTubeCrystalRed
  - type: PointLight
    radius: 8
    energy: 3
    softness: 0.5
    color: "#fb4747"
  - type: DamageOnInteract
    damage:
      types:
        Heat: 2
    popupText: powered-light-component-burn-hand

- type: entity
  id: AlwaysPoweredlightRed
  suffix: Always Powered, Red
  parent: AlwaysPoweredWallLight
  components:
  - type: PointLight
    radius: 8
    energy: 3
    softness: 0.5
    color: "#fb4747"

- type: entity
  id: PoweredlightGreen
  suffix: Green
  parent: Poweredlight
  components:
  - type: PoweredLight
    hasLampOnSpawn: LightTubeCrystalGreen
  - type: PointLight
    radius: 8
    energy: 3
    softness: 0.5
    color: "#52ff39"
  - type: DamageOnInteract
    damage:
      types:
        Heat: 2
    popupText: powered-light-component-burn-hand

- type: entity
  id: AlwaysPoweredlightGreen
  suffix: Always Powered, Green
  parent: AlwaysPoweredWallLight
  components:
  - type: PointLight
    radius: 8
    energy: 3
    softness: 0.5
    color: "#52ff39"
