# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MACMAN2003 <macman2003c@gmail.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: MIT

- type: constructionGraph
  id: ClockGrille
  start: start
  graph:
    - node: start
      edges:
        - to: clockGrille
          completed:
            - !type:SnapToGrid
              southRotation: true
          steps:
            - material: MetalRod
              amount: 2
              doAfter: 1

    - node: clockGrille
      entity: ClockworkGrille
      edges:
        - to: start
          completed:
            - !type:AdminLog # Needs a log for start of attempt in addition to the completion log
              message: "A grille was cut"
            - !type:SpawnPrototype
              prototype: PartRodMetal1
              amount: 2
            - !type:DeleteEntity
          steps:
            - tool: Cutting
              doAfter: 0.25

    - node: clockGrilleBroken
      entity: ClockworkGrilleBroken
      edges:
        - to: start
          completed:
            - !type:SpawnPrototype
              prototype: PartRodMetal1
              amount: 1
            - !type:DeleteEntity
          steps:
            - tool: Cutting
        - to: clockGrille
          steps:
            - material: MetalRod
              amount: 1
              doAfter: 0.5