mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Improved pressure differential detection. Added Get PDiff verb in Debug, too.
This commit is contained in:
@@ -19,6 +19,9 @@
|
|||||||
if(T && istype(T,/turf/simulated) && T.zone)
|
if(T && istype(T,/turf/simulated) && T.zone)
|
||||||
var/datum/gas_mixture/environment = T.return_air()
|
var/datum/gas_mixture/environment = T.return_air()
|
||||||
cp = environment.return_pressure()
|
cp = environment.return_pressure()
|
||||||
|
else
|
||||||
|
if(istype(T,/turf/simulated))
|
||||||
|
continue
|
||||||
if(cp<minp)minp=cp
|
if(cp<minp)minp=cp
|
||||||
if(cp>maxp)maxp=cp
|
if(cp>maxp)maxp=cp
|
||||||
return abs(minp-maxp)
|
return abs(minp-maxp)
|
||||||
@@ -46,6 +49,25 @@
|
|||||||
return pdiff
|
return pdiff
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
/client/verb/pdiff()
|
||||||
|
set name = "Get PDiff"
|
||||||
|
set category = "Debug"
|
||||||
|
|
||||||
|
if(!mob || !holder)
|
||||||
|
return
|
||||||
|
var/turf/T = mob.loc
|
||||||
|
|
||||||
|
if (!( istype(T, /turf) ))
|
||||||
|
return
|
||||||
|
|
||||||
|
var/pdiff = getOPressureDifferential(T)
|
||||||
|
var/fwpcheck=performFalseWallPressureCheck(T)
|
||||||
|
var/wpcheck=performWallPressureCheck(T)
|
||||||
|
|
||||||
|
src << "Pressure Differential (cardinals): [pdiff]"
|
||||||
|
src << "FWPCheck: [fwpcheck]"
|
||||||
|
src << "WPCheck: [wpcheck]"
|
||||||
|
|
||||||
/obj/structure/falsewall
|
/obj/structure/falsewall
|
||||||
name = "wall"
|
name = "wall"
|
||||||
desc = "A huge chunk of metal used to seperate rooms."
|
desc = "A huge chunk of metal used to seperate rooms."
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
|||||||
t+= "Oxygen : [env.oxygen]\n"
|
t+= "Oxygen : [env.oxygen]\n"
|
||||||
t+= "Plasma : [env.toxins]\n"
|
t+= "Plasma : [env.toxins]\n"
|
||||||
t+= "CO2: [env.carbon_dioxide]\n"
|
t+= "CO2: [env.carbon_dioxide]\n"
|
||||||
|
t+= "Pressure: [env.return_pressure()]\n"
|
||||||
|
|
||||||
usr.show_message(t, 1)
|
usr.show_message(t, 1)
|
||||||
feedback_add_details("admin_verb","ASL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","ASL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|||||||
Reference in New Issue
Block a user