- type: entity
  id: SpiderWebBase
  abstract: true
  placement:
    mode: SnapgridCenter
    snap:
    - Wall
  components:
  - type: PlacementReplacement
    key: web
  - type: MeleeSound
    soundGroups:
      Brute:
        path:
          "/Audio/Weapons/slash.ogg"
  - type: Sprite
    sprite: Structures/floor_web.rsi
    drawdepth: WallMountedItems
  - type: Appearance
  - type: Clickable
  - type: Transform
    anchored: true
  - type: Physics
  - type: Damageable
    damageModifierSet: Wood
  - type: Temperature
    heatDamage:
      types:
        Heat: 5
    coldDamage: {}
    coldDamageThreshold: 0
  - type: Flammable
    fireSpread: true
    damage:
      types:
        Heat: 5
  - type: Reactive
    groups:
      Flammable: [Touch]
      Extinguish: [Touch]
  - type: SpiderWebObject
  - type: IconSmooth
    key: web
    additionalKeys:
    - walls
    base: web_

- type: entity
  id: SpiderWeb
  parent: SpiderWebBase
  name: spider web
  description: It's stringy and sticky.
  components:
  - type: Sprite
    color: "#ffffffdd"
  - type: Fixtures
    fixtures:
      fix1:
        hard: false
        density: 7
        shape:
          !type:PhysShapeAabb
          bounds: "-0.5,-0.5,0.5,0.5"
        layer:
        - MidImpassable
  - type: Destructible
    thresholds:
    - trigger: # Excess damage, don't spawn entities
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
    - trigger:
        !type:DamageTrigger
        damage: 10
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:SpawnEntitiesBehavior
        spawn:
          MaterialWebSilk:
            min: 0
            max: 1
  - type: SpeedModifierContacts
    walkSpeedModifier: 0.5
    sprintSpeedModifier: 0.5
    ignoreWhitelist:
      components:
      - IgnoreSpiderWeb

- type: entity
  id: SpiderWebClown
  parent: SpiderWebBase
  name: clown spider web
  description: It's stringy and slippy.
  components:
  - type: Sprite
    color: "#ffa3fc"
  - type: Slippery
  - type: StepTrigger
    intersectRatio: 0.2
  - type: Fixtures
    fixtures:
      slips:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.4,-0.4,0.4,0.4"
        hard: false
        layer:
        - SlipLayer
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.4,-0.4,0.4,0.4"
        density: 1000
        mask:
        - ItemMask
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 10
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: FlavorProfile
    flavors:
      - sweet
  - type: Edible
    delay: 2
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: Sugar
          Quantity: 2
