mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 12:35:33 +01:00
Merge pull request #9867 from RemieRichards/PipePressureLethality
Pipe Pressure Panic
This commit is contained in:
@@ -160,4 +160,21 @@
|
||||
if(Old == parent1)
|
||||
parent1 = New
|
||||
else if(Old == parent2)
|
||||
parent2 = New
|
||||
parent2 = New
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/unsafe_pressure_release(var/mob/user,var/pressures)
|
||||
..()
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
//Remove the gas from air1+air2 and assume it
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
var/lost = pressures*environment.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
|
||||
lost += pressures*environment.volume/(air2.temperature * R_IDEAL_GAS_EQUATION)
|
||||
var/shared_loss = lost/2
|
||||
|
||||
var/datum/gas_mixture/to_release = air1.remove(shared_loss)
|
||||
to_release.merge(air2.remove(shared_loss))
|
||||
T.assume_air(to_release)
|
||||
air_update_turf(1)
|
||||
Reference in New Issue
Block a user