# Basic chair
- type: Tag
  id: RMCSeat

- type: entity
  abstract: true
  parent: SeatBase
  id: CMSeatBase
  name: abstract chair
  suffix: RMC
  components:
  - type: Corrodible
    timeToApply: 4
    structure: true
  - type: Sprite
    sprite: _RMC14/Structures/Furniture/chairs.rsi
    state: chair
  - type: Tag
    tags:
    - RMCSeat
  - type: RMCMesonsNonviewable
  - type: Damageable
    damageContainer: StructuralMarine
    damageModifierSet: StructuralMarine
  - type: MeleeReceivedMultiplier
    xenoDamage:
      types:
        Slash: 51
    otherMultiplier: 1
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
      - !type:SpawnEntitiesBehavior
        spawn:
          CMSheetMetal1:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: ["Destruction"]

- type: entity
  parent: [ CMSeatBase, ChairFolding ]
  id: CMChair
  name: chair
  description: A rectangular metallic frame sitting on four legs with a back panel. Designed to fit the sitting position, more or less comfortably.
  components:
  - type: Transform
    anchored: true
  - type: Physics
    bodyType: Static
  - type: Foldable
    anchorOnUnfold: true
  - type: Sprite
    sprite: _RMC14/Structures/Furniture/folding_chair.rsi
    layers:
    - state: chair
      map: ["unfoldedLayer"]
    - state: chair_folded
      map: ["foldedLayer"]
      visible: false
  - type: MeleeWeapon
    damage:
      types:
        Blunt: 1
    soundHit:
      path: /Audio/_RMC14/Items/metal_chair_clang.ogg
  - type: Wieldable
  - type: IncreaseDamageOnWield
    damage:
      types:
        Blunt: 10
  - type: Construction
    graph: CMSeat
    node: chair
  - type: RMCStaminaDamageOnHit
    requiresWield: true
    damage: 17

- type: entity
  parent: CMChair
  id: CMChairFolded
  suffix: RMC|folded
  components:
  - type: Foldable
    folded: true
  - type: Strap
    enabled: false

- type: entity
  parent: CMSeatBase
  id: CMChairNonFold
  abstract: true
  name: chair
  description: A rectangular metallic frame sitting on four legs with a back panel. Designed to fit the sitting position, more or less comfortably.
  components:
  - type: Transform
    anchored: false
  - type: Sprite
    sprite: _RMC14/Structures/Furniture/chairs.rsi
    state: chair
  - type: Physics
    bodyType: Static
  - type: Construction
    graph: CMSeat
    node: chair

- type: entity
  parent: CMChairNonFold
  id: CMChairAlt
  components:
  - type: Sprite
    sprite: _RMC14/Structures/Furniture/chairs.rsi
    state: chair_alt

- type: entity
  parent: CMChairNonFold
  id: RMCStool
  name: stool
  description: Apply butt.
  components:
  - type: Sprite
    state: stool
  - type: Construction
    graph: CMSeat
    node: stool

# Comfy chair
- type: entity
  parent: CMSeatBase
  id: CMChairComfy
  name: comfy chair
  description: A chair with leather padding and adjustable headrest. You could probably sit in one of these for ages.
  placement:
    mode: SnapgridCenter
  components:
  - type: Sprite
    state: comfychair
  - type: Transform
    anchored: true
  - type: Physics
    bodyType: Static
  - type: Construction
    graph: CMSeat
    node: chairComfy

- type: entity
  parent: CMChairComfy
  id: CMChairComfyARES
  description: A functional chair designed for comfortably sitting a single person with intent to facilitate interactions with the ship AI.
  suffix: RMC|ARES
  components:
  - type: Sprite
    state: comfychair_ares

- type: entity
  parent: CMChairComfyARES
  id: RMCChairComfyAI
  name: AI interface chair
  suffix: RMC|AI
  components:
  - type: Sprite
    state: ai_interface_chair

- type: entity
  parent: CMChairComfy
  id: CMChairComfyBeige
  suffix: RMC|Beige
  components:
  - type: Sprite
    state: comfychair_beige

- type: entity
  parent: CMChairComfy
  id: CMChairComfyBlack
  suffix: RMC|Black
  components:
  - type: Sprite
    state: comfychair_black

- type: entity
  parent: CMChairComfy
  id: CMChairComfyBlue
  suffix: RMC|Blue
  components:
  - type: Sprite
    state: comfychair_blue

- type: entity
  parent: CMChairComfy
  id: CMChairComfyLime
  suffix: RMC|Lime
  components:
  - type: Sprite
    state: comfychair_lime

- type: entity
  parent: CMChairComfy
  id: CMChairComfyOrange
  suffix: RMC|Orange
  components:
  - type: Sprite
    state: comfychair_orange

- type: entity
  parent: CMChairComfy
  id: CMChairComfyTeal
  suffix: RMC|Teal
  components:
  - type: Sprite
    state: comfychair_teal

- type: entity
  parent: CMChairComfy
  id: CMChairComfyAlpha
  description: A simple chair permanently attached to the floor, with the spinning parts removed to force soldiers with low attention spans to keep still during briefings. Covered with a squeaky and way too hard faux-leather, unevenly painted in Alpha squad red. Only for the bravest and freshest Marine recruits.
  suffix: RMC|Alpha
  components:
  - type: Sprite
    state: comfychair_alpha

- type: entity
  parent: CMChairComfy
  id: CMChairComfyBravo
  description: A simple chair permanently attached to the floor, with the spinning parts removed to force soldiers with low attention spans to keep still during briefings. Covered with a squeaky and way too hard faux-leather, unevenly painted in Bravo squad brown. Certified fortified on all sides from enemy incursion.
  suffix: RMC|Bravo
  components:
  - type: Sprite
    state: comfychair_bravo

- type: entity
  parent: CMChairComfy
  id: CMChairComfyCharlie
  description: A simple chair permanently attached to the floor, with the spinning parts removed to force soldiers with low attention spans to keep still during briefings. Covered with a squeaky and way too hard faux-leather, unevenly painted in Charlie squad purple. Feels out of place without a full breakfast to accompany it.
  suffix: RMC|Charlie
  components:
  - type: Sprite
    state: comfychair_charlie

- type: entity
  parent: CMChairComfy
  id: CMChairComfyDelta
  description: A simple chair permanently attached to the floor, with the spinning parts removed to force soldiers with low attention spans to keep still during briefings. Covered with a squeaky and way too hard faux-leather, unevenly painted in Delta squad blue. This chair is most likely to be the first to fight and first to die.
  suffix: RMC|Delta
  components:
  - type: Sprite
    state: comfychair_delta

- type: entity
  parent: CMChairComfy
  id: RMCChairComfyAlien
  name: alien chair
  suffix: RMC|Alien
  components:
  - type: Sprite
    state: comfychair_alien

# Office chair
- type: entity
  parent: CMSeatBase
  id: CMChairOfficeDark
  name: dark office chair
  components: # RMC14 Non-parity: Not rotatable
  - type: Sprite
    state: officechair_dark
  - type: Construction
    graph: CMSeat
    node: chairOfficeDark
  - type: Rotatable
    rotateWhileAnchored: true

- type: entity
  parent: CMChairOfficeDark
  id: CMChairOfficeWhite
  name: white office chair
  components:
  - type: Sprite
    state: officechair_white
  - type: Construction
    graph: CMSeat
    node: chairOfficeWhite
  - type: Rotatable
    rotateWhileAnchored: true

# Wooden chair
- type: entity
  parent: CMSeatBase
  id: CMChairWood
  name: wooden chair
  description: Old is never too old to not be in fashion.
  components:
  - type: Sprite
    state: wooden_chair
  - type: Damageable
    damageModifierSet: Wood
  - type: Tag
    tags:
    - Wooden
  - type: StaticPrice
    price: 75
  - type: MeleeReceivedMultiplier
    xenoDamage:
      types:
        Slash: 51
    otherMultiplier: 1
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroy
      - !type:SpawnEntitiesBehavior
        spawn:
          RMCPlankWood1:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: ["Destruction"]

- type: entity
  parent: CMChairWood
  id: CMChairWoodWings
  description: Old is never too old to not be in fashion.
  components:
  - type: Sprite
    state: wooden_chair_wings
