- type: entity
  name: spaceshroom
  parent: BaseStructure
  id: Spaceshroom
  suffix: Structure
  description: A cluster of wild mushrooms that likes to grow in dark, moist environments.
  components:
    - type: Sprite
      sprite: Objects/Misc/spaceshroom.rsi
      state: structure
    - type: Transform
      anchored: true
    - type: Physics
      bodyType: Static
    - type: Fixtures
      fixtures:
        fix1:
          shape:
            !type:PhysShapeCircle
            radius: 0.2
    - type: InteractionOutline
    - type: Gatherable
      toolWhitelist:
        components:
          - Hands
      loot:
        All: !type:GroupSelector
          children:
          - id: FoodSpaceshroom
    - type: Damageable
      damageContainer: StructuralInorganic
      damageModifierSet: Wood
    - type: Destructible
      thresholds:
        - trigger:
            !type:DamageTrigger
            damage: 150
          behaviors:
            - !type:DoActsBehavior
              acts: [ "Destruction" ]

- type: entity
  name: spaceshroom
  parent: FoodProduceBase
  id: FoodSpaceshroom
  description: A wild mushroom. There's no telling what effect it could have...
  components:
  - type: Produce
  - type: Sprite
    sprite: Objects/Misc/spaceshroom.rsi
    state: object
  - type: FlavorProfile
    flavors:
      - spaceshroom
  - type: Extractable
    juiceSolution:
      reagents:
      - ReagentId: SpaceDrugs
        Quantity: 10
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 20
        reagents:
        - ReagentId: Nutriment
          Quantity: 3
        - ReagentId: Vitamin
          Quantity: 2
  - type: RandomFillSolution
    solution: food
    weightedRandomId: RandomFillSpaceshroom
  - type: StaticPrice
    price: 20
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.25,-0.25,0.25,0.25"
        density: 1
        mask:
        - ItemMask
        restitution: 0.3
        friction: 0.2
  - type: Construction
    graph: CookedSpaceshroom
    node: start
    defaultTarget: cooked spaceshroom
  - type: AtmosExposed
  - type: Temperature
    currentTemperature: 290
  - type: TemperatureDamage
  - type: InternalTemperature
    thickness: 0.02
    area: 0.02
    conductivity: 0.43
  - type: Tag
    tags:
    - Mushroom

- type: weightedRandomFillSolution
  id: RandomFillSpaceshroom
  fills:
  - quantity: 10
    weight: 10
    reagents:
    - SpaceDrugs
  - quantity: 0
    weight: 5
    reagents:
    - Water
  - quantity: 10
    weight: 3
    reagents:
    - Ephedrine
  - quantity: 10
    weight: 1
    reagents:
    - Lexorin
  - quantity: 15
    weight: 1
    reagents:
    - Amatoxin

# Cooked Object
- type: entity
  name: cooked spaceshroom
  parent: FoodProduceBase
  id: FoodSpaceshroomCooked
  description: A wild mushroom that has been cooked through. It seems the heat has removed its chemical effects.
  components:
  - type: FlavorProfile
    flavors:
      - spaceshroomcooked
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 15
        reagents:
        - ReagentId: Nutriment
          Quantity: 10
        - ReagentId: Vitamin
          Quantity: 5
  - type: Sprite
    sprite: Objects/Misc/spaceshroom.rsi
    state: spaceshroom_cooked
  - type: Produce
  - type: StaticPrice
    price: 40
  - type: Construction
    graph: CookedSpaceshroom
    node: cooked spaceshroom
