You can now unwrench atmospheric machines with internal pressures greater than their environment, this will throw you away from the machine at great speed, inflicting damage if you hit something hard (walls)

This commit is contained in:
Remie Richards
2015-06-09 20:14:12 +01:00
parent 5f56335fbc
commit cccc3446f0
5 changed files with 95 additions and 7 deletions
@@ -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)