# SPDX-FileCopyrightText: 2020 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Moony <moonheart08@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <gradientvera@outlook.com>
# SPDX-FileCopyrightText: 2021 Ygg01 <y.laughing.man.y@gmail.com>
# SPDX-FileCopyrightText: 2021 py01 <60152240+collinlunn@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 py01 <pyronetics01@gmail.com>
# SPDX-FileCopyrightText: 2022 Alex Evgrashin <aevgrashin@yandex.ru>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Rane <60792108+Elijahrane@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Visne <39844191+Visne@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Vordenburg <114301317+Vordenburg@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Cody ~ Aexxie <125095677+Aexxie@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Darkie <darksaiyanis@gmail.com>
# SPDX-FileCopyrightText: 2023 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 I.K <45953835+notquitehadouken@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Jezithyr <6192499+Jezithyr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2023 Whisper <121047731+QuietlyWhisper@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 notquitehadouken <1isthisameme>
# SPDX-FileCopyrightText: 2024 12rabbits <53499656+12rabbits@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Alzore <140123969+Blackern5000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 AutoOtter <joshuademorris@gmail.com>
# SPDX-FileCopyrightText: 2024 BombasterDS <115770678+BombasterDS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Brandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DieselMohawk <gavin.drinka@gmail.com>
# SPDX-FileCopyrightText: 2024 Dimastra <65184747+Dimastra@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Dimastra <dimastra@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 Eoin Mcloughlin <helloworld@eoinrul.es>
# SPDX-FileCopyrightText: 2024 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 JIPDawg <51352440+JIPDawg@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 JIPDawg <JIPDawg93@gmail.com>
# SPDX-FileCopyrightText: 2024 JustCone <141039037+JustCone14@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mervill <mervills.email@gmail.com>
# SPDX-FileCopyrightText: 2024 MisterMecky <mrmecky@hotmail.com>
# SPDX-FileCopyrightText: 2024 Moomoobeef <62638182+Moomoobeef@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 PJBot <pieterjan.briers+bot@gmail.com>
# SPDX-FileCopyrightText: 2024 Partmedia <kevinz5000@gmail.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers@gmail.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 PopGamer46 <yt1popgamer@gmail.com>
# SPDX-FileCopyrightText: 2024 PursuitInAshes <pursuitinashes@gmail.com>
# SPDX-FileCopyrightText: 2024 QueerNB <176353696+QueerNB@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 RumiTiger <154005209+RumiTiger@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Saphire Lattice <lattice@saphi.re>
# SPDX-FileCopyrightText: 2024 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Simon <63975668+Simyon264@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Spessmann <156740760+Spessmann@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Tayrtahn <tayrtahn@gmail.com>
# SPDX-FileCopyrightText: 2024 Thomas <87614336+Aeshus@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Unisol <1929445+Unisol@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Verm <32827189+Vermidia@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Winkarst <74284083+Winkarst-cpu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 beck-thompson <107373427+beck-thompson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 coolboy911 <85909253+coolboy911@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 eoineoineoin <github@eoinrul.es>
# SPDX-FileCopyrightText: 2024 github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lanse12 <cloudability.ez@gmail.com>
# SPDX-FileCopyrightText: 2024 liltenhead <104418166+liltenhead@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lunarcomets <140772713+lunarcomets@users.noreply.github.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 <oskariwjarvinen@gmail.com>
# SPDX-FileCopyrightText: 2024 saintmuntzer <47153094+saintmuntzer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 stellar-novas <stellar_novas@riseup.net>
# 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 BeBright <98597725+be1bright@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Eagle <lincoln.mcqueen@gmail.com>
# SPDX-FileCopyrightText: 2025 Fishbait <Fishbait@git.ml>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Ilya246 <ilyukarno@gmail.com>
# SPDX-FileCopyrightText: 2025 SX_7 <sn1.test.preria.2002@gmail.com>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 VMSolidus <evilexecutive@gmail.com>
# SPDX-FileCopyrightText: 2025 fishbait <gnesse@gmail.com>
# SPDX-FileCopyrightText: 2025 gus <august.eymann@gmail.com>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
# SPDX-FileCopyrightText: 2025 themias <89101928+themias@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 vanx <61917534+Vaaankas@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  name: welding tool
  parent: BaseItem
  id: Welder
  description: "Melts anything as long as it's fueled, don't forget your eye protection!"
  components:
  # Goobstation edit start
  - type: EmitSoundOnPickup
    sound:
      path: /Audio/_Goobstation/Items/handling/weldingtool_pickup.ogg
  - type: EmitSoundOnDrop
    sound:
      path: /Audio/Items/welder_drop.ogg
  # Goobstation edit end
  - type: EmitSoundOnLand
    sound:
      path: /Audio/Items/welder_drop.ogg
  - type: Sprite
    sprite: Objects/Tools/welder.rsi
    layers:
    - state: icon
    - state: welder_flame
      visible: false
      shader: unshaded
      map: ["enum.ToggleableVisuals.Layer"]
  - type: GenericVisualizer
    visuals:
      enum.ToggleableVisuals.Enabled:
        enum.ToggleableVisuals.Layer:
          True: { visible: true }
          False: { visible: false }
  - type: Item
    size: Small
    sprite: Objects/Tools/welder.rsi
  - type: ItemToggle
    predictable: false
    soundActivate:
      collection: WelderOn
      params:
        variation: 0.125
        volume: -5
    soundDeactivate:
      collection: WelderOff
      params:
        variation: 0.125
        volume: -5
  - type: ItemToggleMeleeWeapon
    activatedSoundOnHit:
      path: /Audio/Weapons/Guns/Hits/energy_meat1.ogg
      params:
        variation: 0.250
        volume: -10
    activatedSoundOnHitNoDamage:
      path: /Audio/Weapons/Guns/Hits/energy_meat1.ogg
      params:
        variation: 0.250
        volume: -12
    deactivatedSoundOnHitNoDamage:
      collection: MetalThud
    activatedDamage:
        types:
            Heat: 8
  - type: ItemToggleSize
    activatedSize: Large
  - type: ItemToggleHot
  - type: ComponentToggler
    components:
    - type: DisarmMalus
      malus: 0.6
  - type: ToggleableVisuals
    spriteLayer: flame
    inhandVisuals:
      left:
      - state: inhand-left-flame
        shader: unshaded
      right:
      - state: inhand-right-flame
        shader: unshaded
  - type: UseDelay
  - type: MeleeWeapon
    animationRotation: -90 # WWDP
    wideAnimationRotation: -90
    damage:
      types:
        Blunt: 5 #i mean... i GUESS you could use it like that
    soundHit:
      collection: MetalThud
  - type: RefillableSolution
    solution: Welder
  - type: SolutionContainerManager
    solutions:
      Welder:
        reagents:
        - ReagentId: WeldingFuel
          Quantity: 100
        maxVol: 100
  - type: Tool
    alwaysCheckDoAfter: true # Goobstation
    useSound:
      collection: Welder
    qualities:
    - Welding
    - Axing # Goobstation
    - Ignition
  - type: WeldingSparks # Goobstation
  - type: ToolTileCompatible # Goobstation
    delay: 2
  - type: Welder
  - type: PointLight
    enabled: false
    radius: 1.5
    color: orange
    netsync: false
  - type: ItemTogglePointLight
  - type: Appearance
  - type: RequiresEyeProtection
  - type: PhysicalComposition
    materialComposition:
      Steel: 200
  - type: StaticPrice
    price: 40
  - type: IgnitionSource
    temperature: 700
  - type: Cautery # Shitmed
    speed: 0.7
  - type: SurgeryTool # Shitmed
    startSound:
      collection: Welder
    endSound:
      collection: WelderOff
  - type: Tag
    tags:
    - DroneUsable # Goobstation
    - WeldingTool # Einstein Engines

- type: entity
  name: industrial welding tool
  parent: Welder
  id: WelderIndustrial
  description: "An industrial welder with over double the fuel capacity."
  components:
  - type: Sprite
    sprite: Objects/Tools/welder_industrial.rsi
  - type: Item
    sprite: Objects/Tools/welder_industrial.rsi
  - type: SolutionContainerManager
    solutions:
      Welder:
        reagents:
        - ReagentId: WeldingFuel
          Quantity: 250
        maxVol: 250

- type: entity
  name: advanced industrial welding tool
  parent: WelderIndustrial
  id: WelderIndustrialAdvanced
  description: "An advanced industrial welder with over double the fuel capacity and hotter flame."
  components:
  - type: Sprite
    sprite: Objects/Tools/welder_industrialadv.rsi
  - type: Item
    sprite: Objects/Tools/welder_industrialadv.rsi
  - type: SolutionContainerManager
    solutions:
      Welder:
        reagents:
        - ReagentId: WeldingFuel
          Quantity: 250
        maxVol: 250
  - type: Tool
    speedModifier: 1.3

- type: entity
  name: experimental welding tool
  parent: Welder
  id: WelderExperimental
  description: "An experimental welder capable of self-fuel generation and less harmful to the eyes."
  components:
  - type: Sprite
    sprite: Objects/Tools/welder_experimental.rsi
  - type: Item
    sprite: Objects/Tools/welder_experimental.rsi
  - type: SolutionContainerManager
    solutions:
      Welder:
        reagents:
        - ReagentId: WeldingFuel
          Quantity: 1000
        maxVol: 1000
  - type: PointLight
    enabled: false
    radius: 1.5
    color: lightblue
  - type: SolutionRegeneration
    solution: Welder
    generated:
      reagents:
      - ReagentId: WeldingFuel
        Quantity: 1
  - type: RequiresEyeProtection
    statusEffectTime: 5 # less harmful; sunglasses can block it
  - type: PhysicalComposition #Goobstation - Recycle update
    materialComposition:
      Steel: 200
      Plasma: 50
  - type: StaticPrice #Goobstation - Recycle update
    price: 50
  - type: WeldingSparks # Goobstation
    effect: EffectWeldingSparksExp

- type: entity
  name: emergency welding tool
  parent: Welder
  id: WelderMini
  description: "A miniature welder used during emergencies."
  components:
  - type: Sprite
    sprite: Objects/Tools/welder_mini.rsi
  - type: Item
    size: Tiny
    sprite: Objects/Tools/welder_mini.rsi
  - type: RefillableSolution
    solution: Welder
  - type: SolutionContainerManager
    solutions:
      Welder:
        reagents:
        - ReagentId: WeldingFuel
          Quantity: 50
        maxVol: 50
  - type: Tool
    speedModifier: 0.7
  - type: PointLight
    enabled: false
    radius: 1.0
    color: orange

- type: entity
  parent: [ Welder, BaseXenoborgContraband ]
  id: RefuelingWelder
  name: refuling welding tool
  description: "An slow welder that can refuel itself over time."
  components:
  - type: Tool
    speedModifier: 0.5
  - type: Welder
    fuelConsumption: 2
    fuelLitCost: 1
  - type: SolutionRegeneration
    solution: Welder
    generated:
      reagents:
      - ReagentId: WeldingFuel
        Quantity: 0.1
