# SPDX-FileCopyrightText: 2022 E F R <602406+Efruit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Flipp Syder <76629141+vulppine@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 corentt <36075110+corentt@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 eoineoineoin <eoin.mcloughlin+gh@gmail.com>
# SPDX-FileCopyrightText: 2023 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 AJCM <AJCM@tutanota.com>
# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Alex Evgrashin <aevgrashin@yandex.ru>
# SPDX-FileCopyrightText: 2024 Alex Pavlenko <diraven@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Alice "Arimah" Heurlin <30327355+arimah@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 ArkiveDev <95712736+ArkiveDev@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Boaz1111 <149967078+Boaz1111@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Brandon Hu <103440971+Brandon-Huu@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 Doomsdrayk <robotdoughnut@comcast.net>
# SPDX-FileCopyrightText: 2024 DrEnzyme <DrEnzyme@gmail.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Elysium206 <151651971+Elysium206@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 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Floofi <126319569+Shadowtheprotogen546@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ghagliiarghii <68826635+Ghagliiarghii@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 HS <81934438+HolySSSS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 K-Dynamic <20566341+K-Dynamic@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kevin Zheng <kevinz5000@gmail.com>
# SPDX-FileCopyrightText: 2024 Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MetalSage <74924875+MetalSage@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MetalSage <metalsage.official@gmail.com>
# SPDX-FileCopyrightText: 2024 MilenVolf <63782763+MilenVolf@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 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 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Redfire1331 <125223432+Redfire1331@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Rouge2t7 <81053047+Sarahon@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Tayrtahn <tayrtahn@gmail.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 Vasilis <vasilis@pikachu.systems>
# SPDX-FileCopyrightText: 2024 WarMechanic <69510347+WarMechanic@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 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 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 marbow <152051971+marboww@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 mhamster <81412348+mhamsterr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 neutrino <67447925+neutrino-laser@users.noreply.github.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 redfire1331 <Redfire1331@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Арт <123451459+JustArt1m@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Ilya246 <57039557+Ilya246@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# Threshold prototypes for AtmosMonitors

# NOTE: Warning thresholds are given as multipliers of the danger bound. For
# example, if upperBound=10 (kPa) and upperWarnRound=0.5, that means the upper
# warning threshold is actually 5 (kPa).
#
# As a result, all upperWarn's should be <1 and lowerWarn's should be >1,
# otherwise the warning will never kick in.

- type: alarmThreshold
  id: stationTemperature
  upperBound: !type:AlarmThresholdSetting
    threshold: 393.15 # T20C + 200
  lowerBound: !type:AlarmThresholdSetting
    threshold: 193.15 # T20C - 100
  upperWarnAround: !type:AlarmThresholdSetting
    threshold: 0.8
  lowerWarnAround: !type:AlarmThresholdSetting
    threshold: 1.1

- type: alarmThreshold
  id: stationPressure
  upperBound: !type:AlarmThresholdSetting
    threshold: 550 # HazardHighPressure from Atmospherics.cs
  lowerBound: !type:AlarmThresholdSetting
    # Actual low pressure damage threshold is at 20 kPa, but below ~85 kPa you can't breathe due to lack of oxygen.
    threshold: 40 # Goobstation - was 85
  upperWarnAround: !type:AlarmThresholdSetting
    threshold: 0.7 # 385 kPa, WarningHighPressure from Atmospherics.cs
  lowerWarnAround: !type:AlarmThresholdSetting
    threshold: 2 # Goobstation - 80kPa, was 1.05 (90 kPa)

# For gas concentrations, threshold=0.1 means 10%
- type: alarmThreshold
  id: stationOxygen
  lowerBound: !type:AlarmThresholdSetting
    threshold: 0.10
  upperBound: !type:AlarmThresholdSetting
    threshold: 1.0 # Goobstation
  lowerWarnAround: !type:AlarmThresholdSetting
    threshold: 1.5
  upperWarnAround: !type:AlarmThresholdSetting
    threshold: 0.8 # Goobstation

- type: alarmThreshold
  id: stationNitrogen
  lowerBound: !type:AlarmThresholdSetting
    threshold: 0.10
  lowerWarnAround: !type:AlarmThresholdSetting
    threshold: 1.5

- type: alarmThreshold
  id: stationCO2
  upperBound: !type:AlarmThresholdSetting
    threshold: 0.006
  upperWarnAround: !type:AlarmThresholdSetting
    threshold: 0.5 # minor gasping and airloss at 0.3%

- type: alarmThreshold
  id: stationPlasma
  upperBound: !type:AlarmThresholdSetting
    threshold: 0.005 # lightable beyond this concentration
  upperWarnAround: !type:AlarmThresholdSetting
    threshold: 0.5

- type: alarmThreshold
  id: stationTritium
  upperBound: !type:AlarmThresholdSetting
    threshold: 0.004 # lightable beyond this concentration
  upperWarnAround: !type:AlarmThresholdSetting
    threshold: 0.5

# this is a hack, but 150% means never danger on water, but warn at 75%
- type: alarmThreshold
  id: stationWaterVapor
  upperBound: !type:AlarmThresholdSetting
    threshold: 1.5
  upperWarnAround: !type:AlarmThresholdSetting
    threshold: 0.5

- type: alarmThreshold
  id: stationNO
  upperBound: !type:AlarmThresholdSetting
    threshold: 0.01
  upperWarnAround: !type:AlarmThresholdSetting
    threshold: 0.5

- type: alarmThreshold
  id: stationAmmonia
  upperBound: !type:AlarmThresholdSetting
    threshold: 0.05
  upperWarnAround: !type:AlarmThresholdSetting
    threshold: 0.5

- type: alarmThreshold
  id: ignore # just ignore nitrogen??? ??? ???
  ignore: true

- type: alarmThreshold
  id: danger # just any gas you don't want at all
  upperBound: !type:AlarmThresholdSetting
    threshold: 0.0001

- type: alarmThreshold
  id: voxOxygen
  upperBound: !type:AlarmThresholdSetting
    threshold: 0.02 # 2%
  upperWarnAround: !type:AlarmThresholdSetting
    threshold: 0.5 # 1%

- type: alarmThreshold
  id: voxNitrogen
  lowerBound: !type:AlarmThresholdSetting
    threshold: 0.8 # danger below 80% nitrogen
  lowerWarnAround: !type:AlarmThresholdSetting
    threshold: 1.125 # warning below 90%

- type: alarmThreshold
  id: freezerTemperature
  upperBound: !type:AlarmThresholdSetting
    threshold: 335.15 # T-38.15C (235) + 100
  lowerBound: !type:AlarmThresholdSetting
    threshold: 135.15 # T-38.15C (235) - 100
  upperWarnAround: !type:AlarmThresholdSetting
    threshold: 0.8
  lowerWarnAround: !type:AlarmThresholdSetting
    threshold: 1.1
