# Anything human specific (e.g. UI, input) goes under MobHuman
- type: entity
  save: false
  name: Urist McHands
  id: MobHumanBase
  description: A miserable pile of secrets.
  abstract: true
  components:
  - type: Tag
    tags:
    - CanPilot
    - FootstepSound
    - DoorBumpOpener
  - type: Reactive
    groups:
      Flammable: [ Touch ]
      Extinguish: [ Touch ]
      Acidic: [Touch, Ingestion]
    reactions:
    - reagents: [Water, SpaceCleaner]
      methods: [Touch]
      effects:
      - !type:WashCreamPieReaction
  - type: Flashable
  - type: Hands
  - type: MovementSpeedModifier
  - type: MovedByPressure
  - type: Barotrauma
    damage:
      types:
        Blunt: 0.7 #per second, scales with pressure and other constants.
  - type: DamageOnHighSpeedImpact
    damage:
      types:
        Blunt: 5
    soundHit:
      path: /Audio/Effects/hit_kick.ogg
  - type: Hunger
    damage:
      types:
        Blunt: 2
  - type: Thirst
    damage:
      types:
        Blunt: 2
  # Organs
  - type: InjectableSolution
    solution: chemicals
  - type: DrawableSolution
    solution: bloodstream
  - type: HealthExaminable
    examinableTypes:
    - Blunt
    - Slash
    - Piercing
    - Heat
    - Shock
  - type: Bloodstream
    bloodlossDamage:
      types:
        Bloodloss:
          1
    bloodlossHealDamage:
      types:
        Bloodloss:
          -0.25
  - type: StatusEffects
    allowed:
    - Stun
    - KnockedDown
    - SlowedDown
    - Stutter
    - Electrocution
  - type: DiseaseCarrier
  # Other
  - type: Inventory
  - type: Clickable
  - type: InteractionOutline
  - type: Icon
    sprite: Mobs/Species/Human/parts.rsi
    state: full
  - type: Sprite
    netsync: false
    noRot: true
    drawdepth: Mobs
    layers:
    - map: [ "enum.HumanoidVisualLayers.Chest" ]
      color: "#e8b59b"
      sprite: Mobs/Species/Human/parts.rsi
      state: torso_m
    - map: [ "enum.HumanoidVisualLayers.Head" ]
      color: "#e8b59b"
      sprite: Mobs/Species/Human/parts.rsi
      state: head_m
    - map: [ "enum.HumanoidVisualLayers.Eyes" ]
      color: "#008800"
      sprite: Mobs/Customization/eyes.rsi
      state: eyes
    - map: [ "enum.HumanoidVisualLayers.RArm" ]
      color: "#e8b59b"
      sprite: Mobs/Species/Human/parts.rsi
      state: r_arm
    - map: [ "enum.HumanoidVisualLayers.LArm" ]
      color: "#e8b59b"
      sprite: Mobs/Species/Human/parts.rsi
      state: l_arm
    - map: [ "enum.HumanoidVisualLayers.RLeg" ]
      color: "#e8b59b"
      sprite: Mobs/Species/Human/parts.rsi
      state: r_leg
    - map: [ "enum.HumanoidVisualLayers.LLeg" ]
      color: "#e8b59b"
      sprite: Mobs/Species/Human/parts.rsi
      state: l_leg
    - shader: StencilClear
      sprite: Mobs/Species/Human/parts.rsi
      state: l_leg
    - shader: StencilMask
      map: [ "enum.HumanoidVisualLayers.StencilMask" ]
      sprite: Mobs/Customization/masking_helpers.rsi
      state: female_full
      visible: false
    - map: [ "jumpsuit" ]
      shader: StencilDraw
    - map: [ "enum.HumanoidVisualLayers.LHand" ]
      color: "#e8b59b"
      sprite: Mobs/Species/Human/parts.rsi
      state: l_hand
    - map: [ "enum.HumanoidVisualLayers.RHand" ]
      color: "#e8b59b"
      sprite: Mobs/Species/Human/parts.rsi
      state: r_hand
    - map: [ "enum.HumanoidVisualLayers.LFoot" ]
      color: "#e8b59b"
      sprite: Mobs/Species/Human/parts.rsi
      state: l_foot
    - map: [ "enum.HumanoidVisualLayers.RFoot" ]
      color: "#e8b59b"
      sprite: Mobs/Species/Human/parts.rsi
      state: r_foot
    - map: [ "enum.HumanoidVisualLayers.Handcuffs" ]
      color: "#ffffff"
      sprite: Objects/Misc/handcuffs.rsi
      state: body-overlay-2
      visible: false
    - map: [ "id" ]
    - map: [ "gloves" ]
    - map: [ "shoes" ]
    - map: [ "ears" ]
    - map: [ "outerClothing" ]
    - map: [ "eyes" ]
    - map: [ "belt" ]
    - map: [ "neck" ]
    - map: [ "back" ]
    - map: [ "enum.HumanoidVisualLayers.FacialHair" ]
      state: shaved
      sprite: Mobs/Customization/human_facial_hair.rsi
    - map: [ "enum.HumanoidVisualLayers.Hair" ]
      state: bald
      sprite: Mobs/Customization/human_hair.rsi
    - map: [ "mask" ]
    - map: [ "head" ]
    - map: [ "pocket1" ]
    - map: [ "pocket2" ]
  - type: Physics
    bodyType: KinematicController
  - type: Fixtures
    fixtures: # TODO: This needs a second fixture just for mob collisions.
    - shape:
        !type:PhysShapeCircle
        radius: 0.35
      mass: 70
      restitution: 0.0
      mask:
      - Impassable
      - MobImpassable
      - VaultImpassable
      - SmallImpassable
      layer:
      - Opaque
  - type: AtmosExposed
  - type: Flammable
    fireSpread: true
    canResistFire: true
    damage:
      types:
        Heat: 1 #per second, scales with number of fire 'stacks'
  - type: Temperature
    heatDamageThreshold: 360
    coldDamageThreshold: 260
    currentTemperature: 310.15
    specificHeat: 42
    coldDamage:
      types:
        Cold : 1 #per second, scales with temperature & other constants
    heatDamage:
      types:
        Heat : 1 #per second, scales with temperature & other constants
  - type: HumanoidAppearance
  - type: Body
    template: HumanoidTemplate
    preset: HumanPreset
  - type: Damageable
    damageContainer: Biological
  - type: ThermalRegulator
    metabolismHeat: 800
    radiatedHeat: 100
    implicitHeatRegulation: 500
    sweatHeatRegulation: 2000
    shiveringHeatRegulation: 2000
    normalBodyTemperature: 310.15
    thermalRegulationTemperatureThreshold: 25
  - type: Internals
  - type: MobState
    thresholds:
      0: !type:NormalMobState {}
      100: !type:CriticalMobState {}
      200: !type:DeadMobState {}
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTypeTrigger
        damageType: Blunt
        damage: 400
      behaviors:
      - !type:GibBehavior { }
  - type: SlowOnDamage
    speedModifierThresholds:
      40: 0.8
      60: 0.6
      80: 0.4
      90: 0.2
  - type: HeatResistance
  - type: Appearance
    visuals:
    - type: RotationVisualizer
    - type: BuckleVisualizer
    - type: FireVisualizer
      sprite: Mobs/Effects/onfire.rsi
      normalState: Generic_mob_burning
      alternateState: Standing
      fireStackAlternateState: 3
    - type: CreamPiedVisualizer
      state: creampie_human
    - type: DamageVisualizer
      thresholds: [20, 40, 100]
      targetLayers:
      - "enum.HumanoidVisualLayers.Chest"
      - "enum.HumanoidVisualLayers.Head"
      - "enum.HumanoidVisualLayers.LArm"
      - "enum.HumanoidVisualLayers.LLeg"
      - "enum.HumanoidVisualLayers.RArm"
      - "enum.HumanoidVisualLayers.RLeg"
      damageOverlayGroups:
        Brute:
          sprite: Mobs/Effects/brute_damage.rsi
          color: "#FF0000"
        Burn:
          sprite: Mobs/Effects/burn_damage.rsi
  - type: CombatMode
  - type: Climbing
  - type: Cuffable
  - type: CharacterInfo
  - type: AnimationPlayer
  - type: Buckle
  - type: UnarmedCombat
    hitSound:
      collection: Punch
    range: 0.8
    arcwidth: 30
    arc: fist
    damage:
      types:
        Blunt: 5
  - type: Pullable
  - type: DoAfter
  - type: CreamPied
  - type: Stripping
  - type: Strippable
  - type: UserInterface
    interfaces:
    - key: enum.StrippingUiKey.Key
      type: StrippableBoundUserInterface
  - type: Puller
  - type: Butcherable
    butcheringType: Spike # TODO human.
    spawned:
    - id: FoodMeat
      amount: 5
#  - type: Recyclable Turns out turning off recycler safeties without considering the instagib is a bad idea
#    safe: false
  - type: Speech
  - type: Vocal
  - type: Emoting
  - type: Grammar
    attributes:
      proper: true
  - type: StandingState


- type: entity
  save: false
  name: Urist McHands
  id: MobHumanDummy
  abstract: true
  description: A dummy human meant to be used in character setup.
  components:
    - type: Hands
    - type: Inventory
    - type: ContainerContainer
    - type: Icon
      sprite: Mobs/Species/Human/parts.rsi
      state: full
    - type: Sprite
      netsync: false
      drawdepth: Mobs
      noRot: true
      # TODO BODY Turn these into individual body parts?
      layers:
      - map: ["enum.HumanoidVisualLayers.Chest"]
        color: "#e8b59b"
        sprite: Mobs/Species/Human/parts.rsi
        state: torso_m
      - map: ["enum.HumanoidVisualLayers.Head"]
        color: "#e8b59b"
        sprite: Mobs/Species/Human/parts.rsi
        state: head_m
      - map: ["enum.HumanoidVisualLayers.Eyes"]
        color: "#008800"
        sprite: Mobs/Customization/eyes.rsi
        state: eyes
      - map: ["enum.HumanoidVisualLayers.RArm"]
        color: "#e8b59b"
        sprite: Mobs/Species/Human/parts.rsi
        state: r_arm
      - map: ["enum.HumanoidVisualLayers.LArm"]
        color: "#e8b59b"
        sprite: Mobs/Species/Human/parts.rsi
        state: l_arm
      - map: ["enum.HumanoidVisualLayers.RLeg"]
        color: "#e8b59b"
        sprite: Mobs/Species/Human/parts.rsi
        state: r_leg
      - map: ["enum.HumanoidVisualLayers.LLeg"]
        color: "#e8b59b"
        sprite: Mobs/Species/Human/parts.rsi
        state: l_leg
      - map: [ "enum.HumanoidVisualLayers.LFoot" ]
        color: "#e8b59b"
        sprite: Mobs/Species/Human/parts.rsi
        state: l_foot
      - map: [ "enum.HumanoidVisualLayers.RFoot" ]
        color: "#e8b59b"
        sprite: Mobs/Species/Human/parts.rsi
        state: r_foot
      - shader: StencilClear
      - shader: StencilMask
        map: ["enum.HumanoidVisualLayers.StencilMask"]
        sprite: Mobs/Customization/masking_helpers.rsi
        state: female_full
        visible: false
      - map: ["jumpsuit"]
        shader: StencilDraw
      - map: ["enum.HumanoidVisualLayers.LHand"]
        color: "#e8b59b"
        sprite: Mobs/Species/Human/parts.rsi
        state: l_hand
      - map: ["enum.HumanoidVisualLayers.RHand"]
        color: "#e8b59b"
        sprite: Mobs/Species/Human/parts.rsi
        state: r_hand
      - map: ["enum.HumanoidVisualLayers.Handcuffs"]
        color: "#ffffff"
        sprite: Objects/Misc/handcuffs.rsi
        state: body-overlay-2
        visible: false
      - map: ["id"]
      - map: ["gloves"]
      - map: ["shoes"]
      - map: ["ears"]
      - map: ["outerClothing"]
      - map: ["eyes"]
      - map: ["belt"]
      - map: ["neck"]
      - map: ["back"]
      - map: ["enum.HumanoidVisualLayers.FacialHair"]
        state: shaved
        sprite: Mobs/Customization/human_facial_hair.rsi
      - map: ["enum.HumanoidVisualLayers.Hair"]
        state: bald
        sprite: Mobs/Customization/human_hair.rsi
      - map: ["mask"]
      - map: ["head"]
      - map: [ "pocket1" ]
      - map: [ "pocket2" ]
      - map: ["hand-left"]
      - map: ["hand-right"]
    - type: Physics
      bodyType: Dynamic
    - type: Fixtures
      fixtures:
      - shape:
          !type:PhysShapeAabb
            bounds: "-0.35,-0.35,0.35,0.35"
        mass: 70
        restitution: 0.0
        mask:
        - Impassable
        - MobImpassable
        - VaultImpassable
        - SmallImpassable
        layer:
        - Opaque
    - type: HumanoidAppearance
    - type: Body
      template: HumanoidTemplate
      preset: HumanPreset
    - type: Damageable
      damageContainer: Biological
    - type: MobState
      thresholds:
        0: !type:NormalMobState {}
        100: !type:CriticalMobState {}
        200: !type:DeadMobState {}
    - type: Appearance
      visuals:
      - type: RotationVisualizer
