mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Merge pull request #7009 from atlantiscze/2020_04_17_EPRFix
Fixes supermatter monitoring EPR indicator showing Undefined
This commit is contained in:
@@ -77,6 +77,7 @@
|
|||||||
data["SM_power"] = active.power
|
data["SM_power"] = active.power
|
||||||
data["SM_ambienttemp"] = air.temperature
|
data["SM_ambienttemp"] = air.temperature
|
||||||
data["SM_ambientpressure"] = air.return_pressure()
|
data["SM_ambientpressure"] = air.return_pressure()
|
||||||
|
data["SM_EPR"] = active.get_epr()
|
||||||
//data["SM_EPR"] = active.get_epr()
|
//data["SM_EPR"] = active.get_epr()
|
||||||
if(air.total_moles)
|
if(air.total_moles)
|
||||||
data["SM_gas_O2"] = round(100*air.gas["oxygen"]/air.total_moles,0.01)
|
data["SM_gas_O2"] = round(100*air.gas["oxygen"]/air.total_moles,0.01)
|
||||||
|
|||||||
@@ -131,6 +131,16 @@
|
|||||||
return SUPERMATTER_INACTIVE
|
return SUPERMATTER_INACTIVE
|
||||||
|
|
||||||
|
|
||||||
|
/obj/machinery/power/supermatter/proc/get_epr()
|
||||||
|
var/turf/T = get_turf(src)
|
||||||
|
if(!istype(T))
|
||||||
|
return
|
||||||
|
var/datum/gas_mixture/air = T.return_air()
|
||||||
|
if(!air)
|
||||||
|
return 0
|
||||||
|
return round((air.total_moles / air.group_multiplier) / 23.1, 0.01)
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/power/supermatter/proc/explode()
|
/obj/machinery/power/supermatter/proc/explode()
|
||||||
message_admins("Supermatter exploded at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
message_admins("Supermatter exploded at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||||
log_game("SUPERMATTER([x],[y],[z]) Exploded. Power:[power], Oxygen:[oxygen], Damage:[damage], Integrity:[get_integrity()]")
|
log_game("SUPERMATTER([x],[y],[z]) Exploded. Power:[power], Oxygen:[oxygen], Damage:[damage], Integrity:[get_integrity()]")
|
||||||
|
|||||||
Reference in New Issue
Block a user