- type: entity
  id: GravityGenerator
  parent: BaseMachinePowered
  name: gravity generator
  description: It's what keeps you to the floor.
  placement:
    mode: AlignTileAny
  components:
  - type: AmbientSound
    volume: -6
    range: 7
    sound:
      path: /Audio/Ambience/Objects/gravity_gen_hum.ogg
  - type: Sprite
    netsync: false
    sprite: Structures/Machines/gravity_generator.rsi
    layers:
      - state: on
        map: ["enum.GravityGeneratorVisualLayers.Base"]
      - sprite: Structures/Machines/gravity_generator_core.rsi
        state: activated
        shader: unshaded
        map: ["enum.GravityGeneratorVisualLayers.Core"]
  - type: Transform
    anchored: true
  - type: ApcPowerReceiver
  - type: ExtensionCableReceiver
  - type: Physics
    bodyType: Static
  - type: Fixtures
    fixtures:
    - shape:
        !type:PhysShapeAabb
          bounds: "-1.5,-1.5,1.5,1.5"
      mass: 500
      mask:
      - Impassable
      layer:
      - Opaque
      - Impassable
      - MobImpassable
      - VaultImpassable
  - type: Repairable
    fuelCost: 10
    doAfterDelay: 5
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 150
      behaviors:
      - !type:DoActsBehavior
        acts: ["Breakage"]
  - type: GravityGenerator
    idlePower: 50
    activePower: 2500
    lightRadiusMin: 0.75
    lightRadiusMax: 2.5
  - type: UserInterface
    interfaces:
      - key: enum.GravityGeneratorUiKey.Key
        type: GravityGeneratorBoundUserInterface
  - type: Appearance
    visuals:
    - type: GravityGeneratorVisualizer
      spritemap:
        broken: "broken"
        unpowered: "off"
        off: "off"
        on: "on"
  - type: PointLight
    energy: 0.5
    # Gravity generator is a large machine, not casting shadows is fine within the radius set above.
    castShadows: false
    color: "#a8ffd9"
