[MIRROR] Ghosts can open the NT CIMS TGUI by clicking the SM Crystal. (#6140)

* Ghosts can open the NT CIMS TGUI by clicking the SM Crystal. (#59475)

* Ghosts can open the NT CIMS TGUI by clicking the SM Crystal.

Co-authored-by: vincentiusvin <54709710+vincentiusvin@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-06-05 06:56:15 +02:00
committed by GitHub
parent 7b25af7113
commit 8438e129c0
4 changed files with 248 additions and 206 deletions
@@ -114,7 +114,7 @@
if(computer.active_program == src)
computer.alert_call(src, "Crystal delamination in progress!")
/datum/computer_file/program/supermatter_monitor/ui_data()
/datum/computer_file/program/supermatter_monitor/ui_data(mob/user)
var/list/data = get_header_data()
if(istype(active))
@@ -128,30 +128,9 @@
active = null
return
data["active"] = TRUE
data["SM_integrity"] = active.get_integrity_percent()
data["SM_power"] = active.power
data["SM_ambienttemp"] = air.temperature
data["SM_ambientpressure"] = air.return_pressure()
data["SM_bad_moles_amount"] = MOLE_PENALTY_THRESHOLD / active.gasefficency
data["SM_moles"] = 0
var/list/gasdata = list()
if(air.total_moles())
data["SM_moles"] = air.total_moles()
for(var/gasid in air.gases)
gasdata.Add(list(list(
"name"= air.gases[gasid][GAS_META][META_GAS_NAME],
"amount" = round(100*air.gases[gasid][MOLES]/air.total_moles(),0.01))))
else
for(var/gasid in air.gases)
gasdata.Add(list(list(
"name"= air.gases[gasid][GAS_META][META_GAS_NAME],
"amount" = 0)))
data["gases"] = gasdata
data += active.ui_data()
data["singlecrystal"] = FALSE
else
var/list/SMS = list()
for(var/obj/machinery/power/supermatter_crystal/S in supermatters)