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

PGFCSB/OSHA update: Various workplace hazards now are hazards #3387

Closed
wants to merge 26 commits into 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
Member

@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
Member

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
Member

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.

code/modules/atmospherics/auxgm/gas_types.dm Show resolved Hide resolved
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
Member

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
Member

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

code/modules/surgery/organs/lungs.dm Show resolved Hide resolved
@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()

code/game/objects/items/tanks/tanks.dm Show resolved Hide resolved
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

code/modules/reagents/chemistry/reagents/other_reagents.dm Outdated Show resolved Hide resolved
/// 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

code/__DEFINES/species.dm Outdated Show resolved Hide resolved
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

@rye-rice rye-rice changed the title Domino of Explosions: Explosion on a Dwayne-Class PGFCSB/OSHA update: Various workplace hazards now are hazards Oct 2, 2024
@@ -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
Member

Choose a reason for hiding this comment

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

Again, please stop shoving this into random PRs without talking to anyone about it. I'm not interested in having extreme explosions just blow your limbs off like a lego man

Copy link
Member

Choose a reason for hiding this comment

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

additionally if your going to make the change because you want to prevent it specifically for explosion related gibbing it needs to be for those only instead of turning most if not all gibs into safe ones.
make this its own pr please..... and actually elaborate why..

@thgvr
Copy link
Member

thgvr commented Oct 5, 2024

I'm almost sure now that setting safe_gib = TRUE will crash the server on gibbing

@rye-rice
Copy link
Member Author

rye-rice commented Oct 5, 2024

removed safe_gib from this, i still think its a good idea but it crashes the server unfortunately, for another time

im moving the temperture stuff to another pr

@FalloutFalcon
Copy link
Member

removed safe_gib from this, i still think its a good idea but it crashes the server unfortunately, for another time

im moving the temperture stuff to another pr

this should have been removed from the pr regardless of if it crashed.

@rye-rice
Copy link
Member Author

For another time

@rye-rice rye-rice closed this Oct 24, 2024
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.

8 participants