Skip to content

Commit

Permalink
Atmospherics cleanup / adds some more fitting planetary gases from Ov…
Browse files Browse the repository at this point in the history
…emap Expansion #5 (#3627)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
This removes a substantial amount of bullshit from atmospherics, like
the 3 made up gases that only served for powergaming purposes.

This PR instead replaces them with much more fitting IRL gases seen in
irl planets such as:
- Argon
- Carbon Monoxide
- Sulfur Dioxide
- Ammonia
- Metane
- Ozone

Argon in particular inherits the fire suppression behavior from noble
gas, HOWEVER, the threshold to stop reactions has been increased from 10
mols to 75 mols. this should pose an suffocation hazard

The values to atmos fires have been tweaked, some gases that had no
entaphy now have it

This PR also adds a very basic chemical odor system, to detect certain
gases based on smell, in case you don't have an atmos analyzer on you,
and also to get you to actually siphon trace amounts of gases because
they stink up the place in case of a breach

## Why It's Good For The Game

removes cruft, replaces it with actual, fun, non-powergamey stuff that
will be used soon:tm: and also has the potential to have a bunch of fun
and realistic interactions when someone more familiar with this stuff
than me codes it. For example outside of planetary gases, some ideas I
had were:
- Sparks creating ozone
- Ammonia and chlorine mixing creating "snow" (Ammonium chloride) so a
leak of both gases would cover the floor with snow, this sounds like a
fun reaction to scare the shit out of people
- smarter people like @Thera-Pissed would probably know more what to do

## Changelog

:cl:
add: You can now detect certain gases from smell, most notably plasma
add: Adds 6 new gases, all unused at the moment
del: 3 gases, Pluox, Nitryl, and Stimming
balance: The noble gas suppresssion threshold has been increased from 10
mols to 75 mols
balance: Various gases have had their enthalpy (energy released during
fires) adjusted, changing the behavior of gas fires slightly.
balance: Plasma is a much more potent skin/eye irritant
balance: Hydrogen gas is no longer visible
fix: Freon's stage one breath effects should work now, before they were
tied to nitryl's amount
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Co-authored-by: retlaw34 <[email protected]>
Co-authored-by: Erika Fox <[email protected]>
  • Loading branch information
3 people authored Oct 29, 2024
1 parent 3c4d549 commit 4fe60a6
Show file tree
Hide file tree
Showing 27 changed files with 1,758 additions and 1,505 deletions.
562 changes: 281 additions & 281 deletions _maps/RandomRuins/RockRuins/rockplanet_distillery.dmm

Large diffs are not rendered by default.

330 changes: 165 additions & 165 deletions _maps/shuttles/inteq/inteq_talos.dmm

Large diffs are not rendered by default.

1,288 changes: 644 additions & 644 deletions _maps/shuttles/nanotrasen/nanotrasen_gecko.dmm

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions _maps/shuttles/subshuttles/independent_superpill.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"b" = (
/obj/structure/catwalk,
/obj/machinery/conveyor_switch/oneway{
desc = "A conveyor control switch. It appears to only go in one direction; once you've pulled this, there's no going back.";
id = "superpill_start";
name = "jumpstart device";
desc = "A conveyor control switch. It appears to only go in one direction; once you've pulled this, there's no going back."
name = "jumpstart device"
},
/obj/machinery/atmospherics/components/unary/outlet_injector/on/layer4{
dir = 4
Expand All @@ -34,8 +34,8 @@
id = "superpill_start"
},
/obj/item/reagent_containers/pill/floorpill{
pixel_y = -5;
pixel_x = -1
pixel_x = -1;
pixel_y = -5
},
/obj/item/reagent_containers/pill/floorpill{
pixel_x = 6
Expand Down Expand Up @@ -80,7 +80,7 @@
name = "environmental storytelling"
},
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer4{
filter_types = list("co2","bz","o2","plasma","water_vapor","nob","no2","tritium","freon","pluox","stim")
filter_types = list("co2","n2","co2","bz","water_vapor","miasma","freon","tritium","n20")
},
/turf/open/floor/plating{
initial_gas_mix = "n2o=28, n2=72;TEMP=7"
Expand Down
30 changes: 26 additions & 4 deletions code/__DEFINES/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -325,24 +325,46 @@
// Gas defines because i hate typepaths
#define GAS_O2 "o2"
#define GAS_N2 "n2"
#define GAS_CO "co"
#define GAS_O3 "ozone"
#define GAS_CO2 "co2"
#define GAS_PLASMA "plasma"
#define GAS_H2O "water_vapor"
#define GAS_HYPERNOB "nob"
#define GAS_NITROUS "n2o"
#define GAS_NITRYL "no2"
#define GAS_TRITIUM "tritium"
#define GAS_BZ "bz"
#define GAS_STIMULUM "stim"
#define GAS_PLUOXIUM "pluox"
#define GAS_FREON "freon"
#define GAS_HYDROGEN "h2"
#define GAS_CHLORINE "cl2"
#define GAS_HYDROGEN_CHLORIDE "hcl"

#define GAS_SO2 "so2"
#define GAS_ARGON "ar"
#define GAS_METHANE "methane"
#define GAS_AMMONIA "ammonia"

#define GAS_FLAG_DANGEROUS (1<<0)
#define GAS_FLAG_BREATH_PROC (1<<1)

// odors
#define GAS_ODOR_CHEMICAL list(\
span_notice("It smells fainly like space cleaner."),\
span_danger("It smells like chemicals."),\
span_danger("There's a strong smell in the air, like chlorine."),\
span_userdanger("The smell burns the inside of your nose! It's unbearable!"))

#define GAS_ODOR_SULFUR list(\
span_notice("Somebody passed gas in here."),\
span_danger("It smells like rotten eggs."),\
span_danger("There's a strong smell in the air, like something died here."),\
span_userdanger("The smell of chemical rot overwhelms you! It's unbearable!"))

#define GAS_ODOR_SMOG list(\
null,\
span_notice("Theres a charred smell in the air."),\
span_danger("There's a strong smell in the air, like something's burning."),\
span_userdanger("The acidic smell overwhelms you! It's unbearable!"))

// Flag for update_air_ref()
#define AIR_REF_CLOSED_TURF -1
#define AIR_REF_SPACE_TURF 0
Expand Down
6 changes: 3 additions & 3 deletions code/__DEFINES/reactions.dm
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//Defines used in atmos gas reactions. Used to be located in ..\modules\atmospherics\gasmixtures\reactions.dm, but were moved here because fusion added so fucking many.

//Plasma fire properties
#define OXYGEN_BURN_RATE_BASE 1.4
#define PLASMA_BURN_RATE_BASE 1.4
#define PLASMA_BURN_RATE_DELTA 9
#define PLASMA_MINIMUM_OXYGEN_NEEDED 2
#define PLASMA_MINIMUM_OXYGEN_PLASMA_RATIO 30
#define FIRE_CARBON_ENERGY_RELEASED 100000 //Amount of heat released per mole of burnt carbon into the tile
#define FIRE_HYDROGEN_ENERGY_RELEASED 280000 //Amount of heat released per mole of burnt hydrogen and/or tritium(hydrogen isotope)
#define FIRE_HYDROGEN_ENERGY_RELEASED 286000 //Amount of heat released per mole of burnt hydrogen and/or tritium(hydrogen isotope)
#define FIRE_PLASMA_ENERGY_RELEASED 3000000 //Amount of heat released per mole of burnt plasma into the tile
//General assmos defines.
#define WATER_VAPOR_FREEZE 200
Expand All @@ -29,7 +29,7 @@
#define STIMULUM_FIRST_DROP 0.065
#define STIMULUM_SECOND_RISE 0.0009
#define STIMULUM_ABSOLUTE_DROP 0.00000335
#define REACTION_OPPRESSION_THRESHOLD 10
#define REACTION_OPPRESSION_THRESHOLD 75
#define NOBLIUM_FORMATION_ENERGY 2e9 //1 Mole of Noblium takes the planck energy to condense.
#define STIM_BALL_GAS_AMOUNT 5
//Research point amounts
Expand Down
100 changes: 100 additions & 0 deletions code/datums/brain_damage/mild.dm
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,103 @@
speak_dejavu += speech_args[SPEECH_MESSAGE]
else
speak_dejavu += speech_args[SPEECH_MESSAGE]

/datum/brain_trauma/mild/monoxide_poisoning_stage1
name = "Stage 1 Carbon Monoxide Poisoning"
desc = "Due to overexposure to carbon monoxide, patient's mental facilities are degrading.."
scan_desc = "carbon monoxide poisoning"
gain_text = "<span class='warning'>You get a headache.</span>"
lose_text = "<span class='notice'>Your headache disapears and you find it easier to focus.</span>"

var/static/list/common_words = world.file2list("strings/1000_most_common.txt")

/datum/brain_trauma/mild/monoxide_poisoning_stage1/on_life()
var/fall_chance = 1
if(owner.m_intent == MOVE_INTENT_RUN)
fall_chance += 2
if(prob(fall_chance) && owner.body_position == STANDING_UP)
to_chat(owner, "<span class='warning'>Your leg gives out!</span>")
owner.Paralyze(35)

else if(owner.get_active_held_item())
var/drop_chance = 1
var/obj/item/I = owner.get_active_held_item()
drop_chance += I.w_class
if(prob(drop_chance) && owner.dropItemToGround(I))
to_chat(owner, "<span class='warning'>You drop [I]!</span>")

else if(prob(3))
to_chat(owner, "<span class='warning'>You feel a sudden weakness in your muscles!</span>")
owner.adjustStaminaLoss(50)
..()

/datum/brain_trauma/mild/monoxide_poisoning_stage1/handle_speech(datum/source, list/speech_args)
var/message = speech_args[SPEECH_MESSAGE]
if(message)
var/list/message_split = splittext(message, " ")
var/list/new_message = list()

for(var/word in message_split)
var/suffix = ""
var/suffix_foundon = 0
for(var/potential_suffix in list("." , "," , ";" , "!" , ":" , "?"))
suffix_foundon = findtext(word, potential_suffix, -length(potential_suffix))
if(suffix_foundon)
suffix = potential_suffix
break

if(suffix_foundon)
word = copytext(word, 1, suffix_foundon)
word = html_decode(word)

if(lowertext(word) in common_words)
new_message += word + suffix
else
if(prob(30) && message_split.len > 2)
new_message += pick("uh","erm")
break
else
var/list/charlist = text2charlist(word)
charlist.len = round(charlist.len * 0.5, 1)
shuffle_inplace(charlist)
new_message += jointext(charlist, "") + suffix

message = jointext(new_message, " ")

speech_args[SPEECH_MESSAGE] = trim(message)

/datum/brain_trauma/mild/monoxide_poisoning_stage2
name = "Stage 2 Carbon Monoxide Poisoning"
desc = "Due to extreme exposure to carbon monoxide, patient's higher brain functions are severely impacted."
scan_desc = "critical carbon monoxide poisoning"
gain_text = "<span class='warning'>You bad get forget you headache don't!</span>"
lose_text = "<span class='notice'>Your headache gets better.</span>"

/datum/brain_trauma/mild/monoxide_poisoning_stage2/on_gain()
ADD_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, TRAUMA_TRAIT)
..()

/datum/brain_trauma/mild/monoxide_poisoning_stage2/on_lose()
REMOVE_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, TRAUMA_TRAIT)
..()

/datum/brain_trauma/mild/monoxide_poisoning_stage2/on_life()
if(prob(5))
switch(rand(1,11))
if(1)
owner.vomit()
if(2,3)
owner.dizziness += 10
if(4,5)
owner.confused += 10
owner.blur_eyes(10)
if(6 to 9)
owner.slurring += 30
if(10)
to_chat(owner, "<span class='notice'>You forget what you were doing.</span>")
owner.Stun(20)
if(11)
to_chat(owner, "<span class='warning'>You faint.</span>")
owner.Unconscious(80)

..()
2 changes: 0 additions & 2 deletions code/game/machinery/shuttle/shuttle_heater.dm
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,6 @@
// adds each oxidizer's power to the total oxidation max
if(GAS_O2)
oxidation_power += O2_OXIDATION_VALUE * gas_amount
if(GAS_NITRYL)
oxidation_power += NITRYL_OXIDATION_VALUE * gas_amount
if(GAS_NITROUS) //burning nitrous cools down the heater's main tank, just like it cools the intake on real cars.
oxidation_power += NITROUS_OXIDATION_VALUE * gas_amount
var/heat_capacity = gas_amount * NITROUS_COOLING_MULTIPIER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
/obj/effect/spawner/random/waste/atmos_can/rare
loot = list(
/obj/machinery/portable_atmospherics/canister/tritium = 3,
/obj/machinery/portable_atmospherics/canister/pluoxium = 3
/obj/machinery/portable_atmospherics/canister/methane = 3
)

/obj/effect/spawner/random/waste/salvageable
Expand Down
2 changes: 1 addition & 1 deletion code/game/turfs/open/_open.dm
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
pulse_strength = min(pulse_strength,air.get_moles(GAS_CO2)*1000,air.get_moles(GAS_O2)*2000) //Ensures matter is conserved properly
air.set_moles(GAS_CO2, max(air.get_moles(GAS_CO2)-(pulse_strength/1000),0))
air.set_moles(GAS_O2, max(air.get_moles(GAS_O2)-(pulse_strength/2000),0))
air.adjust_moles(GAS_PLUOXIUM, pulse_strength/4000)
air.adjust_moles(GAS_O3, pulse_strength/4000)

/turf/open/IgniteTurf(power, fire_color)
if(turf_fire)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/atmospherics/auxgm/breathing_classes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
/datum/breathing_class/oxygen
gases = list(
GAS_O2 = 1,
GAS_PLUOXIUM = 8,
GAS_O3 = -0.7,
GAS_CO2 = -0.7, // CO2 isn't actually toxic, just an asphyxiant
GAS_ARGON = -1,
)
products = list(
GAS_CO2 = 1,
Expand Down
Loading

0 comments on commit 4fe60a6

Please sign in to comment.