mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 15:39:57 +01:00
Suit Sensors Changes (#2121)
* Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Delete Thumbs.db * Update crew.dm * Update layout_default.tmpl * Delete Aurora-3.png * Delete Aurora-4.png * Delete Aurora-6.png * Add files via upload * Add files via upload
This commit is contained in:
@@ -3,10 +3,7 @@
|
||||
|
||||
/datum/nano_module/crew_monitor/Topic(href, href_list)
|
||||
if(..()) return 1
|
||||
var/turf/T = get_turf(nano_host()) // TODO: Allow setting any config.contact_levels from the interface.
|
||||
if (!T || !(T.z in config.player_levels))
|
||||
usr << "<span class='warning'>Unable to establish a connection</span>: You're too far away from the station!"
|
||||
return 0
|
||||
|
||||
if(href_list["track"])
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
@@ -17,15 +14,20 @@
|
||||
|
||||
/datum/nano_module/crew_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
|
||||
var/list/data = host.initial_data()
|
||||
var/turf/T = get_turf(nano_host())
|
||||
|
||||
data["isAI"] = isAI(user)
|
||||
data["crewmembers"] = crew_repository.health_data(T)
|
||||
// This checks if TCOMS is online using the test proc. If it isn't, the suit sensor data isn't loaded.
|
||||
var/datum/signal/signal
|
||||
signal = telecomms_process_active()
|
||||
if(signal.data["done"] == 1)
|
||||
data["isAI"] = isAI(user)
|
||||
data["crewmembers"] = list()
|
||||
for(var/z_level in map_levels)
|
||||
data["crewmembers"] += crew_repository.health_data(z_level)
|
||||
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "crew_monitor.tmpl", "Crew Monitoring Computer", 900, 800, state = state)
|
||||
|
||||
// adding a template with the key "mapContent" enables the map ui functionality
|
||||
ui.add_template("mapContent", "crew_monitor_map_content.tmpl")
|
||||
// adding a template with the key "mapHeader" replaces the map header content
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
world.log << "NanoMapGen: <B>[count] tiles done</B>"
|
||||
sleep(1)
|
||||
|
||||
var/mapFilename = "nanomap_z[currentZ]-new.png"
|
||||
var/mapFilename = "new_Aurora[currentZ]"
|
||||
|
||||
world.log << "NanoMapGen: <B>sending [mapFilename] to client</B>"
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ nanoui is used to open and update nano browser uis
|
||||
// show the map ui, this is used by the default layout
|
||||
var/show_map = 0
|
||||
// the map z level to display
|
||||
var/map_z_level = 1
|
||||
var/map_z_level = 3
|
||||
// initial data, containing the full data structure, must be sent to the ui (the data structure cannot be extended later on)
|
||||
var/list/initial_data[0]
|
||||
// set to 1 to update the ui automatically every master_controller tick
|
||||
@@ -185,7 +185,9 @@ nanoui is used to open and update nano browser uis
|
||||
"autoUpdateLayout" = auto_update_layout,
|
||||
"autoUpdateContent" = auto_update_content,
|
||||
"showMap" = show_map,
|
||||
"mapName" = "Aurora",
|
||||
"mapZLevel" = map_z_level,
|
||||
"mapZLevels" = map_levels,
|
||||
"user" = list("name" = user.name)
|
||||
)
|
||||
return config_data
|
||||
@@ -488,8 +490,12 @@ nanoui is used to open and update nano browser uis
|
||||
map_update = 1
|
||||
|
||||
if(href_list["mapZLevel"])
|
||||
set_map_z_level(text2num(href_list["mapZLevel"]))
|
||||
map_update = 1
|
||||
var/map_z = (text2num(href_list["mapZLevel"]))
|
||||
if(map_z in map_levels)
|
||||
set_map_z_level(map_z)
|
||||
map_update = 1
|
||||
else
|
||||
return
|
||||
|
||||
if ((src_object && src_object.Topic(href, href_list, state)) || map_update)
|
||||
nanomanager.update_uis(src_object) // update all UIs attached to src_object
|
||||
|
||||
Reference in New Issue
Block a user