# SPDX-FileCopyrightText: 2021 Stanbery Trask <64054459+StanberyTrask@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Delete69 <95458399+Delete69@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Alekshhh <44923899+Alekshhh@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 ArkiveDev <95712736+ArkiveDev@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: Railing
  start: start
  graph:
    - node: start
      edges:
        - to: railing
          completed:
            - !type:SnapToGrid { }
          steps:
            - material: MetalRod
              amount: 1
              doAfter: 2
        - to: railingCorner
          completed:
            - !type:SnapToGrid { }
          steps:
            - material: MetalRod
              amount: 2
              doAfter: 2.5
        - to: railingCornerSmall
          completed:
            - !type:SnapToGrid { }
          steps:
            - material: MetalRod
              amount: 1
              doAfter: 2
        - to: railingRound
          completed:
            - !type:SnapToGrid { }
          steps:
            - material: MetalRod
              amount: 2
              doAfter: 2

    - node: railing
      entity: Railing
      edges:
        - to: start
          completed:
            - !type:SpawnPrototype
              prototype: PartRodMetal1
              amount: 1
            - !type:DeleteEntity
          steps:
            - tool: Screwing
              doAfter: 0.25

    - node: railingCorner
      entity: RailingCorner
      edges:
        - to: start
          completed:
            - !type:SpawnPrototype
              prototype: PartRodMetal1
              amount: 2
            - !type:DeleteEntity
          steps:
            - tool: Screwing
              doAfter: 0.5

    - node: railingCornerSmall
      entity: RailingCornerSmall
      edges:
        - to: start
          completed:
            - !type:SpawnPrototype
              prototype: PartRodMetal1
              amount: 1
            - !type:DeleteEntity
          steps:
            - tool: Screwing
              doAfter: 0.25

    - node: railingRound
      entity: RailingRound
      edges:
        - to: start
          completed:
            - !type:SpawnPrototype
              prototype: PartRodMetal1
              amount: 2
            - !type:DeleteEntity
          steps:
            - tool: Screwing
              doAfter: 0.5