Merge SSnanoui & Nanomanager (#2427)

Merges the NanoUI subsystem with Nanomanager, as well as cleans up some nanomanager code.
Most of the files in this commit are changed as a result of removing the nanomanager global in favor of the SSnanoui global.
This commit is contained in:
Lohikar
2017-05-23 16:33:00 +03:00
committed by skull132
parent 4d6d382967
commit 3be27b9efa
110 changed files with 449 additions and 497 deletions
+1 -1
View File
@@ -243,7 +243,7 @@
medicalActive1 = null
medicalActive2 = null
medical_cannotfind = 0
nanomanager.update_uis(src)
SSnanoui.update_uis(src)
usr << "<span class='notice'>You reset your record-viewing software.</span>"
/mob/living/silicon/pai/cancel_camera()
@@ -75,7 +75,7 @@ var/list/pai_emotions = list(
data["emotions"] = emotions
data["current_emotion"] = card.current_emotion
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "pai_interface.tmpl", "pAI Software Interface", 450, 600)
ui.set_initial_data(data)
@@ -36,7 +36,7 @@
data["prime"] = user.pai_law0
data["supplemental"] = user.pai_laws
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
if(!ui)
// Don't copy-paste this unless you're making a pAI software module!
ui = new(user, user, id, "pai_directives.tmpl", "pAI Directives", 450, 600)
@@ -101,7 +101,7 @@
data["channels"] = channels
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
if(!ui)
ui = new(user, user, id, "pai_radio.tmpl", "Radio Configuration", 300, 150)
ui.set_initial_data(data)
@@ -127,7 +127,7 @@
// This is dumb, but NanoUI breaks if it has no data to send
data["manifest"] = list("__json_cache" = ManifestJSON)
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
if(!ui)
// Don't copy-paste this unless you're making a pAI software module!
ui = new(user, user, id, "pai_manifest.tmpl", "Crew Manifest", 450, 600)
@@ -177,7 +177,7 @@
data["messages"] = messages
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
if(!ui)
// Don't copy-paste this unless you're making a pAI software module!
ui = new(user, user, id, "pai_messenger.tmpl", "Digital Messenger", 450, 600)
@@ -235,7 +235,7 @@
data["medical"] = M ? M.fields : null
data["could_not_find"] = user.medical_cannotfind
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
if(!ui)
// Don't copy-paste this unless you're making a pAI software module!
ui = new(user, user, id, "pai_medrecords.tmpl", "Medical Records", 450, 600)
@@ -289,7 +289,7 @@
data["security"] = S ? S.fields : null
data["could_not_find"] = user.security_cannotfind
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
if(!ui)
// Don't copy-paste this unless you're making a pAI software module!
ui = new(user, user, id, "pai_secrecords.tmpl", "Security Records", 450, 600)
@@ -339,7 +339,7 @@
data["progress_b"] = user.hackprogress % 10
data["aborted"] = user.hack_aborted
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
if(!ui)
// Don't copy-paste this unless you're making a pAI software module!
ui = new(user, user, id, "pai_doorjack.tmpl", "Door Jack", 300, 150)
@@ -430,7 +430,7 @@
gases[++gases.len] = gas
data["gas"] = gases
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
if(!ui)
// Don't copy-paste this unless you're making a pAI software module!
ui = new(user, user, id, "pai_atmosphere.tmpl", "Atmosphere Sensor", 350, 300)
@@ -495,7 +495,7 @@
data["frequency"] = format_frequency(user.sradio.frequency)
data["code"] = user.sradio.code
ui = nanomanager.try_update_ui(user, user, id, ui, data, force_open)
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
if(!ui)
// Don't copy-paste this unless you're making a pAI software module!
ui = new(user, user, id, "pai_signaller.tmpl", "Signaller", 320, 150)
+1 -1
View File
@@ -1,5 +1,5 @@
/mob/Logout()
nanomanager.user_logout(src) // this is used to clean up (remove) this user's Nano UIs
SSnanoui.user_logout(src) // this is used to clean up (remove) this user's Nano UIs
player_list -= src
log_access("Logout: [key_name(src)]",ckey=key_name(src))
if(admin_datums[src.ckey])