fixes - radio, broken - crewmanifest, gastank controler
This commit is contained in:
@@ -107,19 +107,15 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/radio/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
|
||||
. = ..()
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
/obj/item/radio/ui_state(mob/user)
|
||||
return GLOB.inventory_state
|
||||
|
||||
/obj/item/radio/ui_interact(mob/user, datum/tgui/ui, datum/ui_state/state)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
var/ui_width = 360
|
||||
var/ui_height = 106
|
||||
if(subspace_transmission)
|
||||
if(channels.len > 0)
|
||||
ui_height += 6 + channels.len * 21
|
||||
else
|
||||
ui_height += 24
|
||||
ui = new(user, src, ui_key, "Radio", name, ui_width, ui_height, master_ui, state)
|
||||
ui = new(user, src, "Radio", name)
|
||||
if(state)
|
||||
ui.set_state(state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/radio/ui_data(mob/user)
|
||||
|
||||
@@ -13,16 +13,16 @@
|
||||
var/turf/T = get_turf(ui_host())
|
||||
if(T)
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
var/list/env_gases = environment.gases
|
||||
var/list/env_gases = environment.get_gases()
|
||||
var/pressure = environment.return_pressure()
|
||||
var/total_moles = environment.total_moles()
|
||||
data["AirPressure"] = round(pressure,0.1)
|
||||
data["AirTemp"] = round(environment.temperature-T0C)
|
||||
data["AirTemp"] = round(environment.return_temperature()-T0C)
|
||||
if (total_moles)
|
||||
for(var/id in env_gases)
|
||||
var/gas_level = env_gases[id][MOLES]/total_moles
|
||||
var/gas_level = environment.get_moles(id)/total_moles
|
||||
if(gas_level > 0)
|
||||
airlist += list(list("name" = "[env_gases[id][GAS_META][META_GAS_NAME]]", "percentage" = round(gas_level*100, 0.01)))
|
||||
airlist += list(list("name" = "[GLOB.meta_gas_names[id]]", "percentage" = round(gas_level*100, 0.01)))
|
||||
data["AirData"] = airlist
|
||||
return data
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 88 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 31 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 7.4 KiB |
@@ -2736,6 +2736,7 @@
|
||||
#include "code\modules\modular_computers\file_system\programs\airestorer.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\alarm.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\arcade.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\atmosscan.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\card.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\cargobounty.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\configurator.dm"
|
||||
|
||||
Reference in New Issue
Block a user