# SPDX-FileCopyrightText: 2024 Adeinitas <147965189+adeinitas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 AstroDogeDX <48888500+AstroDogeDX@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 BombasterDS <115770678+BombasterDS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Danger Revolution! <142105406+DangerRevolution@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Spatison <137375981+Spatison@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Timemaster99 <57200767+Timemaster99@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 VMSolidus <evilexecutive@gmail.com>
# SPDX-FileCopyrightText: 2024 coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 whateverusername0 <whateveremail>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Armok <155400926+ARMOKS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <aviu00@protonmail.com>
# SPDX-FileCopyrightText: 2025 BombasterDS2 <shvalovdenis.workmail@gmail.com>
# SPDX-FileCopyrightText: 2025 CometVoid <cometsstrile@gmail.com>
# SPDX-FileCopyrightText: 2025 GNUtopia <93669372+GNUtopia@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 John Willis <143434770+CerberusWolfie@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 JohnOakman <sremy2012@hotmail.fr>
# SPDX-FileCopyrightText: 2025 MarkerWicker <markerWicker@proton.me>
# SPDX-FileCopyrightText: 2025 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 gluesniffler <linebarrelerenthusiast@gmail.com>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  save: false
  name: Urist McHarpy
  parent: BaseMobHuman
  id: MobHarpyBase
  abstract: true
  components:
  - type: HarpySinger
    ShutUpDamageThreshold: 5 # Punch does 5 damage
  - 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}
      "Violin": {41: 0}
  - type: UserInterface
    interfaces:
      enum.InstrumentUiKey.Key:
        type: InstrumentBoundUserInterface
        requireInputValidation: false
      enum.VoiceMaskUIKey.Key:
        type: VoiceMaskBoundUserInterface
      enum.HumanoidMarkingModifierKey.Key:
        type: HumanoidMarkingModifierBoundUserInterface
      enum.StrippingUiKey.Key:
        type: StrippableBoundUserInterface
      # Goobstation - changelings
      enum.StoreUiKey.Key:
        type: StoreBoundUserInterface
      enum.HereticLivingHeartKey.Key: # goob edit - heretics
        type: LivingHeartMenuBoundUserInterface
      enum.WizardTeleportUiKey.Key: # Goobstation - wizard
        type: WizardTeleportBoundUserInterface
        requireInputValidation: false
  - type: Sprite
    # scale: 0.9, 0.9 # Goobstation: port EE height/width sliders
    layers:
      - map: [ "enum.HumanoidVisualLayers.Groin" ]
      - map: [ "enum.HumanoidVisualLayers.Chest" ]
      - map: [ "enum.HumanoidVisualLayers.Head" ]
      - map: [ "enum.HumanoidVisualLayers.Snout" ]
      - map: [ "enum.HumanoidVisualLayers.Eyes" ]
      - map: [ "enum.HumanoidVisualLayers.LArm" ]
      - map: [ "enum.HumanoidVisualLayers.RLeg" ]
      - map: [ "enum.HumanoidVisualLayers.LLeg" ]
      - map: [ "enum.HumanoidVisualLayers.Underwear" ]
      - map: [ "enum.HumanoidVisualLayers.Undershirt" ]
      - map: [ "underpants" ]
      - map: [ "undershirt" ]
      - map: [ "socks" ]
      - map: [ "jumpsuit" ]
      - map: ["enum.HumanoidVisualLayers.LFoot"]
      - map: ["enum.HumanoidVisualLayers.RFoot"]
      - map: ["enum.HumanoidVisualLayers.LHand"]
      - map: ["enum.HumanoidVisualLayers.RHand"]
      - map: [ "enum.HumanoidVisualLayers.Handcuffs" ]
        color: "#ffffff"
        sprite: Objects/Misc/handcuffs.rsi
        state: body-overlay-2
        visible: false
      - map: [ "id" ]
      - map: [ "gloves" ]
      - map: [ "ears" ]
      - map: [ "outerClothing" ]
      - map: [ "eyes" ]
      - map: [ "belt" ]
      - map: [ "neck" ]
      - map: [ "back" ]
      - map: [ "enum.HumanoidVisualLayers.Face" ]
      - map: [ "enum.HumanoidVisualLayers.FacialHair" ]
      - map: [ "enum.HumanoidVisualLayers.HeadSide" ]
      - map: [ "enum.HumanoidVisualLayers.Tail" ]
      - map: [ "pocket1" ]
      - map: [ "pocket2" ]
      - map: [ "clownedon" ] # Dynamically generated
        sprite: "Effects/creampie.rsi"
        state: "creampie_human"
        visible: false
# Yes, RArm has to be down here
      - map: [ "enum.HumanoidVisualLayers.RArm" ]
      - map: [ "maskalt" ]
      - map: [ "enum.HumanoidVisualLayers.Hair" ]
      - map: [ "mask" ]
      - map: [ "enum.HumanoidVisualLayers.HeadTop" ]
      - map: [ "head" ]
      - map: [ "singingLayer" ]
        sprite: _DV/Effects/harpysinger.rsi
        state: singing_music_notes
        visible: false
  - type: HumanoidAppearance
    species: Harpy
  - type: Fixtures
    fixtures: # TODO: This needs a second fixture just for mob collisions.
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.35
        density: 120
        restitution: 0.0
        mask:
        - MobMask
        layer:
        - MobLayer
  - type: Body
    prototype: Harpy
  - type: Damageable
    damageModifierSet: Harpy
  - type: MeleeWeapon
    soundHit:
      collection: AlienClaw
    animation: WeaponArcClaw
    damage:
      types:
        Piercing: 5
  - type: Speech
    speechSounds: Harpy
    speechVerb: Harpy
    allowedEmotes: ['Chirp', 'Trill', 'Warble', 'Wurble', 'Mars']
  - type: Vocal
    sounds:
      Male: SoundsHarpyMale
      Female: SoundsHarpyFemale
      Unsexed: SoundsHarpyFemale
  - type: LanguageKnowledge # Einstein Engines - Language
    speaks:
    - TauCetiBasic
    - ValyrianStandard
    understands:
    - TauCetiBasic
    - ValyrianStandard
  - type: GenericVisualizer
    visuals:
      enum.HarpyVisualLayers.Singing:
        singingLayer:
          False:  {visible: false}
          True:  {visible: true}
  - type: MovementSpeedModifier
    weightlessAcceleration: 2.5
    weightlessModifier: 1.12
  - type: Inventory
    speciesId: harpy
    templateId: digitigrade # Einstein Engines
    displacements:
      jumpsuit:
        sizeMaps:
          32:
            sprite: _DV/Mobs/Species/Harpy/displacement.rsi
            state: jumpsuit
    femaleDisplacements:
      jumpsuit:
        sizeMaps:
          32:
            sprite: _DV/Mobs/Species/Harpy/displacement.rsi
            state: jumpsuit
  - type: HarpyVisuals
  - type: Tag
    tags:
    - CanPilot
    - FootstepSound
    - DoorBumpOpener
    - HarpyEmotes
    - AnomalyHost
  - type: StepTriggerImmune
    whitelist:
      types:
      - Shard
      - Landmine
      - Mousetrap

- type: entity
  save: false
  name: Urist McHands
  parent: MobHumanDummy
  id: MobHarpyDummy
  categories: [ HideSpawnMenu ]
  description: A dummy Harpy meant to be used in character setup.
  components:
  - type: HumanoidAppearance
    species: Harpy
  - type: Inventory
    speciesId: harpy
    templateId: digitigrade # Einstein Engines
    displacements:
      jumpsuit:
        sizeMaps:
          32:
            sprite: _DV/Mobs/Species/Harpy/displacement.rsi
            state: jumpsuit
    femaleDisplacements:
      jumpsuit:
        sizeMaps:
          32:
            sprite: _DV/Mobs/Species/Harpy/displacement.rsi
            state: jumpsuit
  - type: Sprite
    # scale: 0.9, 0.9 # Goobstation: port EE height/width sliders
    layers:
      - map: [ "enum.HumanoidVisualLayers.Chest" ]
      - map: [ "enum.HumanoidVisualLayers.Groin" ]
      - map: [ "enum.HumanoidVisualLayers.Head" ]
      - map: [ "enum.HumanoidVisualLayers.Snout" ]
      - map: [ "enum.HumanoidVisualLayers.Eyes" ]
      - map: [ "enum.HumanoidVisualLayers.LArm" ]
      - map: [ "enum.HumanoidVisualLayers.RLeg" ]
      - map: [ "enum.HumanoidVisualLayers.LLeg" ]
      - map: [ "underpants" ]
      - map: [ "undershirt" ]
      - map: [ "socks" ]
      - map: [ "jumpsuit" ]
      - map: ["enum.HumanoidVisualLayers.LFoot"]
      - map: ["enum.HumanoidVisualLayers.RFoot"]
      - map: ["enum.HumanoidVisualLayers.LHand"]
      - map: ["enum.HumanoidVisualLayers.RHand"]
      - map: [ "id" ]
      - map: [ "gloves" ]
      - map: [ "ears" ]
      - map: [ "outerClothing" ]
      - map: [ "eyes" ]
      - map: [ "belt" ]
      - map: [ "neck" ]
      - map: [ "back" ]
      - map: [ "enum.HumanoidVisualLayers.Face" ]
      - map: [ "enum.HumanoidVisualLayers.FacialHair" ]
      - map: [ "enum.HumanoidVisualLayers.HeadSide" ]
      - map: [ "enum.HumanoidVisualLayers.HeadTop" ]
      - map: [ "enum.HumanoidVisualLayers.Tail" ]
      - map: [ "pocket1" ]
      - map: [ "pocket2" ]
      - map: [ "clownedon" ] # Dynamically generated
        sprite: "Effects/creampie.rsi"
        state: "creampie_human"
        visible: false
# Yes, RArm has to be down here
      - map: [ "enum.HumanoidVisualLayers.RArm" ]
      - map: [ "maskalt" ]
      - map: [ "enum.HumanoidVisualLayers.Hair" ]
      - map: [ "mask" ]
      - map: [ "head" ]
