[READY]Makes a bunch of processes subsystems instead (#5814

* Converts various New() definitions to Initialization()
* Adds absolute pathing
This commit is contained in:
kevinz000
2019-01-15 22:58:06 -08:00
committed by Atermonera
parent a5d0dd338c
commit 46c79c7d3e
174 changed files with 1352 additions and 1639 deletions
+8 -8
View File
@@ -467,7 +467,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui_tick++
var/datum/nanoui/old_ui = GLOB.nanomanager.get_open_ui(user, src, "main")
var/datum/nanoui/old_ui = SSnanoui.get_open_ui(user, src, "main")
var/auto_update = 1
if(mode in no_auto_update)
auto_update = 0
@@ -647,7 +647,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
nanoUI = data
// update the ui if it exists, returns null if no ui is passed/found
ui = GLOB.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)
// the ui does not exist, so we'll create a new() one
@@ -685,7 +685,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
..()
var/mob/user = usr
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(user, src, "main")
var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main")
var/mob/living/U = usr
//Looking for master was kind of pointless since PDAs don't appear to have one.
//if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
@@ -1130,7 +1130,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
P.new_message_from_pda(src, t)
GLOB.nanomanager.update_user_uis(U, src) // Update the sending user's PDA UI so that they can see the new message
SSnanoui.update_user_uis(U, src) // Update the sending user's PDA UI so that they can see the new message
else
to_chat(U, "<span class='notice'>ERROR: Messaging server is not responding.</span>")
@@ -1150,7 +1150,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(L)
if(reception_message)
L << reception_message
GLOB.nanomanager.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message
SSnanoui.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message
/obj/item/device/pda/proc/new_news(var/message)
new_info(news_silent, newstone, news_silent ? "" : "\icon[src] <b>[message]</b>")
@@ -1196,7 +1196,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(can_use(usr))
mode = 0
GLOB.nanomanager.update_uis(src)
SSnanoui.update_uis(src)
to_chat(usr, "<span class='notice'>You press the reset button on \the [src].</span>")
else
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
@@ -1297,7 +1297,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
user.drop_item()
cartridge.loc = src
to_chat(usr, "<span class='notice'>You insert [cartridge] into [src].</span>")
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
SSnanoui.update_uis(src) // update all UIs attached to src
if(cartridge.radio)
cartridge.radio.hostpda = src
@@ -1325,7 +1325,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
C.loc = src
pai = C
to_chat(user, "<span class='notice'>You slot \the [C] into \the [src].</span>")
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
SSnanoui.update_uis(src) // update all UIs attached to src
else if(istype(C, /obj/item/weapon/pen))
var/obj/item/weapon/pen/O = locate() in src
if(O)
+1 -1
View File
@@ -43,7 +43,7 @@
data["laws"] = laws
data["has_laws"] = laws.len
ui = GLOB.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, "aicard.tmpl", "[name]", 600, 400, state = state)
ui.set_initial_data(data)
@@ -125,7 +125,7 @@
// The value element is the actual data, and can take any form necessary for the template
// update the ui if it exists, returns null if no ui is passed/found
ui = GLOB.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)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
@@ -261,7 +261,7 @@
notehtml = note
if(href_list["switch_template"])
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(usr, src, "main")
var/datum/nanoui/ui = SSnanoui.get_open_ui(usr, src, "main")
if(ui)
ui.add_template("Body", href_list["switch_template"])
@@ -276,5 +276,5 @@
if(href_list["cartridge_topic"] && cartridge) // Has to have a cartridge to perform these functions
cartridge.Topic(href, href_list)
GLOB.nanomanager.update_uis(src)
SSnanoui.update_uis(src)
add_fingerprint(usr)
@@ -234,7 +234,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
cartridge.forceMove(src)
to_chat(usr, "<span class='notice'>You slot \the [cartridge] into \the [src].</span>")
modules[++modules.len] = list("module" = "External Device", "icon" = "external64", "number" = EXTRTAB)
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
SSnanoui.update_uis(src) // update all UIs attached to src
return
// Proc: attack_self()
@@ -119,7 +119,7 @@ var/global/list/default_medbay_channels = list(
if(syndie)
data["useSyndMode"] = 1
ui = GLOB.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, "radio_basic.tmpl", "[name]", 400, 430)
ui.set_initial_data(data)
@@ -230,7 +230,7 @@ var/global/list/default_medbay_channels = list(
return 1
if(.)
GLOB.nanomanager.update_uis(src)
SSnanoui.update_uis(src)
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) //BS12 EDIT
var/datum/radio_frequency/connection = null
@@ -714,7 +714,7 @@ var/global/list/default_medbay_channels = list(
. = 1
if(.)
GLOB.nanomanager.update_uis(src)
SSnanoui.update_uis(src)
/obj/item/device/radio/borg/interact(mob/user as mob)
if(!on)
@@ -743,7 +743,7 @@ var/global/list/default_medbay_channels = list(
data["has_subspace"] = 1
data["subspace"] = subspace_transmission
ui = GLOB.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, "radio_basic.tmpl", "[name]", 400, 430)
ui.set_initial_data(data)
@@ -37,7 +37,7 @@
log_game("[key_name_admin(user)] attached both tanks to a transfer valve.")
update_icon()
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
SSnanoui.update_uis(src) // update all UIs attached to src
//TODO: Have this take an assemblyholder
else if(isassembly(item))
var/obj/item/device/assembly/A = item
@@ -58,7 +58,7 @@
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
attacher = user
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
SSnanoui.update_uis(src) // update all UIs attached to src
return
@@ -81,7 +81,7 @@
data["valveOpen"] = valve_open ? 1 : 0
// update the ui if it exists, returns null if no ui is passed/found
ui = GLOB.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)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
+3 -3
View File
@@ -72,7 +72,7 @@
discount_amount = pick(90;0.9, 80;0.8, 70;0.7, 60;0.6, 50;0.5, 40;0.4, 30;0.3, 20;0.2, 10;0.1)
next_offer_time = world.time + offer_time
update_nano_data()
GLOB.nanomanager.update_uis(src)
SSnanoui.update_uis(src)
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
/obj/item/device/uplink/hidden/proc/toggle()
@@ -110,7 +110,7 @@
data += nanoui_data
// update the ui if it exists, returns null if no ui is passed/found
ui = GLOB.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) // No auto-refresh
ui = new(user, src, ui_key, "uplink.tmpl", title, 450, 600, state = inventory_state)
data["menu"] = 0
@@ -138,7 +138,7 @@
UI.buy(src, usr)
else if(href_list["lock"])
toggle()
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(user, src, "main")
var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main")
ui.close()
else if(href_list["return"])
nanoui_menu = round(nanoui_menu/10)