Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domino of Explosions: Explosion on a Dwayne-Class #3387

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

rye-rice
Copy link
Member

About The Pull Request

September 5th, 505 FSC. A Dwayne-class mining vessel- the ISV Crimson Rose- was landed on a sand planet, when it suddenly exploded. The cause was an untrained engineer accidentlly unwrenched a fuel pipe filling the area with invisible hydrogen gas. The gas found an ignition source, likely a broken light tube, and ignited. The fire spread into the midsection, where the engineer perished due to the fire. However, the fire rapidly heated the air tank of the vessel, and pressurized tank exploded, shredding 2 crew members and critically damaged the vessel.

Incidents like this investigated by the PGFCSB clearly show a poor safety culture on the frontier.

Why It's Good For The Game

You see that above story? This was from a real round, however the part i neglected to mention was the massive explosion was not actually a mechanic, but an admin fucking up blowing up an oxygen tank to try and add more oxygen for the fire, which accidently maxcaped the ship. However, I was so impressed with this story I decided to make it into a mechanic and is apart of this pr, which it's focus is workplace hazards. So let's see what we have here.

  • Many changes were made to make huamans more squishy and less supermen.
    • But wait! Won't this conflict with Temperature Feedback #3358 ? The changes here are made to work in tanden with that PR, for better situational awareness and to make hazards more evident.
  • Ports TGMC's "flame_radius" proc and is used by flame radius for explosions
  • Extingushers like flamethrowers can go over objects now, so you can finally extinguish the fucking turf fires blocked by objects.
  • Smoking a cigarette near a fuel tank or pressurized tank will either blow up the tank or set you on fire in a flash fire.
  • Makes tank explosions better and less shitty, it should be more common to happen during fires, especially during gas fires
  • Adds carbon monoxide, produced by PACMANS, uranium ones produce barely any. Unlike IRL its not flammable as I cannot set the lower explosive limit for it.
  • Makes hydrogen invisible. Smiles
  • Pressurized tanks have much more air, totally not for them to explode more easily.
  • Gibbing doesnt destroy the body anymore. Anti-salt measure and gibbing destroying torsos is very unpopular, might as well do it here.

Changelog

🆑
add: Revise your safety guidelines, as fires can and will explode tanks if in contact with them! Be careful!
add: Carbon monoxide, produced by pacmans. Don't huff it, it's not fun.
add: changes how flame explosions work
add: Be careful where you smoke...
/:cl:

@github-actions github-actions bot added the Code change Watch something violently break. label Sep 18, 2024
Copy link
Contributor

@FalloutFalcon FalloutFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty unatomic.. Nearly all of this is balance changes that seem pretty arbitrary. I'm really not sure I like the tank thresholds much and would like to see some examples of how that would play out in game, are there any tanks that start with this pressure. How easy is it to actually blow up a tank.
All the current sources of gibbing SHOULD be round removal as its mostly mega fauna or extreme explosions that should not leave a intact torso. carbon monoxide also seems like it should be its own pr as i don't see its relation to explosions at all. Im also not a big fan of most of its code but i imagine all the other gasses aren't much better.
I would prefer this being broken up into at least 2 prs probably more tbh.

@@ -24,7 +24,7 @@
M.Scale(1.8, 1.2)
animate(src, time = 40, transform = M, easing = SINE_EASING)

/mob/living/carbon/gib(no_brain, no_organs, no_bodyparts, safe_gib = FALSE)
/mob/living/carbon/gib(no_brain, no_organs, no_bodyparts, safe_gib = TRUE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has to be a separate pr

Comment on lines 1273 to 1276
living_carbon.cure_trauma_type(/datum/brain_trauma/mild/muscle_weakness)
living_carbon.cure_trauma_type(/datum/brain_trauma/mild/concussion)
living_carbon.cure_trauma_type(/datum/brain_trauma/mild/speech_impediment)
living_carbon.cure_trauma_type(/datum/brain_trauma/mild/expressive_aphasia)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can now clear a concussion by huffing a single breath of carbon monoxide. You need to add source types if you want this so you only clear a trauma developed from carbon monoxide.

@@ -161,7 +172,7 @@
specific_heat = 10
name = "Hydrogen"
flags = GAS_FLAG_DANGEROUS
moles_visible = MOLES_GAS_VISIBLE
//moles_visible = MOLES_GAS_VISIBLE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain why

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain why

image

code/datums/components/pellet_cloud.dm Outdated Show resolved Hide resolved
Comment on lines -49 to -50
if(!isammocasing(parent) && !isgrenade(parent) && !islandmine(parent) && !issupplypod(parent))
return COMPONENT_INCOMPATIBLE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please at least check that its an atom or obj

Comment on lines 1209 to 1223
to_chat(src, "<span class='warning'>You feel dizzy.</span>")
if(50 to 150)
to_chat(victim, "<span class='warning'>[pick("Your head hurts.", "Your head pounds.")]</span>")
victim.Dizzy(5)
victim.adjustStaminaLoss(1)
if(150 to 250)
to_chat(victim, "<span class='userdanger'>[pick("Your head hurts!", "You feel a burning knife inside your brain!", "A wave of pain fills your head!")]</span>")
victim.adjustStaminaLoss(3)
victim.Stun(10)
victim.Dizzy(5)
victim.confused += (accumilation/50)
victim.gain_trauma(/datum/brain_trauma/mild/expressive_aphasia)
victim.gain_trauma(/datum/brain_trauma/mild/muscle_weakness)
if(250 to 350)
to_chat(victim, "<span class='userdanger'>[pick("What were you doing...?", "Where are you...?", "What's going on...?")]</span>")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

span define all of these

Comment on lines +334 to +347
if (0 to 20)
monoxide_reagent.accumilation = min(monoxide_reagent.accumilation,50)
if (20 to 100)
monoxide_reagent.accumilation = min(monoxide_reagent.accumilation, 150)
H.reagents.add_reagent(/datum/reagent/carbon_monoxide,2)
if (100 to 200)
monoxide_reagent.accumilation = min(monoxide_reagent.accumilation, 250)
H.reagents.add_reagent(/datum/reagent/carbon_monoxide,4)
if (200 to 400)
monoxide_reagent.accumilation = min(monoxide_reagent.accumilation, 250)
H.reagents.add_reagent(/datum/reagent/carbon_monoxide,8)
if (400 to INFINITY)
monoxide_reagent.accumilation = max(monoxide_reagent.accumilation, 450)
H.reagents.add_reagent(/datum/reagent/carbon_monoxide,16)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the way this scales could probably be done with math instead of a switch statment

@generalthrax
Copy link
Contributor

As of right now, the tank max pressure means that air pumps will immediately blow up tanks if you fill them.

Is carbon monoxide produced by anything other than pacmans? I've noticed that its just Everywhere on a ship even though scrubbers should be robust enough to deal with it.

@firebudgy
Copy link
Contributor

Ships aren't properly scrubbing CO in engine bays, and apparently it makes you permanently hallucinate upon entering them. Might be something worth tuning.

@Gristlebee
Copy link
Contributor

Gristlebee commented Sep 18, 2024

I'd maybe recommend adding some hint or addition to the descs welding tanks and gas tanks to indicate it can explode if you smoke near them, so there's some stated warning to a punishment mechanic.

@KittyNoodle
Copy link
Contributor

a major problem with Carbon Monoxide is that it works like BZ, so if you take in a whif of a tiny amount of the gas you just get fucked for the next 7 minutes

@firebudgy
Copy link
Contributor

Probably worth adding some form of indication to exploding emergency oxygen tanks and the like since nobody seems to know what the safe pressure is (as there's no feedback).

Comment on lines +173 to +175
#define TANK_LEAK_PRESSURE (20 * ONE_ATMOSPHERE + 5)
/// Tank spills all contents into atmosphere
#define TANK_RUPTURE_PRESSURE (35.*ONE_ATMOSPHERE)
#define TANK_RUPTURE_PRESSURE (20 * ONE_ATMOSPHERE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2023 kpa is less than the air pump, which fills to ~2533, so people trying to fill tanks with one can break them (source: experience). I'd think at the very least tanks should have warning labels for maximum pressure/temperature

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea

Probably on a examine()

take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE)/2, 0), BURN, 0)


/obj/item/tank/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's easy for a tank to end up overheating on lava planets & there's no fast way to un-overheat a tank as far as I'm aware

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this mechanic, temperature_expose only procs on fires

Before I removed it putting the tank back in your ship would cool it ambiently

Comment on lines +97 to +98
var/pollution_multiplier = 0
var/pollution_gas = GAS_CO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This stuff feels like it would work better if not for the fact you are inside a ship all the time, moving a generator outside would be complicated and/or tedious and most ships rely on them

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's effectively disabled right now, atmos during testing and on live looked very different. I might keep it then enable it far far later when we got better primary engines

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iirc Rylies ripping this out for now, for a separate pr.

Comment on lines +1202 to +1204
if(holder.has_reagent(/datum/reagent/oxygen))
holder.remove_reagent(/datum/reagent/carbon_monoxide, 2*REM)
accumilation = accumilation/4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is double dipped w/ oxygen reagent on_mob_life and I think it should be handled in one or the other

Comment on lines +1218 to +1219
victim.gain_trauma(/datum/brain_trauma/mild/expressive_aphasia)
victim.gain_trauma(/datum/brain_trauma/mild/muscle_weakness)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The traumas here should probably be tracked somehow so huffing monoxide doesn't fix unrelated ones

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no way to track it as far as I'm aware, the < 140 is a bandaid

name = "Carbon Monoxide"
description = "A highly dangerous gas for sapients."
reagent_state = GAS
metabolization_rate = 0.1 * REAGENTS_METABOLISM
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.04 metabolization speed means it'll likely need to be purged externally if you breathe any, and while injecting reagent oxygen might be intuitive for people who know how it works its probably not intuitive for a player

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah
Probably going to make it a normal rate, this was from when I couldn't get it to disappear immediately

/// Tank starts leaking
#define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE)
#define TANK_LEAK_PRESSURE (20 * ONE_ATMOSPHERE + 5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is higher than the rupture pressure so tanks probably won't leak (for long) they'll just pop

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed tank leaking from internal tanks, it didn't seem to even work as intended and during testing it was like... meh honestly

Comment on lines +3 to +9
#define HAZARD_HIGH_PRESSURE 303
/// This determins when the orange pressure icon is displayed (it is 0.7 * HAZARD_HIGH_PRESSURE)
#define WARNING_HIGH_PRESSURE 325
#define WARNING_HIGH_PRESSURE 202
/// This is when the gray low pressure icon is displayed. (it is 2.5 * HAZARD_LOW_PRESSURE)
#define WARNING_LOW_PRESSURE 50
#define WARNING_LOW_PRESSURE 60
/// This is when the black ultra-low pressure icon is displayed. (This one is set as a constant)
#define HAZARD_LOW_PRESSURE 20
#define HAZARD_LOW_PRESSURE 40
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably update the comments here because they will be inaccurate with the current numbers

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep

Comment on lines 30 to +35
/// 340k is about 66c, and rather high for a human.
#define HUMAN_BODYTEMP_HEAT_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL + 30)
#define HUMAN_BODYTEMP_HEAT_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL + 20)
/// The body temperature limit the human body can take before it starts taking damage from cold.
/// This also affects how fast the body normalises it's temperature when cold.
/// 270k is about -3c, that is below freezing and would hurt over time.
#define HUMAN_BODYTEMP_COLD_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL - 40)
#define HUMAN_BODYTEMP_COLD_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL - 30)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the comments here too, new numbers are 57 c/ 330 k and 7 c/ 280 k

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ty

var/turf/test_turf = get_step(location, dir)
for(var/obj/to_test as obj in test_turf.contents)
if(istype(to_test, /obj/structure/reagent_dispensers/fueltank))
location.visible_message("<span class='userdanger'>A single ember from [src] drops gently onto [to_test]. Uh oh.</span>")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

span macros

@rye-rice
Copy link
Member Author

I'll try later to get this into a mergable state but tmt wanted to look at it post pref rework, so don't merge until then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code change Watch something violently break.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants