- type: entity
  name: basic
  id: MobSpaceBasic
  parent: [ SimpleSpaceMobBase, MobNightVision ]
  abstract: true
  description: It looks friendly. Why don't you give it a hug?
  components:
  - type: HTN
    rootTask:
      task: SimpleHostileCompound
  - type: NpcFactionMember
    factions:
    - SimpleHostile
  - type: Sprite
    drawdepth: Mobs
    sprite: Mobs/Animals/bear.rsi
    layers:
    - map: [ "enum.DamageStateVisualLayers.Base" ]
      state: bear
    - map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ]
      state: glow
      shader: unshaded
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.40
        density: 100
        mask:
        - MobMask
        layer:
        - MobLayer
  - type: MobThresholds
    thresholds:
      0: Alive
      80: Dead
  - type: Stamina
    baseCritThreshold: 150
  - type: MovementAlwaysTouching
  - type: Bloodstream
    bloodReferenceSolution:
      reagents:
      - ReagentId: Cryoxadone
        Quantity: 300
  - type: CombatMode
  - type: Temperature
  - type: TemperatureDamage
    heatDamageThreshold: 500
    coldDamageThreshold: 0
  - type: MeleeWeapon
    soundHit:
        path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
    angle: 0
    animation: WeaponArcClaw
    damage:
      types:
        Blunt: 5
        Slash: 10
  - type: Tag
    tags:
    - DoorBumpOpener
    - FootstepSound
  - type: Puller
    needsHands: false
  - type: PointLight
    radius: 1.2
    energy: 2
    color: "#4faffb"
  - type: GhostTakeoverAvailable
  - type: Speech
    speechVerb: LargeMob

- type: entity
  name: space bear
  id: MobBearSpace
  parent: [MobSpaceBasic, BaseSlicingRefinable]
  description: It looks friendly. Why don't you give it a hug?
  components:
  - type: Sprite
    drawdepth: Mobs
    sprite: Mobs/Animals/bear.rsi
    layers:
    - map: [ "enum.DamageStateVisualLayers.Base" ]
      state: bear
    - map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ]
      state: glow
      shader: unshaded
  - type: DamageStateVisuals
    states:
      Alive:
        Base: bear
        BaseUnshaded: glow
      Critical:
        Base: bear_dead
      Dead:
        Base: bear_dead
  - type: ToolRefinable
    refineResult:
    - id: FoodMeatBear
      amount: 3
    - id: MaterialHideBear
      amount: 1
      prob: 0.3
  - type: ReplacementAccent
    accent: genericAggressive
  - type: Vocal
    emoteSounds: Bear
  - type: InteractionPopup
    successChance: 0.25
    interactSuccessString: petting-success-bear
    interactFailureString: petting-failure-bear
    interactSuccessSound:
      path: /Audio/Animals/sloth_squeak.ogg

- type: entity
  id: MobBearSpaceSalvage
  parent: MobBearSpace
  suffix: "Salvage Ruleset"
  components:
  - type: SalvageMobRestrictions

- type: entity
  name: space kangaroo
  id: MobKangarooSpace
  parent: [MobSpaceBasic, StripableInventoryBase, BaseSlicingRefinable]
  description: It looks friendly. Why don't you give it a hug?
  components:
  - type: Sprite
    drawdepth: Mobs
    sprite: Mobs/Animals/kangaroo.rsi
    layers:
    - map: [ "enum.DamageStateVisualLayers.Base" ]
      state: kangaroo-space
    - map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ]
      state: glow
      shader: unshaded
  - type: MeleeWeapon
    soundHit:
        path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
    angle: 0
    animation: WeaponArcClaw
    damage:
      types:
        Blunt: 9
        Slash: 2
  - type: MovementSpeedModifier
    baseWalkSpeed: 3.5
    baseSprintSpeed: 4.5
  - type: DamageStateVisuals
    states:
      Alive:
        Base: kangaroo-space
        BaseUnshaded: glow
      Critical:
        Base: kangaroo-space-crit
      Dead:
        Base: kangaroo-space-dead
  - type: Stamina
    baseCritThreshold: 180
  - type: Inventory
    speciesId: kangaroo
    templateId: spacekangaroo
  - type: Vocal
    emoteSounds: Kangaroo
  - type: ReplacementAccent
    accent: kangaroo
  - type: ToolRefinable
    refineResult:
    - id: FoodMeat
      amount: 1
  - type: MobThresholds
    thresholds:
      0: Alive
      60: Dead

- type: entity
  id: MobKangarooSpaceSalvage
  parent: MobKangarooSpace
  suffix: "Salvage Ruleset"
  components:
  - type: SalvageMobRestrictions

- type: entity
  name: space spider
  id: MobSpiderSpace
  parent: [MobSpaceBasic, BaseSlicingRefinable]
  description: It's so glowing, it looks dangerous.
  components:
  - type: Sprite
    drawdepth: Mobs
    sprite: Mobs/Animals/spacespider.rsi
    layers:
    - map: [ "enum.DamageStateVisualLayers.Base" ]
      state: spacespider
    - map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ]
      state: glow
      shader: unshaded
  - type: MobThresholds
    thresholds:
      0: Alive
      45: Dead
  - type: Stamina
    baseCritThreshold: 150
  - type: DamageStateVisuals
    states:
      Alive:
        Base: spacespider
        BaseUnshaded: glow
      Dead:
        Base: spacespider_dead
  - type: ToolRefinable
    refineResult:
    - id: FoodMeatSpider
      amount: 2
    - id: EggSpider
      amount: 1
      prob: 0.5
  - type: Bloodstream
    bloodReferenceSolution:
      reagents:
      - ReagentId: Cryoxadone
        Quantity: 250
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.35
        density: 120
        mask:
        - MobMask
        layer:
        - MobLayer
  - type: MeleeWeapon
    soundHit:
      path: /Audio/Effects/bite.ogg
    angle: 0
    animation: WeaponArcBite
    damage:
      types:
        Piercing: 6
        Poison: 4
  - type: SolutionManager
    solutions:
    - SolutionVenomSpiderSpace
  - type: MeleeChemicalInjector
    solution: melee
    transferAmount: 4
  - type: ReplacementAccent
    accent: xeno
  - type: InteractionPopup
    successChance: 0.20
    interactSuccessString: petting-success-tarantula
    interactFailureString: petting-failure-generic
  - type: PointLight
    radius: 1.2
    energy: 2
    color: "#4faffb"
  - type: NoSlip
  - type: IgnoreSpiderWeb
  - type: Speech
    speechVerb: Arachnid
    speechSounds: Arachnid
    allowedEmotes: ['Click', 'Chitter']
  - type: Vocal
    emoteSounds: UnisexArachnid
  - type: TypingIndicator
    proto: spider

- type: entity
  parent: [SolutionWeapon, SolutionTiny]
  id: SolutionVenomSpiderSpace
  categories: [ HideSpawnMenu ]
  components:
  - type: Solution
    solution:
      reagents:
      - ReagentId: ChloralHydrate
        Quantity: 30

- type: entity
  id: MobSpiderSpaceSalvage
  parent: MobSpiderSpace
  suffix: "Salvage Ruleset"
  components:
  - type: SalvageMobRestrictions

- type: entity
  name: space cobra
  id: MobCobraSpace
  parent: [MobSpaceBasic, BaseSlicingRefinable]
  description: Long fangs and a glowing hood, and the alluring look begs to come closer.
  components:
    - type: Sprite
      drawdepth: Mobs
      sprite: Mobs/Animals/spacecobra.rsi
      layers:
        - map: [ "enum.DamageStateVisualLayers.Base" ]
          state: spacecobra
        - map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ]
          state: glow
          shader: unshaded
    - type: FootstepModifier
      footstepSoundCollection:
        collection: FootstepSnake
    - type: MobThresholds
      thresholds:
        0: Alive
        45: Dead
    - type: Stamina
      baseCritThreshold: 150
    - type: DamageStateVisuals
      states:
        Alive:
          Base: spacecobra
          BaseUnshaded: glow
        Dead:
          Base: dead_spacecobra
    - type: ToolRefinable
      refineResult:
      - id: FoodMeatSnake
        amount: 2
      - id: UraniumOre1
        amount: 1
      - id: ClothingShoesSnakeskinBoots
        amount: 1
        prob: 0.3
    - type: Bloodstream
      bloodReferenceSolution:
        reagents:
        - ReagentId: Cryoxadone
          Quantity: 200
    - type: Fixtures
      fixtures:
        fix1:
          shape:
            !type:PhysShapeCircle
            radius: 0.40
          density: 120
          mask:
          - MobMask
          layer:
          - MobLayer
    - type: MeleeWeapon
      hidden: true
      soundHit:
        path: /Audio/Effects/bite.ogg
      angle: 0
      animation: WeaponArcBite
      damage:
        types:
          Piercing: 6
          Poison: 4
    - type: SolutionManager
      solutions:
      - SolutionVenomCobraSpace
    - type: MeleeChemicalInjector
      solution: melee
      transferAmount: 6
    - type: ReplacementAccent
      accent: xeno
    - type: InteractionPopup
      successChance: 0.2
      interactSuccessString: petting-success-snake
      interactFailureString: petting-failure-generic
    - type: PointLight
      radius: 1.1
      energy: 2.7
      color: "#4faffb"
    - type: Stealth
      enabledOnDeath: false
      maxVisibility: 1.2
    - type: StealthOnMove
      passiveVisibilityRate: -0.25
      movementVisibilityRate: 0.25

- type: entity
  parent: [SolutionWeapon, SolutionTiny]
  id: SolutionVenomCobraSpace
  categories: [ HideSpawnMenu ]
  components:
  - type: Solution
    solution:
      reagents:
      - ReagentId: NorepinephricAcid
        Quantity: 30

- type: entity
  id: MobCobraSpaceSalvage
  parent: MobCobraSpace
  suffix: "Salvage Ruleset"
  components:
    - type: SalvageMobRestrictions

- type: entity
  parent: [ SimpleSpaceMobBase, FlyingMobBase, MobSheepBase ]
  id: MobSheepSpace
  name: space sheep
  description: A sheep... in space!
  components:
  - type: Sprite
    drawdepth: Mobs
    layers:
    - state: space_sheep_bare
      map: [ "enum.DamageStateVisualLayers.Base" ]
      visible: true
      sprite: Mobs/Animals/sheep.rsi
    - state: space_sheep_wool_glowmask
      map: [ "wooly" ]
      visible: true
      sprite: Mobs/Animals/sheep.rsi
  - type: GenericVisualizer
    visuals:
      enum.ShearableVisuals.Shearable:
        wooly:
          True: {visible: true}
          False: {visible: false}
      enum.MobStateVisuals.State:
        wooly:
          Alive: {state: space_sheep_wool_glowmask}
          Dead: {state: space_sheep_wool_dead}
          Critical: {state: space_sheep_wool_dead}
  - type: Fixtures
    fixtures:
      fix1:
        shape: !type:PhysShapeCircle
          radius: 0.35
        density: 150
        mask:
        - FlyingMobMask
        layer:
        - FlyingMobLayer
  - type: Reproductive
    partnerWhitelist:
      tags:
      - Sheep
    offspring:
    - id: MobSheep
  - type: DamageStateVisuals
    states:
      Alive:
        Base: space_sheep_harvested
      Critical:
        Base: space_sheep_dead
      Dead:
        Base: space_sheep_dead
  - type: Shearable
    targetSolutionName: wool
    shearedProductId: MaterialDurathread1
    solutionPerProduct: 10
    toolQuality: Shearing
    shearableMarkupText: space-sheep-shearable-examine-markup
    unShearableMarkupText: space-sheep-not-shearable-examine-markup
    # Caused problems (SAD), to be re-implemented when we get a real particle system.
  # - type: ActiveJetpack # Pretty particles
  #   effectCooldown: 4
  #   maxDistance: 0.3
  - type: MovementSpeedModifier
    baseWalkSpeed: 0.6
    baseSprintSpeed: 2.0
  - type: PointLight # Glows a little bit to see better in deep space.
    radius: 2.0
    energy: 1.0
    color: "#4795ff" # Light blue colour.
  - type: InteractionPopup
    successChance: 0.8 #SHEEP so FRIEND!!! HUG! SQUISHY! SOFT!
    interactDelay: 1
    interactSuccessString: petting-success-sheep
    interactFailureString: petting-failure-sheep
    interactSuccessSpawn: EffectHearts #🥰
    interactSuccessSound:
      collection: SheepSpace
      params:
        variation: 0.05
  - type: MobPrice
    price: 600
  - type: Wooly
    quantity: 10
    growthDelay: 120 #2 minutes
  - type: Speech
    speechSounds: SheepSpace
    speechVerb: Sheep
  - type: Vocal
    emoteSounds: SheepSpace

- type: entity
  parent: [SimpleSpaceMobBase, BaseMobAnimal, SolutionVermin, MobNightVision]
  id: MobSnail
  name: snail
  description: Revolting unless you're french.
  components:
  - type: GhostRole
    makeSentient: true
    allowSpeech: false
    allowMovement: true
    name: ghost-role-information-snail-name
    description: ghost-role-information-snail-description
    rules: ghost-role-information-freeagent-rules
    mindRoles:
    - MindRoleGhostRoleFreeAgentHarmless
  - type: GhostTakeoverAvailable
  - type: Emoting
  - type: Sprite
    drawdepth: SmallMobs
    sprite: Mobs/Animals/snail.rsi
    layers:
    - map: ["enum.DamageStateVisualLayers.Base"]
      state: snail
  - type: Item
    size: Tiny
  - type: NpcFactionMember
    factions:
      - Mouse
  - type: HTN
    constantlyReplan: false
    rootTask:
      task: MouseCompound
  - type: Physics
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.2
        density: 100
        mask:
        - SmallMobMask
        layer:
        - SmallMobLayer
  - type: MobState
  - type: Deathgasp
  - type: MobStateActions
    actions:
      Critical:
      - ActionCritSuccumb
      - ActionCritFakeDeath
      - ActionCritLastWords
  - type: MobThresholds
    thresholds:
      0: Alive
      10: Critical
      20: Dead
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTypeTrigger
        damageType: Blunt
        damage: 40
      behaviors:
      - !type:GibBehavior
        recursive: false
  - type: MovementSpeedModifier
    baseWalkSpeed : 2
    baseSprintSpeed : 3
  - type: DamageStateVisuals
    states:
      Alive:
        Base: snail
      Critical:
        Base: dead
      Dead:
        Base: dead
  - type: Edible
  - type: Solution
    solution:
      reagents:
      - ReagentId: UncookedAnimalProteins
        Quantity: 8
      - ReagentId: Fat
        Quantity: 3
      - ReagentId: Water
        Quantity: 4 #It makes saline if you add salt!
  - type: Thirst
    startingThirst: 25  # spawn with Okay thirst state
    thresholds:
      OverHydrated: 35
      Okay: 25
      Thirsty: 15
      Parched: 10
      Dead: 0
    baseDecayRate: 0.04
  - type: Hunger
    thresholds:
      Overfed: 35
      Okay: 25
      Peckish: 15
      Starving: 10
      Dead: 0
    baseDecayRate: 0.1
  - type: Extractable
    grindableSolutionName: food
  - type: Tag
    tags:
    - Trash
    - VimPilot
    - ChefPilot
    - Meat
  - type: CombatMode
    combatToggleAction: ActionCombatModeToggleOff
  - type: Bloodstream
    bloodReferenceSolution:
      reagents:
      - ReagentId: Cryoxadone
        Quantity: 30
  - type: CanEscapeInventory
  - type: MobPrice
    price: 50
  - type: BadFood
  - type: NonSpreaderZombie
  - type: FireVisuals
    sprite: Mobs/Effects/onfire.rsi
    normalState: Mouse_burning
  - type: Temperature
  - type: TemperatureDamage
    heatDamageThreshold: 500
    coldDamageThreshold: 0
  - type: Reactive
    reactions:
    - reagents: [TableSalt, Saline]
      methods: [Touch, Ingestion, Injection]
      effects:
      - !type:HealthChange
        damage:
          types:
            Caustic: 1
      - !type:PopupMessage
        type: Local
        visualType: Large
        messages: [ "snail-hurt-by-salt-popup" ]
        probability: 0.66

- type: entity
  parent: MobSnail
  id: MobSnailInstantDeath
  suffix: Smite
  components:
  - type: GhostRole
    mindRoles:
    - MindRoleGhostRoleFreeAgent
  - type: MobStateActions
    actions:
      Alive:
      - ActionSmiteNoReq
      Critical:
      - ActionCritSuccumb
      - ActionCritFakeDeath
      - ActionCritLastWords
  - type: Godmode
  - type: MovementAlwaysTouching

- type: entity
  parent: MobSnail
  id: MobSnailSpeed
  suffix: Speed
  components:
  - type: GhostRole
    name: ghost-role-information-snailspeed-name
    description: ghost-role-information-snailspeed-description
    rules: ghost-role-information-freeagent-rules
  - type: Sprite
    layers:
    - map: ["enum.DamageStateVisualLayers.Base"]
      state: spacesnail
  - type: DamageStateVisuals
    states:
      Alive:
        Base: spacesnail
      Critical:
        Base: spacedead
      Dead:
        Base: spacedead
  - type: MovementSpeedModifier
    baseWalkSpeed : 5 #he go fast, also they cant slip so its probably fine.
    baseSprintSpeed : 7
#  - type: ActiveJetpack # I think this will need a custom component to not make tests angry.
  - type: MovementAlwaysTouching

- type: entity
  parent: [ BaseMobMothroach, MobSnail ]
  id: MobSnailMoth
  name: Snoth
  components:
  - type: GhostRole
    name: ghost-role-information-snoth-name
    description: ghost-role-information-snoth-description
    rules: ghost-role-information-freeagent-rules
  - type: Sprite
    layers:
    - map: ["enum.DamageStateVisualLayers.Base"]
      state: snoth
  - type: DamageStateVisuals
    states:
      Alive:
        Base: snoth
      Critical:
        Base: snothdead
      Dead:
        Base: snothdead
