- type: entity
  id: Dresser
  parent: BaseStructure
  name: dresser
  description: Wooden dresser, can store things inside itself, ideal for underwear, and someone's kidneys?...
  components:
  - type: Sprite
    sprite: Structures/Furniture/furniture.rsi
    state: dresser
  - type: Damageable
    damageModifierSet: Wood
    damageContainer: StructuralInorganic
  - type: Destructible
    thresholds:
    - trigger: # Excess damage, don't spawn entities
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          MaterialWoodPlank1:
            min: 3
            max: 3
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Storage
    grid:
    - 0,0,6,3
    maxItemSize: Normal
  - type: ContainerContainer
    containers:
      storagebase: !type:Container
  - type: UserInterface
    interfaces:
      enum.StorageUiKey.Key:
        type: StorageBoundUserInterface
  - type: InteractionOutline
  - type: Clickable
  - type: Tag
    tags:
    - Wooden
  - type: Anchorable
  - type: Rotatable
  - type: Construction
    graph: Dresser
    node: dresser

- type: entity
  id: DresserFilled
  parent: Dresser
  suffix: Filled
  components:
  - type: EntityTableContainerFill #TODO: make these tables in any way consistent
    containers:
      storagebase: !type:AllSelector
        children:
        - !type:NestedSelector
          tableId: DresserMainLootEntityTable
        - !type:NestedSelector
          tableId: DresserSecondLootEntityTable
        - !type:NestedSelector
          tableId: DresserThirdLootEntityTable

- type: entityTable
  id: DresserMainLootEntityTable
  table: !type:GroupSelector
    children:
    - id: ClothingNeckLGBTPin
      weight: 0.06
    - id: ClothingUniformJumpsuitColorGrey
      weight: 0.06
    - id: ClothingUniformJumpskirtColorGrey
      weight: 0.06
    - id: ClothingUniformJumpsuitColorWhite
      weight: 0.05
    - id: ClothingUniformJumpsuitColorPink
      weight: 0.05
    - id: ClothingUniformJumpsuitLoungewear
      weight: 0.05
    - id: ClothingUniformJumpskirtBlackElegantDress
      weight: 0.05
    - id: ClothingUniformJumpskirtRedElegantDress
      weight: 0.05
    - id: ClothingUniformJumpskirtGreenElegantDress
      weight: 0.05
    - id: ClothingUniformJumpskirtBlueElegantDress
      weight: 0.05
    - id: ClothingUniformJumpskirtPurpleElegantDress
      weight: 0.05
    - id: ClothingUniformJumpskirtCyanStripedDress
      weight: 0.05
    - id: ClothingUniformJumpskirtRedStripedDress
      weight: 0.05
    - id: ClothingUniformJumpskirtGreenStripedDress
      weight: 0.05
    - id: ClothingUniformJumpskirtPinkStripedDress
      weight: 0.05
    - id: ClothingUniformJumpskirtOrangeStripedDress
      weight: 0.05
    - id: ClothingUniformJumpskirtPurpleTurtleneckDress
      weight: 0.05
    - id: ClothingUniformJumpskirtRedTurtleneckDress
      weight: 0.05
    - id: ClothingUniformJumpskirtGreenTurtleneckDress
      weight: 0.05
    - id: ClothingUniformJumpskirtBlueTurtleneckDress
      weight: 0.05
    - id: ClothingUniformJumpskirtYellowTurtleneckDress
      weight: 0.05
    - id: ClothingUniformJumpskirtYellowOldDress
      weight: 0.05
    - id: ClothingUniformJumpsuitColorBlue
      weight: 0.03
    - id: ClothingUniformJumpsuitColorYellow
      weight: 0.03
    - id: ClothingUniformJumpskirtColorYellow
      weight: 0.03
    - id: ClothingUniformJumpsuitColorGreen
      weight: 0.03
    - id: ClothingUniformJumpskirtColorOrange
      weight: 0.03
    - id: ClothingUniformJumpsuitColorRed
      weight: 0.03
    - id: ClothingUniformJumpskirtColorRed
      weight: 0.03
    - id: ClothingUniformJumpsuitColorPurple
      weight: 0.03
    - id: ClothingUniformJumpskirtColorPurple
      weight: 0.03
    - id: ClothingUniformJumpsuitColorDarkBlue
      weight: 0.03
    - id: ClothingUniformJumpskirtColorDarkBlue
      weight: 0.03
    - id: ClothingShoesColorBlack
      weight: 0.03
    - id: ClothingNeckScarfStripedRed
      weight: 0.03
    - id: ClothingNeckScarfStripedBlue
      weight: 0.03
    - id: ClothingNeckScarfStripedGreen
      weight: 0.03
    - id: BedsheetGrey
      weight: 0.03
    - id: ClothingUniformJumpsuitHawaiBlue
      weight: 0.03
    - id: ClothingUnderSocksCoder
      weight: 0.03
    - id: ClothingShoesWizard
      weight: 0.03
    - id: ClothingShoesBootsWork
      weight: 0.03
    - id: ClothingHandsGlovesLatex
      weight: 0.008
    - id: ClothingHandsGlovesColorWhite
      weight: 0.008
    - id: ClothingHandsGlovesBoxingYellow
      weight: 0.008
    - id: ClothingUniformJumpskirtJanimaid
      weight: 0.005
    - id: ClothingUniformJumpskirtJanimaidmini
      weight: 0.005
    - id: ClothingNeckScarfStripedSyndieRed
      weight: 0.005
    - id: ClothingHandsGlovesColorYellowBudget
      weight: 0.002
    - id: ClothingUniformJumpsuitPyjamaSyndicatePink
      weight: 0.002
    - id: FoodTinMRE
      weight: 0.010
    - id: FoodCornTrash
      weight: 0.010
    - id: FoodTinPeachesMaintTrash
      weight: 0.010
    - id: PaperRolling1
      weight: 0.010
    - id: FoodTinPeachesTrash
      weight: 0.010
    - id: FoodFrozenPopsicleTrash
      weight: 0.010
    - id: FoodPlateTrash
      weight: 0.010
    - id: FoodFrozenSnowconeTrash
      weight: 0.010
    - id: FoodTinBeansTrash
      weight: 0.010
    - id: FoodTinMRETrash
      weight: 0.010
    - id: TrashBananaPeel
      weight: 0.010
    - id: FoodPlateSmallTrash
      weight: 0.010
    - id: FoodBowlBigTrash
      weight: 0.010
    - id: ClothingUniformJumpskirtTacticalMaid
      weight: 0.001
    - id: ClothingUniformJumpsuitNanotrasen
      weight: 0.001

- type: entityTable
  id: DresserSecondLootEntityTable
  table: !type:GroupSelector
    children:
    - id: Pen # It`s pen.
      weight: 0.03
    - id: ClothingOuterHoodieBlack
      weight: 0.03
    - id: ClothingOuterWinterClown
      weight: 0.03
    - id: ClothingOuterCoatBomber
      weight: 0.03
    - id: ClothingEyesEyepatch
      weight: 0.03
    - id: ClothingMaskBreath
      weight: 0.03
    - id: ClothingOuterCoatLab
      weight: 0.03
    - id: ClothingOuterDameDane
      weight: 0.03
    - id: ClothingOuterWinterCoat
      weight: 0.03
    - id: ClothingMaskFox
      weight: 0.03
    - id: ClothingEyesGlassesGar
      weight: 0.03
    - id: ClothingOuterCoatGentle
      weight: 0.03
    - id: ClothingOuterSuitShrineMaiden
      weight: 0.03
    - id: ClothingOuterClownPriest
      weight: 0.02
    - id: ClothingMaskNeckGaiter
      weight: 0.02
    - id: ClothingMaskGas
      weight: 0.008
    - id: CablecuffsBroken
      weight: 0.008
    - id: ClothingOuterVestHazard
      weight: 0.008
    - id: ClothingOuterGhostSheet
      weight: 0.008
    - id: ClothingOuterCoatJensen
      weight: 0.005
    - id: ClothingMaskMuzzle
      weight: 0.003
    - id: FoodTinMRE
      weight: 0.010
    - id: FoodCornTrash
      weight: 0.010
    - id: FoodTinPeachesMaintTrash
      weight: 0.010
    - id: PaperRolling1
      weight: 0.010
    - id: FoodTinPeachesTrash
      weight: 0.010
    - id: FoodFrozenPopsicleTrash
      weight: 0.010
    - id: FoodPlateTrash
      weight: 0.010
    - id: FoodFrozenSnowconeTrash
      weight: 0.010
    - id: FoodTinBeansTrash
      weight: 0.010
    - id: FoodTinMRETrash
      weight: 0.010
    - id: TrashBananaPeel
      weight: 0.010
    - id: FoodPlateSmallTrash
      weight: 0.010
    - id: FoodBowlBigTrash
      weight: 0.010
    - id: Shiv
      weight: 0.001
    - id: BikeHorn
      weight: 0.001
    - id: DrinkWaterBottleFull
      weight: 0.001
    - id: BrokenBottle
      weight: 0.001
    - id: FoodMeatRotten
      weight: 0.001
    - id: ClothingOuterSkub
      weight: 0.0008
    - id: ClothingOuterDogi
      weight: 0.00001
    - id: OrganHumanHead
      weight: 0.00001
    - id: OrganHumanKidneys
      weight: 0.00001

- type: entityTable
  id: DresserThirdLootEntityTable
  table: !type:GroupSelector
    children:
    - id: ClothingUniformJumpskirtColorWhite
      weight: 0.05
    - id: ClothingUniformJumpskirtColorPink
      weight: 0.05
    - id: ClothingUniformJumpskirtColorBlue
      weight: 0.03
    - id: ClothingUniformJumpskirtColorGreen
      weight: 0.03
    - id: ClothingUniformJumpsuitColorOrange
      weight: 0.03
    - id: ClothingUniformJumpsuitColorTeal
      weight: 0.03
    - id: ClothingUniformJumpskirtColorTeal
      weight: 0.03
    - id: ClothingHeadHatGreysoft
      weight: 0.03
    - id: ClothingHeadHatCorpsoft
      weight: 0.03
    - id: ClothingHeadHatBunny
      weight: 0.03
    - id: BedsheetNT
      weight: 0.03
    - id: ClothingHeadHatPaper
      weight: 0.03
    - id: ClothingHeadHatWitch
      weight: 0.03
    - id: ClothingHeadHatFedoraGrey
      weight: 0.03
    - id: ClothingHeadHatAnimalHeadslime
      weight: 0.03
    - id: ClothingMultipleHeadphones
      weight: 0.03
    - id: ClothingUnderSocksBee
      weight: 0.03
    - id: ClothingHeadHatAnimalMonkey
      weight: 0.03
    - id: ClothingHeadHatShrineMaidenWig
      weight: 0.03
    - id: ClothingOuterPoncho
      weight: 0.03
    - id: ClothingHeadHatBeret
      weight: 0.03
    - id: PlushieLizard
      weight: 0.03
    - id: ClothingHeadHatXmasCrown
      weight: 0.02
    - id: ClothingHeadHatBeretBrigmedic
      weight: 0.02
    - id: ClothingHeadPyjamaSyndicatePink
      weight: 0.002
    - id: ClothingHeadHatTacticalMaidHeadband
      weight: 0.001
    - id: FoodTinMRE
      weight: 0.010
    - id: FoodCornTrash
      weight: 0.010
    - id: FoodTinPeachesMaintTrash
      weight: 0.010
    - id: PaperRolling1
      weight: 0.010
    - id: FoodTinPeachesTrash
      weight: 0.010
    - id: FoodFrozenPopsicleTrash
      weight: 0.010
    - id: FoodPlateTrash
      weight: 0.010
    - id: FoodFrozenSnowconeTrash
      weight: 0.010
    - id: FoodTinBeansTrash
      weight: 0.010
    - id: FoodTinMRETrash
      weight: 0.010
    - id: TrashBananaPeel
      weight: 0.010
    - id: FoodPlateSmallTrash
      weight: 0.010
    - id: FoodBowlBigTrash
      weight: 0.010
    - id: ClothingNeckCloakMoth
      weight: 0.0003
    - id: ClothingUniformJumpsuitPrisoner
      weight: 0.0003
    - id: ClothingUniformJumpskirtPrisoner
      weight: 0.0003
    - id: ClothingOuterWinterCentcom
      weight: 0.0001
    - id: ClothingUniformJumpskirtOfLife
      weight: 0.0001
    - id: ClothingUniformJumpsuitSyndieFormal
      weight: 0.0001
    - id: ClothingUniformJumpskirtSyndieFormalDress
      weight: 0.0001
    - id: ClothingOuterWinterSyndie
      weight: 0.0001
    - id: ClothingHeadHatRichard
      weight: 0.0001
