# SPDX-FileCopyrightText: 2022 Delete69 <95458399+Delete69@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Jessica M <jessica@jessicamaybe.com>
# SPDX-FileCopyrightText: 2022 Moony <moony@hellomouse.net>
# SPDX-FileCopyrightText: 2022 moonheart08 <moonheart08@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Whisper <121047731+QuietlyWhisper@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 crazybrain23 <44417085+crazybrain23@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 zero <hello@enumerate.dev>
# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Alzore <140123969+Blackern5000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Brandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 CaasGit <87243814+CaasGit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Cojoke <83733158+Cojoke-dot@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 Eoin Mcloughlin <helloworld@eoinrul.es>
# SPDX-FileCopyrightText: 2024 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Hrosts <35345601+Hrosts@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ian <ignaz.k@live.de>
# SPDX-FileCopyrightText: 2024 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Joel Zimmerman <JoelZimmerman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 JustCone <141039037+JustCone14@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kukutis96513 <146854220+Kukutis96513@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Lye <128915833+Lyroth001@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MerrytheManokit <167581110+MerrytheManokit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mervill <mervills.email@gmail.com>
# SPDX-FileCopyrightText: 2024 Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MureixloI <132683811+MureixloI@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 NakataRin <45946146+NakataRin@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 OrangeMoronage9622 <whyteterry0092@gmail.com>
# SPDX-FileCopyrightText: 2024 PJBot <pieterjan.briers+bot@gmail.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Preston Smith <92108534+thetolbean@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Repo <47093363+Titian3@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 RiceMar1244 <138547931+RiceMar1244@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Simon <63975668+Simyon264@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Southbridge <7013162+southbridge-fur@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Spanky <scott@wearejacob.com>
# SPDX-FileCopyrightText: 2024 Spessmann <156740760+Spessmann@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Stalen <33173619+stalengd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TakoDragon <69509841+BackeTako@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Thomas <87614336+Aeshus@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TsjipTsjip <19798667+TsjipTsjip@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ubaser <134914314+UbaserB@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Unkn0wn_Gh0st <shadowstalkermll@gmail.com>
# SPDX-FileCopyrightText: 2024 Vasilis <vasilis@pikachu.systems>
# SPDX-FileCopyrightText: 2024 Vigers Ray <60344369+VigersRay@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 beck-thompson <107373427+beck-thompson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deathride58 <deathride58@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 dffdff2423 <dffdff2423@gmail.com>
# SPDX-FileCopyrightText: 2024 eoineoineoin <github@eoinrul.es>
# SPDX-FileCopyrightText: 2024 foboscheshir <156405958+foboscheshir@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 rosieposie <52761126+rosieposieeee@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 saintmuntzer <47153094+saintmuntzer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 shamp <140359015+shampunj@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 strO0pwafel <153459934+strO0pwafel@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 stroopwafel <j.o.luijkx@student.tudelft.nl>
# SPDX-FileCopyrightText: 2024 themias <89101928+themias@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 to4no_fix <156101927+chavonadelal@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 voidnull000 <18663194+voidnull000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: BaseRock
  name: boulder
  description: Heavy as a really heavy thing.
  abstract: true
  components:
  - type: Clickable
  - type: Sprite
    noRot: true
    sprite: Objects/Decoration/Flora/flora_rockssolid.rsi
  - type: Physics
    bodyType: Static
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.4
        density: 1000
        layer:
        - HalfWallLayer
        - Opaque
  - type: Climbable
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: Metallic
  - type: Destructible
    thresholds:
      - trigger:
          !type:DamageTrigger
          damage: 200
        behaviors:
          - !type:DoActsBehavior
            acts: [ "Destruction" ]

- type: entity
  id: BaseTree
  description: Yep, it's a tree.
  abstract: true
  components:
  - type: SpriteFade
  - type: Clickable
  - type: Sprite
    noRot: true
    sprite: Objects/Decoration/Flora/flora_trees.rsi
    drawdepth: Overdoors
    offset: 0,0.9
  - type: Physics
    bodyType: Static
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.35,-0.4,0.35,0.4"
        density: 1000
        layer:
        - WallLayer
  - type: Damageable
    damageContainer: StructuralInorganic
    damageModifierSet: Wood
  - type: MeleeSound
    soundGroups:
      Brute:
        path: /Audio/Effects/chop.ogg
        params:
          variation: 0.05
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          path: /Audio/Effects/tree_fell.ogg
          params:
            volume: 5
            variation: 0.05
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:SpawnEntitiesBehavior
        spawn:
          Log:
            min: 2
            max: 8

- type: entity
  parent: BaseTree
  id: BaseTreeSnow
  abstract: true
  components:
  - type: Sprite
    sprite: Objects/Decoration/Flora/flora_treessnow.rsi
    offset: 0,0.7
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.1,-0.3,0.1,0.3"
        density: 4000
        layer:
        - WallLayer

- type: entity
  parent: BaseTree
  id: BaseTreeLarge
  abstract: true
  components:
  - type: Sprite
    sprite: Objects/Decoration/Flora/flora_treeslarge.rsi
    offset: 0,1.55
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.18,-0.35,0.18,0.35"
        density: 2000
        layer:
        - WallLayer

- type: entity
  parent: BaseTree
  id: BaseTreeConifer
  abstract: true
  components:
  - type: Sprite
    sprite: Objects/Decoration/Flora/flora_treesconifer.rsi
    offset: 0,1.15
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.1,-0.35,0.1,0.35"
        density: 3500
        layer:
        - WallLayer

- type: entity
  parent: BaseRock
  id: FloraRockSolid
  components:
  - type: Sprite
    layers:
    - state: rocksolid01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        rocksolid01: ""
        rocksolid02: ""
        rocksolid03: ""

- type: entity
  name: stalagmite
  description: Natural stone spikes.
  parent: BaseRock
  id: FloraStalagmite
  components:
  - type: Destructible
    thresholds:
      - trigger:
          !type:DamageTrigger
          damage: 5
        behaviors:
          - !type:DoActsBehavior
            acts: [ "Destruction" ]
          - !type:PlaySoundBehavior
            sound:
              collection: GlassBreak
  - type: Sprite
    sprite: Objects/Decoration/Flora/flora_stalagmite.rsi
    layers:
    - state: stalagmite1
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        stalagmite1: ""
        stalagmite2: ""
        stalagmite3: ""
        stalagmite4: ""
        stalagmite5: ""
        stalagmite6: ""

- type: entity
  parent: FloraStalagmite
  id: FloraGreyStalagmite
  components:
  - type: Sprite
    sprite: Objects/Decoration/Flora/flora_stalagmite.rsi
    layers:
    - state: grey_stalagmite1
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        grey_stalagmite1: ""
        grey_stalagmite2: ""
        grey_stalagmite3: ""
        grey_stalagmite4: ""
        grey_stalagmite5: ""
        grey_stalagmite6: ""

- type: entity
  parent: BaseTree
  id: FloraTree
  name: tree
  components:
  - type: Sprite
    layers:
    - state: tree01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        tree01: ""
        tree02: ""
        tree03: ""
        tree04: ""
        tree05: ""
        tree06: ""

- type: entity
  parent: BaseTreeSnow
  id: FloraTreeSnow
  name: snowy tree
  components:
  - type: Sprite
    layers:
    - state: treesnow01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        treesnow01: ""
        treesnow02: ""
        treesnow03: ""
        treesnow04: ""
        treesnow05: ""
        treesnow06: ""

- type: entity
  parent: BaseTreeSnow
  id: FloraTreeStump
  name: tree stump
  components:
  - type: Sprite
    state: treestump

- type: entity
  parent: BaseTreeLarge
  id: FloraTreeLarge
  name: large tree
  components:
  - type: Sprite
    layers:
    - state: treelarge01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        treelarge01: ""
        treelarge02: ""
        treelarge03: ""
        treelarge04: ""
        treelarge05: ""
        treelarge06: ""

- type: entity
  parent: BaseTreeConifer
  id: FloraTreeConifer
  name: snowy conifer
  components:
  - type: Sprite
    layers:
    - state: treeconifer01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        treeconifer01: ""
        treeconifer02: ""
        treeconifer03: ""

- type: entity
  parent: BaseTreeConifer
  id: FloraTreeChristmas01
  name: christmas tree
  components:
  - type: Sprite
    state: treechristmas01

- type: entity
  parent: BaseTreeConifer
  id: FloraTreeChristmas02
  suffix: Safe Presents
  name: christmas tree
  components:
  - type: Sprite
    state: treechristmas02
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.5,0,0.5,0.75"
        density: 4500
        layer:
        - WallLayer
  - type: LimitedItemGiver
    spawnEntries:
      - id: PresentRandom
        orGroup: present
      - id: PresentRandomCash # buy your own.
        prob: 0.1
        orGroup: present
      - id: PresentRandomCoal # naughty
        prob: 0.05
        orGroup: present
    receivedPopup: christmas-tree-got-gift
    deniedPopup: christmas-tree-no-gift
    requiredHoliday: FestiveSeason
  - type: Destructible # Goobstation
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          path: /Audio/Effects/tree_fell.ogg
          params:
            volume: 5
            variation: 0.05
      - !type:KillSignCauseBehavior
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:SpawnEntitiesBehavior
        spawn:
          Log:
            min: 2
            max: 8

- type: entity
  parent: FloraTreeChristmas02
  id: FloraTreeChristmas03
  suffix: Insane Presents
  name: christmas tree
  components:
  - type: LimitedItemGiver
    spawnEntries:
      - id: PresentRandom
        orGroup: present
      - id: PresentRandomUnsafe
        prob: 0.5
        orGroup: present
      - id: PresentRandomInsane
        prob: 0.2
        orGroup: present

- type: entity
  parent: BaseTreeConifer
  id: FloraTreeStumpConifer
  name: tree stump
  components:
  - type: Sprite
    state: treestumpconifer

- type: entity
  parent: FloraTree
  id: ShadowTree
  name: dark wood
  description: The leaves are whispering about you.
  components:
  - type: Sprite
    sprite: Objects/Decoration/Flora/flora_shadow_trees.rsi

- type: entity
  parent: BaseTree
  id: LightTree
  name: glowing tree
  description: A marvelous tree filled with strange energy.
  components:
  - type: PointLight
    radius: 2.0
    energy: 4.5
    color: "#6270bb"
  - type: Sprite
    sprite: Objects/Decoration/Flora/flora_treeslight.rsi
    layers:
    - state: tree01
      map: ["random"]
  - type: RandomSprite
    available:
    - random:
        tree01: ""
        tree02: ""
        tree03: ""
        tree04: ""
        tree05: ""
        tree06: ""
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 25
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          path: /Audio/Effects/tree_fell.ogg
          params:
            volume: 5
            variation: 0.05
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:SpawnEntitiesBehavior
        spawn:
          Log:
            min: 0
            max: 1
      - !type:SpawnEntitiesBehavior
        spawn:
          MobLuminousObject:
            min: 0
            max: 1