# SPDX-FileCopyrightText: 2021 Alex Evgrashin <aevgrashin@yandex.ru>
# SPDX-FileCopyrightText: 2021 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Julian Giebel <j.giebel@netrocks.info>
# SPDX-FileCopyrightText: 2021 Julian Giebel <juliangiebel@live.de>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <zddm@outlook.es>
# SPDX-FileCopyrightText: 2021 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 Boolean-Buckeye <36829021+Boolean-Buckeye@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 BooleanBuckeye <booleanbuckeye@gmail.com>
# SPDX-FileCopyrightText: 2024 Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: constructionGraph
  id: LightFixture
  start: start
  graph:
    - node: start
      edges:
        - to: bulbLight
          steps:
            - material: Steel
              amount: 1
              doAfter: 2.0
        - to: tubeLight
          steps:
            - material: Steel
              amount: 2
              doAfter: 2.0
        - to: groundLight
          steps:
            - material: Steel
              amount: 5
              doAfter: 2.0
        - to: strobeLight
          steps:
            - material: Steel
              amount: 1
              doAfter: 2.0
        - to: emergencyLight
          steps:
            - material: Steel
              amount: 1
              doAfter: 1.0
            - material: Glass
              amount: 1
              doAfter: 1.0
    - node: tubeLight
      entity: PoweredlightEmpty
      edges:
        - to: start
          conditions:
            - !type:ContainerEmpty
              container: "light_bulb"
          steps:
            - tool: Screwing
              doAfter: 2.0
          completed:
            - !type:SpawnPrototype
              prototype: SheetSteel1
              amount: 2
            - !type:DeleteEntity {}
    - node: bulbLight
      entity: PoweredSmallLightEmpty
      edges:
        - to: start
          conditions:
            - !type:ContainerEmpty
              container: "light_bulb"
          steps:
            - tool: Screwing
              doAfter: 2.0
          completed:
            - !type:SpawnPrototype
              prototype: SheetSteel1
              amount: 1
            - !type:DeleteEntity {}
    - node: groundLight
      entity: PoweredLightPostSmallEmpty
      edges:
        - to: start
          conditions:
            - !type:ContainerEmpty
              container: "light_bulb"
          steps:
            - tool: Screwing
              doAfter: 4.0
          completed:
            - !type:SpawnPrototype
              prototype: SheetSteel1
              amount: 5
            - !type:DeleteEntity {}
    - node: strobeLight
      entity: PoweredStrobeLightEmpty
      edges:
        - to: start
          conditions:
            - !type:ContainerEmpty
              container: "light_bulb"
          steps:
            - tool: Screwing
              doAfter: 2.0
          completed:
            - !type:SpawnPrototype
              prototype: SheetSteel1
              amount: 1
            - !type:DeleteEntity {}
    - node: emergencyLight
      entity: EmergencyLight
      edges:
        - to: start
          steps:
            - tool: Screwing
              doAfter: 2.0
          completed:
            - !type:SpawnPrototype
              prototype: SheetSteel1
              amount: 1
            - !type:SpawnPrototype
              prototype: SheetGlass1
              amount: 1
            - !type:DeleteEntity {}