- type: entity
  id: BaseMeteor
  name: meteor
  description: You prefer them when they're burning up in the atmosphere.
  abstract: true
  components:
  - type: Sprite
    noRot: false
    sprite: Objects/Misc/meteor.rsi
  - type: Projectile
    damage: {}
    deleteOnCollide: false
  - type: Meteor
    damageTypes:
      types:
        Blunt: 1
  - type: TimedDespawn
    lifetime: 120
  - type: Clickable
  - type: Physics
    bodyType: Dynamic
    bodyStatus: InAir
    angularDamping: 0
    linearDamping: 0
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeCircle
          radius: 0.4
        density: 100
        hard: false
        layer:
        - LargeMobLayer
        mask:
        - Impassable
        - BulletImpassable
  - type: Damageable
    damageContainer: Inorganic
  - type: Explosive
    explosionType: Default
    intensitySlope: 2
    maxIntensity: 100
    maxTileBreak: 1
    tileBreakScale: 2
  - type: TileFrictionModifier
    modifier: 0


- type: entity
  parent: BaseMeteor
  id: MeteorSpaceDust
  name: space dust
  description: Makes a station sneeze.
  components:
  - type: Sprite
    state: space_dust
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeCircle
          radius: 0.45
        density: 100
        hard: false
        layer:
        - LargeMobLayer
        mask:
        - Impassable
        - BulletImpassable
  - type: Explosive
    totalIntensity: 25
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
      - !type:ExplodeBehavior

- type: entity
  parent: BaseMeteor
  id: MeteorSmall
  suffix: Small
  components:
  - type: Sprite
    state: small
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeCircle
          radius: 0.25
        density: 100
        hard: false
        layer:
        - LargeMobLayer
        mask:
        - Impassable
        - BulletImpassable
  - type: Explosive
    totalIntensity: 50
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
      - !type:ExplodeBehavior
      - !type:WeightedSpawnEntityBehavior
        weightedEntityTable: "MeteorSpawnAsteroidWallTable"
        minSpawn: 2
        maxSpawn: 4
        spawnAfter: 0.5

- type: entity
  parent: BaseMeteor
  id: MeteorMedium
  suffix: Medium
  components:
  - type: Sprite
    state: medium
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeCircle
          radius: 0.3
        density: 100
        hard: false
        layer:
        - LargeMobLayer
        mask:
        - Impassable
        - BulletImpassable
  - type: Explosive
    totalIntensity: 100
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 500
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
      - !type:ExplodeBehavior
      - !type:WeightedSpawnEntityBehavior
        weightedEntityTable: "MeteorSpawnAsteroidWallTable"
        spawnOffset: 2
        minSpawn: 3
        maxSpawn: 6
        spawnAfter: 0.5

- type: entity
  parent: BaseMeteor
  id: MeteorLarge
  suffix: Large
  components:
  - type: Sprite
    state: big
  - type: Explosive
    totalIntensity: 150
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 1200
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
      - !type:ExplodeBehavior
      - !type:WeightedSpawnEntityBehavior
        weightedEntityTable: "MeteorSpawnAsteroidWallTable"
        spawnOffset: 3
        minSpawn: 5
        maxSpawn: 8
        spawnAfter: 0.5

- type: entity
  parent: BaseMeteor
  id: MeteorUrist
  name: Urist McMeteor
  description: As a successful member of society with a stable unflinching psyche and limitless drive, natural affinity for finance and domination, you have been selected, no, you have been effortlessly guided by divine (biological) trauma towards this moment. The gates of destiny fling open, and once again you're left standing on pulsating nothingness. A strobing headache of the soul.
  suffix: Meteor
  components:
  - type: Sprite
    state: human_pixel
  - type: SolutionContainerManager
    solutions:
      blood:
        maxVol: 1000
        reagents:
        - ReagentId: Blood
          Quantity: 1000
  - type: Explosive
    totalIntensity: 25
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 3000
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:PlaySoundBehavior
        sound:
          collection: MaleScreams
          params:
            volume: 10
      - !type:SpillBehavior
        solution: blood
      - !type:SpawnEntitiesBehavior
        spawn:
          FoodMeatHuman:
            min: 1
            max: 2
      - !type:ExplodeBehavior

# Cow Meteor
- type: entity
  parent: BaseMeteor
  id: MeteorCow
  name: Cosmic cow
  description: Moo-ving at relativistic speeds!
  suffix: Meteor
  components:
  - type: Sprite
    state: cow_pixel
  - type: Explosive
    totalIntensity: 25
  - type: SolutionContainerManager
    solutions:
      milk:
        maxVol: 500
        reagents:
        - ReagentId: Milk
          Quantity: 500
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 3000
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:PlaySoundBehavior
        sound:
          path: /Audio/Animals/cow_moo.ogg
      - !type:SpillBehavior
        solution: milk
      - !type:SpawnEntitiesBehavior
        spawn:
          FoodMeat:
            min: 1
            max: 2
          FoodCheeseSlice:
            min: 1
            max: 2
      - !type:ExplodeBehavior

# Clown Meteor
- type: entity
  parent: BaseMeteor
  id: MeteorClown
  name: Honksteroid
  description: The final honkening!
  suffix: Meteor
  components:
  - type: Sprite
    state: clown_pixel
  - type: Explosive
    totalIntensity: 25
  - type: SolutionContainerManager
    solutions:
      laughter:
        maxVol: 500
        reagents:
        - ReagentId: Laughter
          Quantity: 500
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 3000
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:PlaySoundBehavior
        sound:
          path: /Audio/Items/bikehorn.ogg
      - !type:SpillBehavior
        solution: laughter
      - !type:SpawnEntitiesBehavior
        spawn:
          FoodMeatClown:
            min: 1
            max: 2
          TrashBananaPeel:
            min: 1
            max: 4
          RubberChicken:
            min: 0
            max: 1
      - !type:ExplodeBehavior

# Potato Meteor
- type: entity
  parent: BaseMeteor
  id: MeteorPotato
  name: Space potato
  description: A starchy threat from the depths of the space. Contains 200% of your daily sodium intake!
  components:
  - type: Sprite
    state: potato
  - type: Explosive
    totalIntensity: 25
  - type: SolutionContainerManager
    solutions:
      ketchup:
        maxVol: 100
        reagents:
        - ReagentId: Ketchup
          Quantity: 100
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 3000
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:SpillBehavior
        solution: ketchup
      - !type:SpawnEntitiesBehavior
        spawn:
          FoodMealFries:
            min: 1
            max: 5
      - !type:ExplodeBehavior
