- type: entity
  parent: BaseStructureDynamic
  id: SmartFridge
  name: SmartFridge
  description: A refrigerated storage unit for keeping items cold and fresh.
  components:
  # Mono Start
  - type: Machine
    board: SmartfridgeCircuitboard
  - type: Construction
    graph: Machine
    node: machine
    containers:
    - machine_parts
    - machine_board
  # Mono End
  - type: StationAiWhitelist
  - type: Advertise
    pack: SmartFridgeAds
  - type: Speech
  - type: Appearance
  - type: Sprite
    sprite: Structures/Machines/smartfridge.rsi
    snapCardinals: true
    layers:
    - state: smartfridge
      map: ["enum.StorageVisualLayers.Base"]
    - state: smartfridge_door
      map: ["enum.StorageVisualLayers.Door"]
      shader: unshaded
  - type: PointLight
    radius: 1.5
    energy: 1.6
    color: "#9dc5c9"
  - type: ContainerContainer
    containers:
      machine_board: !type:Container # Mono
      machine_parts: !type:Container # Mono
      smart_fridge_inventory: !type:Container
  - type: LitOnPowered
  - type: ApcPowerReceiver
    powerLoad: 200
  - type: ExtensionCableReceiver
  - type: SmartFridge
    whitelist:
      components:
      - FitsInDispenser
      - Pill
      - Produce
      - Seed
      tags:
      - PillCanister
      - Bottle
      - Syringe
      - ChemDispensable
  - type: ActivatableUI
    key: enum.SmartFridgeUiKey.Key
  - type: ActivatableUIRequiresPower
  - type: UserInterface
    interfaces:
      enum.SmartFridgeUiKey.Key:
        type: SmartFridgeBoundUserInterface
  - type: AccessReader
  - type: UseDelay
    delay: 1
  - type: AntiRottingContainer
  - type: ResistLocker
  - type: Physics
    bodyType: Static
  - type: Transform
    noRot: true
    anchored: True
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.45,-0.45,0.45,0.45"
        mask:
        - MachineMask
        layer:
        - MachineLayer
        density: 200
  - type: Anchorable
    delay: 2
  - type: InteractionOutline
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:DoActsBehavior
        acts: ["Breakage"]
    - trigger:
        !type:DamageTrigger
        damage: 200
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetSteel1:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
  - type: Damageable
    damageContainer: StructuralInorganic
    damageModifierSet: Metallic
  - type: DamageOnHighSpeedImpact
    damage:
      types:
        Blunt: 5
    soundHit:
      collection: MetalThud
  - type: ExplosionResistance
    damageCoefficient: 0.1

- type: entity
  parent: SmartFridge
  id: SmartFridgeMedical
  suffix: Medical, Locked # Mono
  components:
  - type: SmartFridge
    flavorText: smart-fridge-request-chemistry
  - type: AccessReader
    access: [["Medical"]]
