mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
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:
@@ -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