- type: entity
  id: UnfinishedMachineFrame2x1
  name: machine frame (2x1)
  description: A machine under construction. Needs more parts.
  suffix: Unfinished
  placement:
    mode: SnapgridCenter
  components:
    - type: Transform
      anchored: true
    - type: Physics
      bodyType: Static
    - type: Fixtures
      fixtures:
        fix1:
          shape:
            !type:PhysShapeAabb
            bounds: "1.4,0.4,-0.4,-0.4"
          density: 190
          mask:
          - MachineMask
          layer:
          - MachineLayer
    - type: Clickable
    - type: InteractionOutline
    - type: Anchorable
    - type: Rotatable
    - type: Pullable
    - type: Construction
      containers:
        - machine_board
        - machine_parts
      graph: Machine2x1
      node: missingWires
    - type: ContainerContainer
      containers:
        machine_board: !type:Container
        machine_parts: !type:Container
    - type: Damageable
      damageContainer: StructuralInorganic
      damageModifierSet: Metallic
    - type: Destructible
      thresholds:
      - trigger:
          !type:DamageTrigger
          damage: 100
        behaviors:
        - !type:PlaySoundBehavior
          sound:
            collection: MetalBreak
        - !type:ChangeConstructionNodeBehavior
          node: start
        - !type:DoActsBehavior
          acts: ["Destruction"]
    - type: Sprite
      offset: 0.5,0
      sprite: _Mono/Structures/Machines/frames/frame_2x1.rsi
      state: box_0

- type: entity
  id: MachineFrame2x1
  name: machine frame (2x1)
  suffix: Ready
  placement:
    mode: SnapgridCenter
  components:
    - type: Transform
      anchored: true
    - type: Physics
      bodyType: Static
    - type: Fixtures
      fixtures:
        fix1:
          shape:
            !type:PhysShapeAabb
            bounds: "1.4,0.4,-0.4,-0.4"
          density: 190
          mask:
          - MachineMask
          layer:
          - MachineLayer
    - type: Clickable
    - type: InteractionOutline
    - type: Anchorable
    - type: Rotatable
    - type: Pullable
    - type: Construction
      graph: Machine2x1
      node: machineFrame
      defaultTarget: machine
      containers:
        - machine_board
        - machine_parts
      machine_board:
      whitelist:
        components:
          - MachineBoard2x1
    - type: Damageable
      damageContainer: StructuralInorganic
      damageModifierSet: Metallic
    - type: Destructible
      thresholds:
      - trigger:
          !type:DamageTrigger
          damage: 100
        behaviors:
        - !type:PlaySoundBehavior
          sound:
            collection: MetalBreak
        - !type:ChangeConstructionNodeBehavior
          node: missingWires
        - !type:DoActsBehavior
          acts: ["Destruction"]
    - type: MachineFrame
    - type: ContainerContainer
      containers:
        machine_board: !type:Container
        machine_parts: !type:Container
    - type: Sprite
      offset: 0.5,0
      sprite: _Mono/Structures/Machines/frames/frame_2x1.rsi
      state: box_1
    - type: Appearance
    - type: ItemMapper
      mapLayers:
        box_2:
          minCount: 1
          whitelist:
            components:
            - MachineBoard

- type: entity
  id: MachineFrameDestroyed2x1
  parent: BaseStructureDynamic
  name: destroyed machine frame (2x1)
  placement:
    mode: SnapgridCenter
  components:
    - type: Transform
      anchored: true
      noRot: true
    - type: Physics
      bodyType: Static
    - type: Construction
      graph: Machine2x1
      node: destroyedMachineFrame
    - type: Damageable
      damageContainer: StructuralInorganic
      damageModifierSet: Metallic
    - type: Destructible
      thresholds:
      - trigger:
          !type:DamageTrigger
          damage: 100
        behaviors:
        - !type:SpawnEntitiesBehavior
          spawn:
            SheetSteel1:
              min: 2
              max: 6
        - !type:DoActsBehavior
          acts: ["Destruction"]
    - type: Sprite
      sprite: _Mono/Structures/Machines/frames/frame_2x1.rsi
      state: destroyed
      offset: 0.5,0
    - type: Fixtures
      fixtures:
        fix1:
          shape:
            !type:PhysShapeAabb
            bounds: "1.4,0.4,-0.4,-0.4"
          density: 190
          mask:
          - MachineMask
          layer:
          - MachineLayer
