# SPDX-FileCopyrightText: 2019 Acruid <shatter66@gmail.com>
# SPDX-FileCopyrightText: 2019 DamianX <DamianX@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 AJCM <AJCM@tutanota.com>
# SPDX-FileCopyrightText: 2020 Hugo Laloge <hugo.laloge@gmail.com>
# SPDX-FileCopyrightText: 2020 L.E.D <10257081+unusualcrow@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 Paul Ritter <ritter.paul1@googlemail.com>
# SPDX-FileCopyrightText: 2020 Remie Richards <remierichards@gmail.com>
# SPDX-FileCopyrightText: 2020 Swept <jamesurquhartwebb@gmail.com>
# SPDX-FileCopyrightText: 2020 Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 Víctor Aguilera Puerto <zddm@outlook.es>
# SPDX-FileCopyrightText: 2020 lajolico <55922029+lajolico@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 unusualcrow <unusualcrow@protonmail.com>
# SPDX-FileCopyrightText: 2021 20kdc <asdd2808@gmail.com>
# SPDX-FileCopyrightText: 2021 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Galactic Chimp <GalacticChimpanzee@gmail.com>
# SPDX-FileCopyrightText: 2021 Metal Gear Sloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <gradientvera@outlook.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <zddm@outlook.es>
# SPDX-FileCopyrightText: 2021 cyclowns <cyclowns@protonmail.ch>
# SPDX-FileCopyrightText: 2021 cyclowns <notzombiedude@gmail.com>
# SPDX-FileCopyrightText: 2021 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2021 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2021 mirrorcult <notzombiedude@gmail.com>
# SPDX-FileCopyrightText: 2021 tmtmtl30 <53132901+tmtmtl30@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Fishfish458 <47410468+Fishfish458@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Matthias <32034333+DerSheppard@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Moony <moonheart08@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 T-Stalker <43253663+DogZeroX@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Visne <39844191+Visne@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Vordenburg <114301317+Vordenburg@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Zymem <97173622+Zymem@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 fishfish458 <fishfish458>
# SPDX-FileCopyrightText: 2022 matthst <32034333+matthst@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Alekshhh <44923899+Alekshhh@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Kevin Zheng <kevinz5000@gmail.com>
# SPDX-FileCopyrightText: 2023 PixelTK <85175107+PixelTheKermit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 SonicHDC <100022571+SonicHDC@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 TemporalOroboros <TemporalOroboros@gmail.com>
# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Alice "Arimah" Heurlin <30327355+arimah@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 HS <81934438+HolySSSS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Jeff <velcroboy333@hotmail.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MACMAN2003 <macman2003c@gmail.com>
# SPDX-FileCopyrightText: 2024 Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nairod <110078045+Nairodian@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 PJBot <pieterjan.briers+bot@gmail.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Rouge2t7 <81053047+Sarahon@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Tayrtahn <tayrtahn@gmail.com>
# SPDX-FileCopyrightText: 2024 Truoizys <153248924+Truoizys@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 Vasilis <vasilis@pikachu.systems>
# SPDX-FileCopyrightText: 2024 Velcroboy <107660393+IamVelcroboy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Winkarst <74284083+Winkarst-cpu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 beck-thompson <107373427+beck-thompson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 osjarw <62134478+osjarw@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 Арт <123451459+JustArt1m@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 ActiveMammmoth <140334666+ActiveMammmoth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 ActiveMammmoth <kmcsmooth@gmail.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Thom <119594676+ItsMeThom@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 gus <august.eymann@gmail.com>
# SPDX-FileCopyrightText: 2025 keronshb <54602815+keronshb@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Evaisa <mail@evaisa.dev>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  name: chair
  id: SeatBase
  abstract: true
  description: You sit in this. Either by will or force.
  placement:
    mode: PlaceFree
  components:
  - type: Animateable
  - type: Clickable
  - type: InteractionOutline
  - type: Physics
    bodyType: Dynamic
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.2
        density: 100
        mask:
        - TableMask
  - type: Sprite
    sprite: Structures/Furniture/chairs.rsi
    noRot: true
  - type: Strap
    position: Stand
    buckleOffset: "0,-0.05"
  - type: Pullable
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: Metallic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
  - type: StaticPrice
    price: 50
  - type: Tag # goob edit
    tags:
    - Chair

#Starts unanchored, cannot be rotated while anchored
- type: entity
  name: chair
  id: UnanchoredChairBase
  parent: SeatBase
  abstract: true
  components:
  - type: Anchorable
  - type: Rotatable

#Start anchored, cannot be rotated while anchored
- type: entity
  name: chair
  id: ChairBase
  abstract: true
  parent: UnanchoredChairBase
  placement:
    mode: SnapgridCenter
  components:
  - type: Physics
    bodyType: Static
  - type: Transform
    anchored: true

#Starts unanchored, can be rotated while anchored
- type: entity
  name: chair
  id: OfficeChairBase
  parent: UnanchoredChairBase
  abstract: true
  components:
  - type: Rotatable
    rotateWhileAnchored: true

# Goobstation - rolly chairs that actually roll!
- type: entity
  name: chair
  id: RollingOfficeChairBase
  description: Scoot from desk to desk because standing is for interns.
  parent: BaseVehicle
  abstract: true
  components:
  - type: Anchorable
  - type: Rotatable
    rotateWhileAnchored: true
  - type: Sprite
    sprite: Structures/Furniture/chairs.rsi
    noRot: true
  - type: Strap
    position: Stand
    buckleOffset: "0,-0.05"
  - type: Vehicle
    requiredHands: 0
    engineRunning: true
    renderOver: North, NorthEast, NorthWest
  - type: MovementSpeedModifier
    acceleration: 10
    friction: 3.5
    baseSprintSpeed: 2.5
    baseWalkSpeed: 1.5
  - type: Damageable
    damageContainer: Inorganic
    damageModifierSet: Metallic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.2
        density: 75
        mask:
        - TableMask
  - type: StaticPrice
    price: 50
  - type: VehicleWallPush # Goob - Ability to push yourself off walls.
    actionProto: ActionVehicleWallPush
    kickSpeed: 10
    minDistance: 0
    maxDistance: 1.5
  - type: SprayPushableVehicle # Goob - Allows pushing yourself with a fire extinguisher
    multiplier: 0.05
    impulseDuration: 0.3

#Starts anchored, can be rotated while anchored
- type: entity
  name: stool
  id: StoolBase
  parent: OfficeChairBase
  abstract: true
  placement:
    mode: SnapgridCenter
  components:
  - type: Physics
    bodyType: Static
  - type: Transform
    anchored: true

- type: entity
  name: chair
  id: Chair
  parent: ChairBase
  components:
  - type: Sprite
    state: chair
  - type: Construction
    graph: Seat
    node: chair

- type: entity
  name: chair
  id: ChairGreyscale
  parent: Chair
  suffix: White
  components:
  - type: Sprite
    state: chair-greyscale
  - type: CosmicCorruptible # DeltaV - Cosmic Cult
    convertTo: CosmicChair

- type: entity
  name: stool
  id: Stool
  parent: UnanchoredChairBase
  description: Apply butt.
  components:
  - type: Sprite
    state: stool
  - type: Construction
    graph: Seat
    node: stool

- type: entity
  name: bar stool
  id: StoolBar
  parent: StoolBase
  components:
  - type: Sprite
    state: bar
  - type: Construction
    graph: Seat
    node: stoolBar

- type: entity
  name: brass chair
  id: ChairBrass
  parent: StoolBase
  components:
  - type: Sprite
    state: brass_chair
  - type: Construction
    graph: Seat
    node: chairBrass
  - type: CosmicCorruptible # DeltaV - Cosmic Cult
    convertTo: CosmicChair

- type: entity
  name: white office chair
  id: ChairOfficeLight
  parent: RollingOfficeChairBase # Goobstation - make the rolly chairs roll!
  components:
  - type: Sprite
    state: office-white
  - type: Construction
    graph: Seat
    node: chairOffice

- type: entity
  name: dark office chair
  id: ChairOfficeDark
  parent: ChairOfficeLight
  components:
  - type: Sprite
    state: office-dark
  - type: Construction
    graph: Seat
    node: chairOfficeDark

- type: entity
  name: comfy chair
  id: ComfyChair
  parent: ChairBase
  description: It looks comfy.
  components:
  - type: Sprite
    state: comfy
  - type: Construction
    graph: Seat
    node: chairComfy
  - type: CosmicCorruptible # DeltaV - Cosmic Cult
    convertTo: CosmicChair

- type: entity
  name: pilot seat
  id: ChairPilotSeat
  parent: ChairBase
  description: The pilot seat of a prestigious ship.
  components:
  - type: Sprite
    state: shuttle
  - type: Construction
    graph: Seat
    node: chairPilotSeat
  - type: CosmicCorruptible # DeltaV - Cosmic Cult
    convertTo: CosmicChair

- type: entity
  name: wooden chair
  id: ChairWood
  parent: UnanchoredChairBase
  components:
  - type: Sprite
    state: wooden
  - type: Construction
    graph: Seat
    node: chairWood
  - type: Damageable
    damageModifierSet: Wood
  - type: Destructible
    thresholds:
    - trigger: # Excess damage, don't spawn entities
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroy
      - !type:DoActsBehavior
        acts: ["Destruction"]
    - trigger:
        !type:DamageTrigger
        damage: 25
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroy
      - !type:SpawnEntitiesBehavior
        spawn:
          MaterialWoodPlank:
            min: 1
            max: 1
  - type: Tag
    tags:
    - Wooden
    - Chair # Goob
  - type: StaticPrice
    price: 75

- type: entity
  name: ritual chair
  id: ChairRitual
  parent: ChairWood
  description: Looks uncomfortable.
  components:
  - type: Sprite
    state: ritual
  - type: Construction
    graph: RitualSeat
    node: chairRitual

- type: entity
  id: ChairMeat
  parent: UnanchoredChairBase
  name: meat chair
  description: Uncomfortably sweaty.
  components:
  - type: Sprite
    state: meat
  - type: Construction
    graph: Seat
    node: chairMeat

- type: entity
  name: cursed chair
  id: ChairCursed
  parent: ChairWood
  description: It's staring back.
  components:
  - type: Sprite
    state: cursed
  - type: Strap
    buckleSound:
      collection: MaleScreams
  - type: Destructible
    thresholds:
    - trigger: # Excess damage, don't spawn entities
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          path: /Audio/Voice/Human/womanlaugh.ogg
      - !type:DoActsBehavior
        acts: ["Destruction"]
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          path: /Audio/Voice/Human/womanlaugh.ogg
      - !type:SpawnEntitiesBehavior
        spawn:
          MaterialWoodPlank:
            min: 1
            max: 1
  - type: Construction
    graph: RitualSeat
    node: chairCursed

- type: entity
  name: web chair
  id: ChairWeb
  description: For true web developers.
  parent: UnanchoredChairBase
  components:
  - type: Sprite
    sprite: Structures/Web/chair.rsi
    state: icon
  - type: MeleeSound
    soundGroups:
      Brute:
        path:
          "/Audio/Weapons/slash.ogg"
  - type: Damageable
    damageModifierSet: Web
  - type: Destructible
    thresholds:
    - trigger: # Excess damage, don't spawn entities
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroy
      - !type:DoActsBehavior
        acts: ["Destruction"]
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroy
      - !type:SpawnEntitiesBehavior
        spawn:
          MaterialWebSilk:
            min: 1
            max: 1
  - type: Construction
    graph: WebStructures
    node: chair

- type: entity
  parent: [SeatBase, BaseDeployFoldable]
  id: ChairFolding
  name: folding chair
  description: If you carry six of these you become the coolest kid at church.
  components:
  - type: Rotatable
  - type: Sprite
    sprite: Structures/Furniture/folding_chair.rsi
    layers:
    - state: folding
      map: ["unfoldedLayer"]
    - state: folding_folded
      map: ["foldedLayer"]
      visible: false
  - type: Item
    size: Huge
  - type: Appearance
  - type: MeleeWeapon
    damage:
      types:
        Blunt: 8
    soundHit:
      collection: MetalThud
  - type: Construction
    graph: Seat
    node: chairFolding
  - type: DamageExaminable

- type: entity
  parent: ChairFolding
  id: ChairFoldingSpawnFolded
  suffix: folded
  components:
  - type: Foldable
    folded: true
  - type: Strap
    enabled: False

- type: entity
  name: steel bench
  id: SteelBench
  parent: ChairBase
  description: A long chair made for a metro. Really standard design.
  components:
  - type: Sprite
    state: steel-bench
  - type: Construction
    graph: Seat
    node: chairSteelBench

- type: entity
  name: wooden bench
  id: WoodenBench
  parent: ChairBase
  description: Did you get a splinter? Well, at least it’s eco friendly.
  components:
  - type: Sprite
    state: wooden-bench
  - type: Construction
    graph: Seat
    node: chairWoodBench
  - type: Destructible
    thresholds:
    - trigger: # Excess damage, don't spawn entities
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroy
      - !type:DoActsBehavior
        acts: ["Destruction"]
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroy
      - !type:SpawnEntitiesBehavior
        spawn:
          MaterialWoodPlank:
            min: 2
            max: 4
  - type: StaticPrice
    price: 50
