- type: markingsGroup
  parent: Undergarments
  id: Harpy
  onlyGroupWhitelisted: true
  limits:
    enum.HumanoidVisualLayers.Hair:
      limit: 2
      required: false
    enum.HumanoidVisualLayers.FacialHair:
      limit: 1
      required: false
    enum.HumanoidVisualLayers.Tail:
      limit: 1
      required: true
      default: [ HarpyTailPhoenix ]
    enum.HumanoidVisualLayers.Chest:
      limit: 2
      required: false
    enum.HumanoidVisualLayers.Head:
      limit: 4
      required: false
    enum.HumanoidVisualLayers.HeadTop:
      limit: 1
      required: false
    enum.HumanoidVisualLayers.HeadSide:
      limit: 1
      required: true
      default: [ HarpyEarsDefault ]
    enum.HumanoidVisualLayers.LArm:
      limit: 1
      required: true
      default: [ HarpyLeftWingDefaultHuescale ]
    enum.HumanoidVisualLayers.RArm:
      limit: 1
      required: true
      default: [ HarpyRightWingDefaultHuescale ]
    enum.HumanoidVisualLayers.LLeg:
      limit: 1
      required: false
    enum.HumanoidVisualLayers.RLeg:
      limit: 1
      required: false
    enum.HumanoidVisualLayers.LFoot:
      limit: 1
      required: false
    enum.HumanoidVisualLayers.RFoot:
      limit: 1
      required: false

- type: entity
  parent: BaseSpeciesAppearance
  id: AppearanceHarpy
  name: harpy appearance
  components:
  - type: Inventory
    speciesId: harpy
    displacements:
      jumpsuit:
        sizeMaps:
          32:
            sprite: _DV/Mobs/Species/Harpy/displacement.rsi
            state: jumpsuit
    femaleDisplacements:
      jumpsuit:
        sizeMaps:
          32:
            sprite: Mobs/Species/Human/displacement.rsi
            state: jumpsuit-female
  - type: InitialBody
    organs:
      Torso: OrganHarpyTorso
      Head: OrganHarpyHead
      ArmLeft: OrganHarpyArmLeft
      ArmRight: OrganHarpyArmRight
      HandRight: OrganHarpyHandRight
      HandLeft: OrganHarpyHandLeft
      LegLeft: OrganHarpyLegLeft
      LegRight: OrganHarpyLegRight
      FootLeft: OrganHarpyFootLeft
      FootRight: OrganHarpyFootRight
      Brain: OrganHumanBrain
      Eyes: OrganHumanEyes
      Tongue: OrganHumanTongue
      Appendix: OrganHumanAppendix
      Ears: OrganHumanEars
      Lungs: OrganHarpyLungs
      Heart: OrganHumanHeart
      Stomach: OrganAnimalStomach
      Liver: OrganAnimalLiver
      Kidneys: OrganAnimalKidneys
  - type: HumanoidProfile
    species: Harpy
  - type: Sprite
    scale: 0.9, 0.9
    layers:
    # Torso
    - map: [ "enum.HumanoidVisualLayers.Chest" ]

    # Head
    - map: [ "enum.HumanoidVisualLayers.Head" ]
    - map: [ "enum.HumanoidVisualLayers.Snout" ]
    - map: [ "enum.HumanoidVisualLayers.Eyes" ]

    # Limbs
    - map: [ "enum.HumanoidVisualLayers.RLeg" ]
    - map: [ "enum.HumanoidVisualLayers.LLeg" ]

    # Underwear & clothing
    - map: [ "enum.HumanoidVisualLayers.UndergarmentBottom" ]
    - map: [ "enum.HumanoidVisualLayers.UndergarmentTop" ]
    - map: ["jumpsuit"]

    # Extremities
    - map: ["enum.HumanoidVisualLayers.LFoot"]
    - map: ["enum.HumanoidVisualLayers.RFoot"]
    - map: ["enum.HumanoidVisualLayers.LHand"]
    - map: ["enum.HumanoidVisualLayers.RHand"]

    # Stuff that goes over the body but below equipment
    - map: ["enum.HumanoidVisualLayers.Overlay"]

    # More equipment
    - map: [ "gloves" ]
    - map: [ "shoes" ]
    - map: [ "ears" ]
    - map: [ "eyes" ]
    - map: [ "belt" ]
    - map: [ "id" ]
    - map: [ "outerClothing" ]
    - map: [ "back" ]
    - map: [ "neck" ]

    # Arms (moved above clothing)
    - map: [ "enum.HumanoidVisualLayers.RArm" ]
    - map: [ "enum.HumanoidVisualLayers.LArm" ]

    # Stuff that goes in front of equipment
    - map: [ "enum.HumanoidVisualLayers.SnoutCover" ]
    - map: [ "enum.HumanoidVisualLayers.FacialHair" ]
    - map: [ "enum.HumanoidVisualLayers.Hair" ]
    - map: [ "enum.HumanoidVisualLayers.HeadSide" ]
    - map: [ "enum.HumanoidVisualLayers.HeadTop" ]
    - map: [ "enum.HumanoidVisualLayers.Tail" ]

    # Stuff that goes in front of stuff that goes in front of equipment
    - map: [ "mask" ]
    - map: [ "head" ]
    - map: [ "pocket1" ]
    - map: [ "pocket2" ]

    # Extra stuff
    - map: ["enum.HumanoidVisualLayers.Handcuffs"]
      color: "#ffffff"
      sprite: Objects/Misc/handcuffs.rsi
      state: body-overlay-2
      visible: false

    - map: [ "clownedon" ] # Dynamically generated
      sprite: "Effects/creampie.rsi"
      state: "creampie_human"
      visible: false

    - map: [ "enum.InstrumentVisuals.Layer" ]
      sprite: _DV/Effects/harpysinger.rsi
      state: singing_music_notes
      visible: false

- type: entity
  parent:
  - AppearanceHarpy
  - BaseSpeciesMobOrganic # starcup: changed from BaseMobHuman for consistency
  id: MobHarpy
  name: Urist McHarpy
  components:
  - type: HarpySinger
  - type: Instrument
    allowPercussion: false
    program: 52
  - type: SwappableInstrument
    instrumentList:
      "Voice": {52: 0}
      "Trumpet": {56: 0}
      "Electric": {27: 0}
      "Bass": {33: 0}
      "Rock": {29: 0}
      "Acoustic": {24: 0}
      "Flute": {73: 0}
      "Sax": {66: 0}
      "Piano": {1: 0}
      "Church Organ": {19: 0}
      "Harp": {46: 0}
  - type: UserInterface
    interfaces:
      enum.InstrumentUiKey.Key:
        type: InstrumentBoundUserInterface
      enum.HumanoidMarkingModifierKey.Key:
        type: HumanoidMarkingModifierBoundUserInterface
      enum.StrippingUiKey.Key:
        type: StrippableBoundUserInterface
  - type: Fixtures
    fixtures: # TODO: This needs a second fixture just for mob collisions.
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.32
        density: 90
        restitution: 0.0
        mask:
        - MobMask
        layer:
        - MobLayer
  - type: Damageable
    damageModifierSet: Harpy
  - type: MeleeWeapon
    soundHit:
      collection: AlienClaw
    animation: WeaponArcClaw
    damage:
      types:
        Piercing: 5
  - type: Speech
    speechSounds: Harpy
    speechVerb: Harpy
    allowedEmotes: ['Meow', 'Hiss', 'Mew', 'Purr', 'Growl', 'Bark', 'Snarl', 'Whine', 'Howl', 'Awoo', 'HarpyHonk', 'HarpyRing', 'HarpyPew', 'HarpyBang', 'HarpyBeep', 'HarpyRev', 'HarpyCaw', 'HarpySquish', 'Chitter', 'Chirp', 'Squeak', 'Click']
  - type: Vocal
    sounds:
      Male: SoundsHarpy
      Female: SoundsHarpy
      Unsexed: SoundsHarpy
  - type: InstrumentVisuals
  - type: GenericVisualizer
    visuals:
      enum.InstrumentVisuals.Playing:
        enum.InstrumentVisuals.Layer:
          False: {visible: false}
          True: {visible: true}
  - type: MovementSpeedModifier
    baseWalkSpeed: 2.5
    baseSprintSpeed: 5.0
    weightlessAcceleration: 2.5
  - type: UltraVision
  - type: Tag
    tags:
    - CanPilot
    - FootstepSound
    - DoorBumpOpener
  - type: FootPrints #DeltaV port from EE, blood splatter
    leftBarePrint: "footprint-left-bare-lizard" #DeltaV port from EE, blood splatter
    rightBarePrint: "footprint-right-bare-lizard" #DeltaV port from EE, blood splatter

- type: entity
  parent: OrganBase
  id: OrganHarpy
  abstract: true
  suffix: harpy

- type: entity
  parent: OrganHarpy
  id: OrganHarpyInternal
  abstract: true
  components:
  - type: Sprite
    sprite: _DV/Mobs/Species/Harpy/organs.rsi

- type: entity
  id: OrganHarpyVisual
  abstract: true
  components:
  - type: VisualOrgan
    data:
      sprite: _DV/Mobs/Species/Harpy/parts.rsi
  - type: VisualOrganMarkings
    markingData:
      group: Harpy

- type: entity
  parent: [ OrganHarpy, OrganHarpyVisual]
  id: OrganHarpyExternal
  abstract: true
  components:
  - type: Sprite
    sprite: _DV/Mobs/Species/Harpy/parts.rsi

- type: entity
  parent: [ OrganBaseTorsoSexed, OrganBaseTorso, OrganHarpyExternal ]
  id: OrganHarpyTorso
  components:
  - type: VisualOrganMarkings
    hideableLayers:
    - enum.HumanoidVisualLayers.Tail

- type: entity
  parent: [ OrganBaseHeadSexed, OrganBaseHead, OrganHarpyExternal ]
  id: OrganHarpyHead

- type: entity
  parent: [ OrganBaseArmLeft, OrganHarpyExternal ]
  id: OrganHarpyArmLeft
  components:
  - type: VisualOrganMarkings
    hideableLayers:
    - enum.HumanoidVisualLayers.LArm

- type: entity
  parent: [ OrganBaseArmRight, OrganHarpyExternal ]
  id: OrganHarpyArmRight
  components:
  - type: VisualOrganMarkings
    hideableLayers:
    - enum.HumanoidVisualLayers.RArm

- type: entity
  parent: [ OrganBaseHandLeft, OrganHarpyExternal ]
  id: OrganHarpyHandLeft

- type: entity
  parent: [ OrganBaseHandRight, OrganHarpyExternal ]
  id: OrganHarpyHandRight

- type: entity
  parent: [ OrganBaseLegLeft, OrganHarpyExternal ]
  id: OrganHarpyLegLeft

- type: entity
  parent: [ OrganBaseLegRight, OrganHarpyExternal ]
  id: OrganHarpyLegRight

- type: entity
  parent: [ OrganBaseFootLeft, OrganHarpyExternal ]
  id: OrganHarpyFootLeft

- type: entity
  parent: [ OrganBaseFootRight, OrganHarpyExternal ]
  id: OrganHarpyFootRight

- type: entity
  parent: [ OrganBaseLungs, OrganHarpyInternal, OrganHumanMetabolizer ]
  id: OrganHarpyLungs
  name: lungs
  description: An advanced pair of avian lungs. Filters oxygen by way of moving air constantly through air sacs.

- type: entity
  id: ActionHarpyPlayMidi
  name: Play MIDI
  description: Sing your heart out! Right click yourself to set an instrument.
  components:
  - type: Action # starcup: rewritten for action refactor
    checkCanInteract: false
    icon: _DV/Interface/Actions/harpy_sing.png
  - type: InstantAction # starcup: rewritten for action refactor
    event: !type:OpenUiActionEvent
      key: enum.InstrumentUiKey.Key
