- 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
    damageModifierSet: Metallic
  - type: Injurable
    damageContainer: Inorganic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
  - type: StaticPrice
    price: 50

#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

#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: 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: entity
  name: white office chair
  id: ChairOfficeLight
  parent: OfficeChairBase
  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: 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: 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:
        !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
  - 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:
        !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:
        !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: 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: cardboard stool
  id: CardStool
  parent: UnanchoredChairBase
  description: Make sure you sit *really* gently.
  components:
  - type: Sprite
    state: card-stool
  - type: Construction
    graph: Seat
    node: stoolCard
  - type: Damageable
    damageModifierSet: Card
  - type: Injurable
    damageContainer: Inorganic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 10
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          MaterialCardboard:
            min: 1
            max: 2
      - !type:DoActsBehavior
        acts: ["Destruction"]

- 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:
        !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

- type: entity
  parent: StoolBase
  id: ChairXeno
  name: xeno chair
  components:
  - type: Sprite
    state: xeno-chair
