- type: entity
  id: AMEController
  name: AME controller
  description: It's a controller for the antimatter engine.
  placement:
    mode: SnapgridCenter
  components:
  - type: Clickable
  - type: InteractionOutline
  - type: Sprite
    sprite: Structures/Power/Generation/ame.rsi
    state: control
  - type: Physics
  - type: Fixtures
    fixtures:
    - shape:
        !type:PhysShapeAabb
          bounds: "-0.45,-0.45,0.45,0.45"
      mass: 25
      mask:
      - Impassable
      - VaultImpassable
      - SmallImpassable
      layer:
      - Opaque
      - MobImpassable
      - SmallImpassable
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: Metallic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetSteel1:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: Transform
    anchored: true
  - type: Anchorable
  - type: Pullable
  - type: AMEController
  - type: Explosive
    explosionType: Default
    intensitySlope: 5
    maxIntensity: 60
  - type: ActivatableUI
    key: enum.AMEControllerUiKey.Key
  - type: UserInterface
    interfaces:
    - key: enum.AMEControllerUiKey.Key
      type: AMEControllerBoundUserInterface
  - type: Appearance
    visuals:
    - type: AMEControllerVisualizer
  - type: NodeContainer
    examinable: true
    nodes:
      ame:
        !type:AdjacentNode
        nodeGroupID: AMEngine
      input:
        !type:CableDeviceNode
        nodeGroupID: HVPower
#  - type: ApcPowerReceiver
#  - type: ExtensionCableReceiver
  - type: PowerSupplier
    supplyRate: 0

- type: entity
  abstract: true
  parent: AMEController
  id: AMEControllerUnanchored
  suffix: Unanchored
  components:
  - type: Physics
    bodyType: Dynamic
  - type: Fixtures
    fixtures:
    - shape:
        !type:PhysShapeAabb
          bounds: "-0.45,-0.45,0.45,0.45"
      mass: 25
      mask:
      - Impassable
      - VaultImpassable
      - SmallImpassable
      layer:
      - Opaque
      - MobImpassable
      - SmallImpassable

- type: entity
  id: AMEShielding
  name: AME shielding
  description: Keeps the antimatter in and the matter out.
  placement:
    mode: SnapgridCenter
  components:
  - type: Clickable
  - type: InteractionOutline
  - type: Sprite
    drawdepth: Walls
    sprite: Structures/Power/Generation/ame.rsi
    state: shield_0
  - type: Physics
  - type: Fixtures
    fixtures:
    - shape:
        !type:PhysShapeAabb {}
      layer:
      - Opaque
      - Impassable
      - MobImpassable
      - VaultImpassable
      - SmallImpassable
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: Metallic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetSteel1:
            min: 1
            max: 2
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: Transform
    anchored: true
  - type: IconSmooth
    mode: CardinalFlags
    base: shield_
    key: ame_shield
  - type: AMEShield
  - type: NodeContainer
    nodes:
      ame:
        !type:AdjacentNode
        nodeGroupID: AMEngine
  - type: PointLight
    enabled: false
    radius: 5
    energy: 0.5
    color: "#00AAFF"
  - type: Appearance
    visuals:
    - type: AMEVisualizer
  - type: Construction
    graph: AMEShielding
    node: ameShielding
