# SPDX-FileCopyrightText: 2023 DrSmugleaf <drsmugleaf@gmail.com>
# SPDX-FileCopyrightText: 2023 I.K <45953835+notquitehadouken@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 LankLTE <135308300+LankLTE@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 MilenVolf <63782763+MilenVolf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Nairod <110078045+Nairodian@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Alice "Arimah" Heurlin <30327355+arimah@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Alzore <140123969+Blackern5000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Brandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 CaasGit <87243814+CaasGit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Cojoke <83733158+Cojoke-dot@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 Eoin Mcloughlin <helloworld@eoinrul.es>
# SPDX-FileCopyrightText: 2024 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 HS <81934438+HolySSSS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Hrosts <35345601+Hrosts@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ian <ignaz.k@live.de>
# SPDX-FileCopyrightText: 2024 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Joel Zimmerman <JoelZimmerman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 JustCone <141039037+JustCone14@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kukutis96513 <146854220+Kukutis96513@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Lye <128915833+Lyroth001@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MerrytheManokit <167581110+MerrytheManokit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mervill <mervills.email@gmail.com>
# SPDX-FileCopyrightText: 2024 Morb <14136326+Morb0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MureixloI <132683811+MureixloI@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 NakataRin <45946146+NakataRin@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 OrangeMoronage9622 <whyteterry0092@gmail.com>
# SPDX-FileCopyrightText: 2024 PJBot <pieterjan.briers+bot@gmail.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Preston Smith <92108534+thetolbean@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Repo <47093363+Titian3@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 RiceMar1244 <138547931+RiceMar1244@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Rouge2t7 <81053047+Sarahon@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Simon <63975668+Simyon264@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Spatison <137375981+Spatison@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Stalen <33173619+stalengd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TakoDragon <69509841+BackeTako@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Tayrtahn <tayrtahn@gmail.com>
# SPDX-FileCopyrightText: 2024 Thomas <87614336+Aeshus@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Truoizys <153248924+Truoizys@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TsjipTsjip <19798667+TsjipTsjip@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ubaser <134914314+UbaserB@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Unkn0wn_Gh0st <shadowstalkermll@gmail.com>
# SPDX-FileCopyrightText: 2024 Vasilis <vasilis@pikachu.systems>
# SPDX-FileCopyrightText: 2024 Vigers Ray <60344369+VigersRay@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 beck-thompson <107373427+beck-thompson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deathride58 <deathride58@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 dffdff2423 <dffdff2423@gmail.com>
# SPDX-FileCopyrightText: 2024 eoineoineoin <github@eoinrul.es>
# SPDX-FileCopyrightText: 2024 foboscheshir <156405958+foboscheshir@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lanse12 <cloudability.ez@gmail.com>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 osjarw <62134478+osjarw@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 saintmuntzer <47153094+saintmuntzer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 shamp <140359015+shampunj@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 strO0pwafel <153459934+strO0pwafel@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 stroopwafel <j.o.luijkx@student.tudelft.nl>
# SPDX-FileCopyrightText: 2024 themias <89101928+themias@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 to4no_fix <156101927+chavonadelal@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 voidnull000 <18663194+voidnull000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 whateverusername0 <whateveremail>
# SPDX-FileCopyrightText: 2024 Арт <123451459+JustArt1m@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.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 BombasterDS <deniskaporoshok@gmail.com>
# SPDX-FileCopyrightText: 2025 BombasterDS2 <shvalovdenis.workmail@gmail.com>
# SPDX-FileCopyrightText: 2025 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Froffy025 <78222136+Froffy025@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Froffy025 <scotttaco025@gmail.com>
# SPDX-FileCopyrightText: 2025 GNUtopia <93669372+GNUtopia@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 GNUtopia <erainach14@gmail.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 HTML/Crystal <152909599+HTMLSystem@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 John Willis <143434770+CerberusWolfie@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Sapphire <98045970+sapphirescript@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Tiniest Shark <head.rebel@yahoo.com>
# SPDX-FileCopyrightText: 2025 VMSolidus <evilexecutive@gmail.com>
# SPDX-FileCopyrightText: 2025 Winkarst <74284083+Winkarst-cpu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 coderabbitai[bot] <136622811+coderabbitai[bot]@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 grub <unalterableness@gmail.com>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
# SPDX-FileCopyrightText: 2025 shityaml <unalterableness@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  save: false
  name: Urist McFluff
  parent: BaseMobSpeciesOrganic
  id: BaseMobMoth
  abstract: true
  components:
  - type: HumanoidAppearance
    species: Moth
    hideLayersOnEquip:
    - HeadTop
  - type: Hunger
  - type: Thirst
  - type: Icon
    sprite: Mobs/Species/Moth/parts.rsi
    state: full
  - type: Body
    prototype: Moth
    requiredLegs: 2
  - type: Damageable
    damageContainer: Biological
    damageModifierSet: Moth
  - type: ZombieAccentOverride
    accent: zombieMoth
  - type: Speech
    speechVerb: Moth
    allowedEmotes: ['Chitter', 'Squeak', 'Flap'] #flap is from goob
  - type: LanguageKnowledge # Einstein Engines - Languages
    speaks:
    - TauCetiBasic
    - Moffic
    understands:
    - TauCetiBasic
    - Moffic
  - type: TypingIndicator
    proto: moth
  - type: Butcherable
    butcheringType: Spike
    spawned:
    - id: FoodMeat
      amount: 5
  - type: Bloodstream
    bloodReagent: InsectBlood
#  - type: DamageVisuals
#    damageOverlayGroups:
#      Brute:
#        sprite: _Shitmed/Mobs/Effects/brute_damage.rsi
#        color: "#808A51"
#      Burn:
#        sprite: _Shitmed/Mobs/Effects/burn_damage.rsi
  - type: MothAccent
  - type: Vocal
    wilhelm: "/Audio/_Goobstation/Voice/Moth/moth_sax.ogg" # Goobstation
    wilhelmProbability: 0.1 # Goobstation
    sounds:
      Male: MaleMoth
      Female: FemaleMoth
      Unsexed: UnisexMoth
  - type: MovementSpeedModifier
    baseWeightlessAcceleration: 3 # Goobstation value
    baseWeightlessFriction: 1
    baseWeightlessModifier: 1
  - type: Flammable
    damage:
      types:
        Heat: 1.5 # moths burn more easily
  - type: Temperature # Moths hate the heat and thrive in the cold.
    heatDamageThreshold: 320
    coldDamageThreshold: 230
    currentTemperature: 310.15
    specificHeat: 46
    coldDamage:
      types:
        Cold : 0.05 #per second, scales with temperature & other constants
    heatDamage:
      types:
        Heat : 2 # Goob edit #per second, scales with temperature & other constants
  - type: TemperatureSpeed
    thresholds:
      289: 0.8
      275: 0.6
      250: 0.4
  - type: Sprite # sprite again because we want different layer ordering
    noRot: true
    drawdepth: Mobs
    layers:
      - map: [ "enum.HumanoidVisualLayers.Groin" ]
      - map: [ "enum.HumanoidVisualLayers.Chest" ]
      - map: [ "enum.HumanoidVisualLayers.Head" ]
      - map: [ "enum.HumanoidVisualLayers.Snout" ]
      - map: [ "enum.HumanoidVisualLayers.Eyes" ]
      - map: [ "enum.HumanoidVisualLayers.RArm" ]
      - map: [ "enum.HumanoidVisualLayers.LArm" ]
      - map: [ "enum.HumanoidVisualLayers.RLeg" ]
      - map: [ "enum.HumanoidVisualLayers.LLeg" ]
      - map: [ "enum.HumanoidVisualLayers.Underwear" ]
      - map: [ "enum.HumanoidVisualLayers.Undershirt" ]
      - map: [ "jumpsuit" ]
      - map: [ "enum.HumanoidVisualLayers.LHand" ]
      - map: [ "enum.HumanoidVisualLayers.RHand" ]
      - map: [ "enum.HumanoidVisualLayers.LFoot" ]
      - map: [ "enum.HumanoidVisualLayers.RFoot" ]
      - map: [ "enum.HumanoidVisualLayers.Handcuffs" ]
        color: "#ffffff"
        sprite: Objects/Misc/handcuffs.rsi
        state: body-overlay-2
        visible: false
      - map: [ "gloves" ]
      - map: [ "shoes" ]
      - map: [ "ears" ]
      - map: [ "eyes" ]
      - map: [ "id" ]
      - map: [ "outerClothing" ]
      - map: [ "belt" ] #Goobedit - Belts over outerwear
      - map: [ "enum.HumanoidVisualLayers.Tail" ] #in the utopian future we should probably have a wings enum inserted here so everyhting doesn't break
      - map: [ "back" ]
      - map: [ "neck" ]
      - map: [ "enum.HumanoidVisualLayers.Face" ]
      - map: [ "enum.HumanoidVisualLayers.FacialHair" ]
      - map: [ "enum.HumanoidVisualLayers.HeadSide" ]
      - map: [ "maskalt" ]
      - map: [ "enum.HumanoidVisualLayers.Hair" ]
      - map: [ "mask" ]
      - map: [ "enum.HumanoidVisualLayers.HeadTop" ]
      - map: [ "head" ]
      - map: [ "pocket1" ]
      - map: [ "pocket2" ]
      - map: [ "clownedon" ] # Dynamically generated
        sprite: "Effects/creampie.rsi"
        state: "creampie_moth"
        visible: false
  - type: Inventory
    speciesId: moth
    femaleDisplacements:
      jumpsuit:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: jumpsuit-female
      back:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: back
      outerClothing:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: outerclothing
      gloves:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: hand
      shoes:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: shoes
    displacements:
      jumpsuit:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: jumpsuit-male
      back:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: back
      outerClothing:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: outerclothing
      gloves:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: hand
      shoes:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: shoes
  - type: Fixtures # Goob edit - make moths lighter
    fixtures: # TODO: This needs a second fixture just for mob collisions.
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.35
        density: 173 # fluff
        restitution: 0.0
        mask:
        - MobMask
        layer:
        - MobLayer
  - type: DashAction # Goobstation - dark souls moths
    actionProto: ActionDashMoth

- type: entity
  parent: BaseSpeciesDummy
  id: MobMothDummy
  categories: [ HideSpawnMenu ]
  components:
  - type: HumanoidAppearance
    species: Moth
  - type: Inventory
    speciesId: moth
    femaleDisplacements:
      jumpsuit:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: jumpsuit-female
      back:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: back
      outerClothing:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: outerclothing
      gloves:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: hand
      shoes:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: shoes
    displacements:
      jumpsuit:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: jumpsuit-male
      back:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: back
      outerClothing:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: outerclothing
      gloves:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: hand
      shoes:
        sizeMaps:
          32:
            sprite: Mobs/Species/Moth/displacement.rsi
            state: shoes
