mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-30 07:28:53 +01:00
Merge pull request #4910 from Heroman3003/reverting-it-all-not-really
Un-kevinzes nanoui and chemistry subsystems back into processes for greater good
This commit is contained in:
@@ -200,7 +200,7 @@
|
||||
"moles" = round(air2.gas[output_gas], 0.01))
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "algae_farm_vr.tmpl", "Algae Farm Control Panel", 500, 600)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
)
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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
|
||||
|
||||
@@ -140,7 +140,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
)
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
data = build_uidata()
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "omni_filter.tmpl", "Omni Filter Control", 330, 330)
|
||||
@@ -181,7 +181,7 @@
|
||||
switch_filter(dir_flag(href_list["dir"]), mode_return_switch(new_filter))
|
||||
|
||||
update_icon()
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/omni/atmos_filter/proc/mode_return_switch(var/mode)
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
data = build_uidata()
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "omni_mixer.tmpl", "Omni Mixer Control", 360, 330)
|
||||
@@ -200,7 +200,7 @@
|
||||
con_lock(dir_flag(href_list["dir"]))
|
||||
|
||||
update_icon()
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/omni/mixer/proc/switch_mode(var/port = NORTH, var/mode = ATM_NONE)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
data["gasTemperatureClass"] = temp_class
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
data["gasTemperatureClass"] = temp_class
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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
|
||||
|
||||
@@ -13,6 +13,8 @@ var/global/list/dead_mob_list = list() //List of all dead mobs, including cli
|
||||
var/global/list/listening_objects = list() //List of all objects which care about receiving messages (communicators, radios, etc)
|
||||
|
||||
var/global/list/cable_list = list() //Index for all cables, so that powernets don't have to look through the entire world all the time
|
||||
var/global/list/chemical_reactions_list //list of all /datum/chemical_reaction datums. Used during chemical reactions
|
||||
var/global/list/chemical_reagents_list //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
|
||||
var/global/list/landmarks_list = list() //list of all landmarks created
|
||||
var/global/list/surgery_steps = list() //list of all surgery steps |BS12
|
||||
var/global/list/side_effects = list() //list of all medical sideeffects types by thier names |BS12
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
var/datum/controller/process/chemistry/chemistryProcess
|
||||
|
||||
/datum/controller/process/chemistry
|
||||
var/list/active_holders
|
||||
var/list/chemical_reactions
|
||||
var/list/chemical_reagents
|
||||
|
||||
/datum/controller/process/chemistry/setup()
|
||||
name = "chemistry"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
chemistryProcess = src
|
||||
active_holders = list()
|
||||
chemical_reactions = chemical_reactions_list
|
||||
chemical_reagents = chemical_reagents_list
|
||||
|
||||
/datum/controller/process/chemistry/statProcess()
|
||||
..()
|
||||
stat(null, "[active_holders.len] reagent holder\s")
|
||||
|
||||
/datum/controller/process/chemistry/doWork()
|
||||
for(last_object in active_holders)
|
||||
var/datum/reagents/holder = last_object
|
||||
if(!holder.process_reactions())
|
||||
active_holders -= holder
|
||||
SCHECK
|
||||
|
||||
/datum/controller/process/chemistry/proc/mark_for_update(var/datum/reagents/holder)
|
||||
if(holder in active_holders)
|
||||
return
|
||||
|
||||
//Process once, right away. If we still need to continue then add to the active_holders list and continue later
|
||||
if(holder.process_reactions())
|
||||
active_holders += holder
|
||||
@@ -0,0 +1,19 @@
|
||||
/datum/controller/process/nanoui/setup()
|
||||
name = "nanoui"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
|
||||
/datum/controller/process/nanoui/statProcess()
|
||||
..()
|
||||
stat(null, "[GLOB.nanomanager.processing_uis.len] UIs")
|
||||
|
||||
/datum/controller/process/nanoui/doWork()
|
||||
for(last_object in GLOB.nanomanager.processing_uis)
|
||||
var/datum/nanoui/NUI = last_object
|
||||
if(istype(NUI) && !QDELETED(NUI))
|
||||
try
|
||||
NUI.process()
|
||||
catch(var/exception/e)
|
||||
catchException(e, NUI)
|
||||
else
|
||||
catchBadType(NUI)
|
||||
GLOB.nanomanager.processing_uis -= NUI
|
||||
@@ -1,42 +0,0 @@
|
||||
SUBSYSTEM_DEF(nanoui)
|
||||
name = "NanoUI"
|
||||
wait = 20
|
||||
// a list of current open /nanoui UIs, grouped by src_object and ui_key
|
||||
var/list/open_uis = list()
|
||||
// a list of current open /nanoui UIs, not grouped, for use in processing
|
||||
var/list/processing_uis = list()
|
||||
// a list of asset filenames which are to be sent to the client on user logon
|
||||
var/list/asset_files = list()
|
||||
|
||||
/datum/controller/subsystem/nanoui/Initialize()
|
||||
var/list/nano_asset_dirs = list(\
|
||||
"nano/css/",\
|
||||
"nano/images/",\
|
||||
"nano/js/",\
|
||||
"nano/templates/"\
|
||||
)
|
||||
|
||||
var/list/filenames = null
|
||||
for (var/path in nano_asset_dirs)
|
||||
filenames = flist(path)
|
||||
for(var/filename in filenames)
|
||||
if(copytext(filename, length(filename)) != "/") // filenames which end in "/" are actually directories, which we want to ignore
|
||||
if(fexists(path + filename))
|
||||
asset_files.Add(fcopy_rsc(path + filename)) // add this file to asset_files for sending to clients when they connect
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/nanoui/Recover()
|
||||
if(SSnanoui.open_uis)
|
||||
open_uis |= SSnanoui.open_uis
|
||||
if(SSnanoui.processing_uis)
|
||||
processing_uis |= SSnanoui.processing_uis
|
||||
if(SSnanoui.asset_files)
|
||||
asset_files |= SSnanoui.asset_files
|
||||
|
||||
/datum/controller/subsystem/nanoui/stat_entry()
|
||||
return ..("[processing_uis.len] UIs")
|
||||
|
||||
/datum/controller/subsystem/nanoui/fire(resumed)
|
||||
for(var/thing in processing_uis)
|
||||
var/datum/nanoui/UI = thing
|
||||
UI.process()
|
||||
@@ -1,43 +0,0 @@
|
||||
PROCESSING_SUBSYSTEM_DEF(chemistry)
|
||||
name = "Chemistry"
|
||||
wait = 20
|
||||
flags = SS_BACKGROUND|SS_POST_FIRE_TIMING
|
||||
init_order = INIT_ORDER_CHEMISTRY
|
||||
var/list/chemical_reactions = list()
|
||||
var/list/chemical_reagents = list()
|
||||
|
||||
/datum/controller/subsystem/processing/chemistry/Recover()
|
||||
chemical_reactions = SSchemistry.chemical_reactions
|
||||
chemical_reagents = SSchemistry.chemical_reagents
|
||||
|
||||
/datum/controller/subsystem/processing/chemistry/Initialize()
|
||||
initialize_chemical_reactions()
|
||||
initialize_chemical_reagents()
|
||||
|
||||
//Chemical Reactions - Initialises all /datum/chemical_reaction into a list
|
||||
// It is filtered into multiple lists within a list.
|
||||
// For example:
|
||||
// chemical_reaction_list["phoron"] is a list of all reactions relating to phoron
|
||||
// Note that entries in the list are NOT duplicated. So if a reaction pertains to
|
||||
// more than one chemical it will still only appear in only one of the sublists.
|
||||
/datum/controller/subsystem/processing/chemistry/proc/initialize_chemical_reactions()
|
||||
var/paths = typesof(/datum/chemical_reaction) - /datum/chemical_reaction
|
||||
SSchemistry.chemical_reactions = list()
|
||||
|
||||
for(var/path in paths)
|
||||
var/datum/chemical_reaction/D = new path()
|
||||
if(D.required_reagents && D.required_reagents.len)
|
||||
var/reagent_id = D.required_reagents[1]
|
||||
if(!chemical_reactions[reagent_id])
|
||||
chemical_reactions[reagent_id] = list()
|
||||
chemical_reactions[reagent_id] += D
|
||||
|
||||
//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id
|
||||
/datum/controller/subsystem/processing/chemistry/proc/initialize_chemical_reagents()
|
||||
var/paths = typesof(/datum/reagent) - /datum/reagent
|
||||
chemical_reagents = list()
|
||||
for(var/path in paths)
|
||||
var/datum/reagent/D = new path()
|
||||
if(!D.name)
|
||||
continue
|
||||
chemical_reagents[D.id] = D
|
||||
@@ -102,6 +102,8 @@
|
||||
options["LEGACY: gas_data"] = gas_data
|
||||
options["LEGACY: plant_controller"] = plant_controller
|
||||
options["LEGACY: alarm_manager"] = alarm_manager
|
||||
options["LEGACY: nanomanager"] = GLOB.nanomanager
|
||||
options["LEGACY: chemistryProcess"] = chemistryProcess
|
||||
|
||||
var/pick = input(mob, "Choose a controller to debug/view variables of.", "VV controller:") as null|anything in options
|
||||
if(!pick)
|
||||
|
||||
@@ -31,5 +31,5 @@
|
||||
weakref = null // Clear this reference to ensure it's kept for as brief duration as possible.
|
||||
|
||||
tag = null
|
||||
SSnanoui.close_uis(src)
|
||||
GLOB.nanomanager.close_uis(src)
|
||||
return QDEL_HINT_QUEUE
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@
|
||||
current.verbs -= /datum/changeling/proc/EvolutionMenu
|
||||
current.mind = null
|
||||
|
||||
SSnanoui.user_transferred(current, new_character) // transfer active NanoUI instances to new user
|
||||
GLOB.nanomanager.user_transferred(current, new_character) // transfer active NanoUI instances to new user
|
||||
if(new_character.mind) //remove any mind currently in our new body's mind variable
|
||||
new_character.mind.current = null
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ var/const/WIRE_TRANSMIT = 4
|
||||
|
||||
if(WIRE_TRANSMIT)
|
||||
R.broadcasting = !R.broadcasting && !IsIndexCut(WIRE_SIGNAL)
|
||||
SSnanoui.update_uis(holder)
|
||||
GLOB.nanomanager.update_uis(holder)
|
||||
|
||||
/datum/wires/radio/UpdateCut(var/index, var/mended)
|
||||
var/obj/item/device/radio/R = holder
|
||||
@@ -38,4 +38,4 @@ var/const/WIRE_TRANSMIT = 4
|
||||
|
||||
if(WIRE_TRANSMIT)
|
||||
R.broadcasting = mended && !IsIndexCut(WIRE_SIGNAL)
|
||||
SSnanoui.update_uis(holder)
|
||||
GLOB.nanomanager.update_uis(holder)
|
||||
|
||||
@@ -270,7 +270,7 @@
|
||||
I.loc = src
|
||||
src.disk = I
|
||||
user << "You insert [I]."
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
return
|
||||
else
|
||||
..()
|
||||
@@ -428,7 +428,7 @@
|
||||
data["beakerVolume"] += R.volume
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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
|
||||
@@ -465,7 +465,7 @@
|
||||
irradiating = src.radiation_duration
|
||||
var/lock_state = src.connected.locked
|
||||
src.connected.locked = 1//lock it
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
|
||||
sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
|
||||
|
||||
@@ -566,7 +566,7 @@
|
||||
irradiating = src.radiation_duration
|
||||
var/lock_state = src.connected.locked
|
||||
src.connected.locked = 1//lock it
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
|
||||
sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
|
||||
|
||||
@@ -624,7 +624,7 @@
|
||||
irradiating = src.radiation_duration
|
||||
var/lock_state = src.connected.locked
|
||||
src.connected.locked = 1 //lock it
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
|
||||
sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
|
||||
|
||||
@@ -751,7 +751,7 @@
|
||||
irradiating = 2
|
||||
var/lock_state = src.connected.locked
|
||||
src.connected.locked = 1//lock it
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
|
||||
sleep(10*2) // sleep for 2 seconds
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
break
|
||||
data["stasis"] = stasis_level_name
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "sleeper.tmpl", "Sleeper UI", 600, 600, state = state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
occupantData = attempt_vr(scanner,"get_occupant_data_vr",list(occupantData,H)) //VOREStation Insert
|
||||
data["occupant"] = occupantData
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "adv_med.tmpl", "Body Scanner", 690, 800)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -497,7 +497,7 @@
|
||||
if(!(locked && !remote_connection) || remote_access || issilicon(user))
|
||||
populate_controls(data)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "air_alarm.tmpl", name, 325, 625, master_ui = master_ui, state = state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -117,7 +117,7 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
|
||||
data["sensors"] = sensors_ui
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmo_control.tmpl", name, 525, 600)
|
||||
ui.set_initial_data(data)
|
||||
@@ -174,7 +174,7 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
data["input_flow_setting"] = round(input_flow_setting, 0.1)
|
||||
data["pressure_setting"] = pressure_setting
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmo_control.tmpl", name, 660, 500)
|
||||
ui.set_initial_data(data)
|
||||
@@ -284,7 +284,7 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
data["input_flow_setting"] = round(input_flow_setting, 0.1)
|
||||
data["pressure_setting"] = pressure_setting
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmo_control.tmpl", name, 650, 500)
|
||||
ui.set_initial_data(data)
|
||||
@@ -416,7 +416,7 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
else
|
||||
data["device_info"] = null
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmo_control.tmpl", name, 650, 500)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -260,7 +260,7 @@ update_flag
|
||||
|
||||
..()
|
||||
|
||||
SSnanoui.update_uis(src) // Update all NanoUIs attached to src
|
||||
GLOB.nanomanager.update_uis(src) // Update all NanoUIs attached to src
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
@@ -288,7 +288,7 @@ update_flag
|
||||
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure()))
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
if (holding)
|
||||
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0))
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "portpump.tmpl", "Portable Pump", 480, 410, state = physical_state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
if (holding)
|
||||
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0))
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "portscrubber.tmpl", "Portable Scrubber", 480, 400, state = physical_state)
|
||||
ui.set_initial_data(data)
|
||||
@@ -195,7 +195,7 @@
|
||||
update_use_power(new_use_power)
|
||||
if(!on)
|
||||
return
|
||||
|
||||
|
||||
var/power_draw = -1
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
data["table"] = table
|
||||
data["victim"] = victim_ui
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "operating.tmpl", src.name, 380, 400)
|
||||
ui.set_initial_data(data)
|
||||
@@ -69,4 +69,4 @@
|
||||
usr.set_machine(src)
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
@@ -140,7 +140,7 @@
|
||||
data["enemyHP"] = enemy_hp
|
||||
data["gameOver"] = gameover
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "arcade_battle.tmpl", src.name, 400, 300)
|
||||
ui.set_initial_data(data)
|
||||
@@ -202,7 +202,7 @@
|
||||
emagged = 0
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/arcade/battle/proc/arcade_action()
|
||||
|
||||
@@ -37,7 +37,7 @@ var/global/list/minor_air_alarms = list()
|
||||
data["priority_alarms"] = major_alarms
|
||||
data["minor_alarms"] = minor_alarms
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_alert.tmpl", src.name, 500, 500)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
switch_to_camera(user, current_camera)
|
||||
data["map_levels"] = using_map.get_map_levels(src.z)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "sec_camera.tmpl", "Camera Console", 900, 800)
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
/obj/machinery/computer/security/process()
|
||||
if(cache_id != camera_repository.camera_cache_id)
|
||||
cache_id = camera_repository.camera_cache_id
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/computer/security/proc/can_access_camera(var/obj/machinery/camera/C)
|
||||
var/list/shared_networks = src.network & C.network
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
id_card.forceMove(src)
|
||||
modify = id_card
|
||||
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/card/attack_ai(var/mob/user as mob)
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
data["regions"] = regions
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "identification_computer.tmpl", src.name, 600, 700)
|
||||
ui.set_initial_data(data)
|
||||
@@ -235,7 +235,7 @@
|
||||
modify.registered_name = temp_name
|
||||
else
|
||||
src.visible_message("<span class='notice'>[src] buzzes rudely.</span>")
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
if ("account")
|
||||
if (is_authenticated())
|
||||
@@ -243,7 +243,7 @@
|
||||
if ((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
|
||||
var/account_num = text2num(href_list["account"])
|
||||
modify.associated_account_number = account_num
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
if ("mode")
|
||||
mode = text2num(href_list["mode_target"])
|
||||
@@ -253,7 +253,7 @@
|
||||
printing = 1
|
||||
spawn(50)
|
||||
printing = null
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
var/obj/item/weapon/paper/P = new(loc)
|
||||
if (mode)
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
data["diskette"] = diskette
|
||||
data["temp"] = temp
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "cloning.tmpl", src.name, 400, 450)
|
||||
ui.set_initial_data(data)
|
||||
@@ -284,7 +284,7 @@
|
||||
temp = ""
|
||||
scantemp = ""
|
||||
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/machinery/computer/cloning/proc/scan_mob(mob/living/carbon/human/subject as mob)
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
if(!giver && user.unEquip(I))
|
||||
I.forceMove(src)
|
||||
giver = I
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
else if(giver)
|
||||
user << "<span class='warning'>There is already ID card inside.</span>"
|
||||
return
|
||||
@@ -150,7 +150,7 @@
|
||||
data["log"] = internal_log
|
||||
data["uid"] = uid
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "guest_pass.tmpl", src.name, 400, 520)
|
||||
ui.set_initial_data(data)
|
||||
@@ -242,4 +242,4 @@
|
||||
usr << "<span class='warning'>Cannot issue pass without issuing ID.</span>"
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
@@ -19,7 +19,7 @@
|
||||
data["is_ai"] = issilicon(user)
|
||||
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "robot_control.tmpl", "Robotic Control Console", 400, 500)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
data["contraband"] = can_order_contraband || (authorization & SUP_CONTRABAND)
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
if(!card && user.unEquip(I))
|
||||
I.forceMove(src)
|
||||
card = I
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
update_icon()
|
||||
else if(card)
|
||||
to_chat(user, "<span class='warning'>There is already ID card inside.</span>")
|
||||
@@ -88,7 +88,7 @@
|
||||
// if(job && job.timeoff_factor < 0) // Currently are Off Duty, so gotta lookup what on-duty jobs are open
|
||||
// data["job_choices"] = getOpenOnDutyJobs(user, job.department)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "timeclock_vr.tmpl", capitalize(src.name), 500, 520)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
if(vendmode == 1 && I)
|
||||
scan_id(I, W)
|
||||
vendmode = 0
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
if(vendmode == 2 && I)
|
||||
if(reimburse_id(I, W))
|
||||
vendmode = 0
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
if(vendmode == 0)
|
||||
if(istype(W, /obj/item/device/laptop))
|
||||
var/obj/item/device/laptop/L = W
|
||||
@@ -48,7 +48,7 @@
|
||||
L.loc = src
|
||||
vendmode = 2
|
||||
to_chat(user, "<span class='notice'>You slot your [L.name] into \The [src.name]</span>")
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
data["power"] = power
|
||||
data["total"] = total()
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "laptop_vendor.tmpl", src.name, 480, 425)
|
||||
ui.set_initial_data(data)
|
||||
@@ -136,7 +136,7 @@
|
||||
vendmode = 0
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/lapvend/proc/vend()
|
||||
if(cardreader > 0)
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
data["beakerVolume"] += R.volume
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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
|
||||
@@ -205,7 +205,7 @@
|
||||
var/mob/M = grab.affecting
|
||||
qdel(grab)
|
||||
put_mob(M)
|
||||
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/MouseDrop_T(var/mob/target, var/mob/user) //Allows borgs to put people into cryo without external assistance
|
||||
|
||||
@@ -746,7 +746,7 @@ About the new airlock wires panel:
|
||||
|
||||
data["commands"] = commands
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "door_control.tmpl", "Door Controls", 450, 350, state = state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"secure" = program.memory["secure"]
|
||||
)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "advanced_airlock_console.tmpl", name, 470, 290)
|
||||
@@ -89,7 +89,7 @@
|
||||
"processing" = program.memory["processing"],
|
||||
)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "simple_airlock_console.tmpl", name, 470, 290)
|
||||
@@ -153,7 +153,7 @@
|
||||
"processing" = program.memory["processing"]
|
||||
)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "door_access_console.tmpl", name, 330, 220)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"override_enabled" = docking_program.override_enabled,
|
||||
)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "docking_airlock_console.tmpl", name, 470, 290)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"airlocks" = airlocks,
|
||||
)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "multi_docking_console.tmpl", name, 470, 290)
|
||||
@@ -73,7 +73,7 @@
|
||||
"override_enabled" = airlock_program.override_enabled,
|
||||
)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "docking_airlock_console.tmpl", name, 470, 290)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"door_lock" = docking_program.memory["door_status"]["lock"],
|
||||
)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "simple_docking_console.tmpl", name, 470, 290)
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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
|
||||
@@ -167,7 +167,7 @@
|
||||
log_game(msg)
|
||||
|
||||
update_icon()
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
// Proc: get_exonet_node()
|
||||
|
||||
@@ -265,7 +265,7 @@
|
||||
data["tracks"] = nano_tracks
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "jukebox.tmpl", title, 450, 600)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
recipies_ui[++recipies_ui.len] = list("name" = R.name, "type" = "[T]")
|
||||
data["recipies"] = recipies_ui
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "partslathe.tmpl", "Parts Lathe UI", 500, 450)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
settings[++settings.len] = list("category" = "Neutralize All Entities", "setting" = "check_all", "value" = check_all)
|
||||
data["settings"] = settings
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -127,7 +127,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
data["msgVerified"] = msgVerified
|
||||
data["announceAuth"] = announceAuth
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "request_console.tmpl", "[department] Request Console", 520, 410)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
data["settings"] = settings
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
vend(currently_vending, usr)
|
||||
return
|
||||
else if(handled)
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
return // don't smack that machine with your 2 thalers
|
||||
|
||||
if(I || istype(W, /obj/item/weapon/spacecash))
|
||||
@@ -183,7 +183,7 @@
|
||||
if(panel_open)
|
||||
overlays += image(icon, "[initial(icon_state)]-panel")
|
||||
|
||||
SSnanoui.update_uis(src) // Speaker switch is on the main UI, not wires UI
|
||||
GLOB.nanomanager.update_uis(src) // Speaker switch is on the main UI, not wires UI
|
||||
return
|
||||
else if(istype(W, /obj/item/device/multitool) || W.is_wirecutter())
|
||||
if(panel_open)
|
||||
@@ -195,7 +195,7 @@
|
||||
coin = W
|
||||
categories |= CAT_COIN
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into \the [src].</span>")
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
return
|
||||
else if(W.is_wrench())
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
@@ -399,7 +399,7 @@
|
||||
else
|
||||
data["panel"] = 0
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "vending_machine.tmpl", name, 440, 600)
|
||||
ui.set_initial_data(data)
|
||||
@@ -459,7 +459,7 @@
|
||||
shut_up = !shut_up
|
||||
|
||||
add_fingerprint(usr)
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/vending/proc/vend(datum/stored_item/vending_product/R, mob/user)
|
||||
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
|
||||
@@ -470,7 +470,7 @@
|
||||
vend_ready = 0 //One thing at a time!!
|
||||
status_message = "Vending..."
|
||||
status_error = 0
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
if(R.category & CAT_COIN)
|
||||
if(!coin)
|
||||
@@ -512,7 +512,7 @@
|
||||
status_error = 0
|
||||
vend_ready = 1
|
||||
currently_vending = null
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -568,7 +568,7 @@
|
||||
if(has_logs)
|
||||
do_logging(R, user)
|
||||
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/vending/process()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
if(current)
|
||||
data["builtperc"] = round((progress / current.time) * 100)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "mechfab.tmpl", "Exosuit Fabricator UI", 800, 600)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
if(current)
|
||||
data["builtperc"] = round((progress / current.time) * 100)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "mechfab.tmpl", "Prosthetics Fab UI", 800, 600)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -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 = SSnanoui.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/old_ui = GLOB.nanomanager.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 = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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 = SSnanoui.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.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)
|
||||
SSnanoui.update_user_uis(U, src) // Update the sending user's PDA UI so that they can see the new message
|
||||
GLOB.nanomanager.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
|
||||
SSnanoui.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message
|
||||
GLOB.nanomanager.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
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.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>")
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
GLOB.nanomanager.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>")
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
GLOB.nanomanager.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)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
data["laws"] = laws
|
||||
data["has_laws"] = laws.len
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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 = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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 = SSnanoui.get_open_ui(usr, src, "main")
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.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)
|
||||
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.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)
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
|
||||
return
|
||||
|
||||
// Proc: attack_self()
|
||||
|
||||
@@ -121,7 +121,7 @@ var/global/list/default_medbay_channels = list(
|
||||
if(syndie)
|
||||
data["useSyndMode"] = 1
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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)
|
||||
@@ -232,7 +232,7 @@ var/global/list/default_medbay_channels = list(
|
||||
return 1
|
||||
|
||||
if(.)
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) //BS12 EDIT
|
||||
var/datum/radio_frequency/connection = null
|
||||
@@ -724,7 +724,7 @@ var/global/list/default_medbay_channels = list(
|
||||
. = 1
|
||||
|
||||
if(.)
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
/obj/item/device/radio/borg/interact(mob/user as mob)
|
||||
if(!on)
|
||||
@@ -753,7 +753,7 @@ var/global/list/default_medbay_channels = list(
|
||||
data["has_subspace"] = 1
|
||||
data["subspace"] = subspace_transmission
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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()
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
GLOB.nanomanager.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
|
||||
SSnanoui.update_uis(src) // update all UIs attached to src
|
||||
GLOB.nanomanager.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 = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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
|
||||
|
||||
@@ -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()
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.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 = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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 = SSnanoui.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(user, src, "main")
|
||||
ui.close()
|
||||
else if(href_list["return"])
|
||||
nanoui_menu = round(nanoui_menu/10)
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
data["electronic_warfare"] = electronic_warfare
|
||||
data["entries"] = entries
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "agent_id_card.tmpl", "Fake ID", 600, 400)
|
||||
ui.set_initial_data(data)
|
||||
@@ -185,7 +185,7 @@
|
||||
. = 1
|
||||
|
||||
// Always update the UI, or buttons will spin indefinitely
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
/var/global/list/id_card_states
|
||||
/proc/id_card_states()
|
||||
|
||||
@@ -263,7 +263,7 @@ var/list/global/tank_gauge_cache = list()
|
||||
data["maskConnected"] = 1
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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
|
||||
|
||||
@@ -102,7 +102,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
|
||||
data["replacer"] = myreplacer ? capitalize(myreplacer.name) : null
|
||||
data["signs"] = signs ? "[signs] sign\s" : null
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "janitorcart.tmpl", "Janitorial cart", 240, 160)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -18,6 +18,8 @@ var/global/datum/global_init/init = new ()
|
||||
makeDatumRefLists()
|
||||
load_configuration()
|
||||
|
||||
initialize_chemical_reagents()
|
||||
initialize_chemical_reactions()
|
||||
initialize_integrated_circuits_list()
|
||||
|
||||
qdel(src) //we're done
|
||||
|
||||
@@ -448,7 +448,7 @@
|
||||
usr << "This can only be done on mobs with clients"
|
||||
return
|
||||
|
||||
SSnanoui.send_resources(H.client)
|
||||
GLOB.nanomanager.send_resources(H.client)
|
||||
|
||||
usr << "Resource files sent"
|
||||
H << "Your NanoUI Resource files have been refreshed"
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
log_client_to_db()
|
||||
|
||||
send_resources()
|
||||
SSnanoui.send_resources(src)
|
||||
GLOB.nanomanager.send_resources(src)
|
||||
|
||||
if(!void)
|
||||
void = new()
|
||||
@@ -166,7 +166,7 @@
|
||||
src.changes()
|
||||
|
||||
hook_vr("client_new",list(src)) //VOREStation Code
|
||||
|
||||
|
||||
if(config.paranoia_logging)
|
||||
if(isnum(player_age) && player_age == 0)
|
||||
log_and_message_admins("PARANOIA: [key_name(src)] has connected here for the first time.")
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
/obj/item/clothing/glasses/omnihud/dropped()
|
||||
if(arscreen)
|
||||
SSnanoui.close_uis(src)
|
||||
GLOB.nanomanager.close_uis(src)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/glasses/omnihud/emp_act(var/severity)
|
||||
|
||||
@@ -616,7 +616,7 @@
|
||||
if(module_list.len)
|
||||
data["modules"] = module_list
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 480, 550, state = nano_state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
data["bloodsamp_desc"] = (bloodsamp ? (bloodsamp.desc ? bloodsamp.desc : "No information on record.") : "")
|
||||
data["lidstate"] = closed
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "dnaforensics.tmpl", "QuikScan DNA Analyzer", 540, 326)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
O.loc = src
|
||||
held_card = O
|
||||
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
attack_hand(user)
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
if (accounts.len > 0)
|
||||
data["accounts"] = accounts
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "accounts_terminal.tmpl", src.name, 400, 640)
|
||||
ui.set_initial_data(data)
|
||||
@@ -117,7 +117,7 @@
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(usr, src, "main")
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(usr, src, "main")
|
||||
|
||||
if(href_list["choice"])
|
||||
switch(href_list["choice"])
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
var/list/medicineReagents = list()
|
||||
for(var/path in typesof(/datum/chemical_reaction) - /datum/chemical_reaction)
|
||||
var/datum/chemical_reaction/CR = path // Stupid casting required for reading
|
||||
var/datum/reagent/R = SSchemistry.chemical_reagents[initial(CR.result)]
|
||||
var/datum/reagent/R = chemical_reagents_list[initial(CR.result)]
|
||||
if(R && R.scannable)
|
||||
medicineReagents += R
|
||||
for(var/i in 1 to differentTypes)
|
||||
@@ -298,7 +298,7 @@
|
||||
var/list/drinkReagents = list()
|
||||
for(var/path in typesof(/datum/chemical_reaction) - /datum/chemical_reaction)
|
||||
var/datum/chemical_reaction/CR = path // Stupid casting required for reading
|
||||
var/datum/reagent/R = SSchemistry.chemical_reagents[initial(CR.result)]
|
||||
var/datum/reagent/R = chemical_reagents_list[initial(CR.result)]
|
||||
if(istype(R, /datum/reagent/drink) || istype(R, /datum/reagent/ethanol))
|
||||
drinkReagents += R
|
||||
for(var/i in 1 to differentTypes)
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
overlays.Cut()
|
||||
if(panel_open)
|
||||
overlays += image(icon, icon_panel)
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
if(wrenchable && default_unfasten_wrench(user, O, 20))
|
||||
@@ -282,11 +282,11 @@
|
||||
var/datum/stored_item/item = new/datum/stored_item(src, O.type, O.name)
|
||||
item.add_product(O)
|
||||
item_records.Add(item)
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/smartfridge/proc/vend(datum/stored_item/I)
|
||||
I.get_product(get_turf(src))
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/smartfridge/attack_ai(mob/user as mob)
|
||||
attack_hand(user)
|
||||
@@ -321,7 +321,7 @@
|
||||
if(items.len > 0)
|
||||
data["contents"] = items
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "smartfridge.tmpl", src.name, 400, 500)
|
||||
ui.set_initial_data(data)
|
||||
@@ -331,7 +331,7 @@
|
||||
if(..()) return 0
|
||||
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(user, src, "main")
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
|
||||
@@ -68,14 +68,14 @@
|
||||
//Reagents can be resolved to nicer names as well
|
||||
for(var/Rp in food_recipes)
|
||||
for(var/rid in food_recipes[Rp]["Reagents"])
|
||||
var/datum/reagent/Rd = SSchemistry.chemical_reagents[rid]
|
||||
var/datum/reagent/Rd = chemical_reagents_list[rid]
|
||||
var/R_name = Rd.name
|
||||
var/amt = food_recipes[Rp]["Reagents"][rid]
|
||||
food_recipes[Rp]["Reagents"] -= rid
|
||||
food_recipes[Rp]["Reagents"][R_name] = amt
|
||||
for(var/Rp in drink_recipes)
|
||||
for(var/rid in drink_recipes[Rp]["Reagents"])
|
||||
var/datum/reagent/Rd = SSchemistry.chemical_reagents[rid]
|
||||
var/datum/reagent/Rd = chemical_reagents_list[rid]
|
||||
var/R_name = Rd.name
|
||||
var/amt = drink_recipes[Rp]["Reagents"][rid]
|
||||
drink_recipes[Rp]["Reagents"] -= rid
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
else
|
||||
data["gravity"] = null
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "holodeck.tmpl", src.name, 400, 550)
|
||||
ui.set_initial_data(data)
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/emag_act(var/remaining_charges, var/mob/user as mob)
|
||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
|
||||
@@ -437,7 +437,7 @@
|
||||
|
||||
for(var/x=1;x<=additional_chems;x++)
|
||||
|
||||
var/new_chem = pick(SSchemistry.chemical_reagents)
|
||||
var/new_chem = pick(chemical_reagents_list)
|
||||
if(new_chem in banned_chems)
|
||||
continue
|
||||
banned_chems += new_chem
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
data["hasGenetics"] = 0
|
||||
data["sourceName"] = 0
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "botany_isolator.tmpl", "Lysis-isolation Centrifuge UI", 470, 450)
|
||||
ui.set_initial_data(data)
|
||||
@@ -292,7 +292,7 @@
|
||||
else
|
||||
data["loaded"] = 0
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "botany_editor.tmpl", "Bioballistic Delivery UI", 470, 450)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
medicalActive1 = null
|
||||
medicalActive2 = null
|
||||
medical_cannotfind = 0
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
usr << "<span class='notice'>You reset your record-viewing software.</span>"
|
||||
|
||||
/mob/living/silicon/pai/cancel_camera()
|
||||
|
||||
@@ -90,7 +90,7 @@ var/global/list/default_pai_software = list()
|
||||
data["emotions"] = emotions
|
||||
data["current_emotion"] = card.current_emotion
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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 = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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)
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
data["channels"] = channels
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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)
|
||||
@@ -128,7 +128,7 @@
|
||||
// This is dumb, but NanoUI breaks if it has no data to send
|
||||
data["manifest"] = PDA_Manifest
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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, "crew_manifest.tmpl", "Crew Manifest", 450, 600)
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
data["messages"] = messages
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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)
|
||||
@@ -236,7 +236,7 @@
|
||||
data["medical"] = M ? M.fields : null
|
||||
data["could_not_find"] = user.medical_cannotfind
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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)
|
||||
@@ -290,7 +290,7 @@
|
||||
data["security"] = S ? S.fields : null
|
||||
data["could_not_find"] = user.security_cannotfind
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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)
|
||||
@@ -340,7 +340,7 @@
|
||||
data["progress_b"] = user.hackprogress % 10
|
||||
data["aborted"] = user.hack_aborted
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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)
|
||||
@@ -431,7 +431,7 @@
|
||||
gases[++gases.len] = gas
|
||||
data["gas"] = gases
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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)
|
||||
@@ -505,7 +505,7 @@
|
||||
data["frequency"] = format_frequency(user.sradio.frequency)
|
||||
data["code"] = user.sradio.code
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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)
|
||||
|
||||
@@ -184,12 +184,12 @@
|
||||
dat += "<h3>Injector</h3>"
|
||||
if(patient)// && patient.health > min_health) //Not necessary, leave the buttons on, but the feedback during injection will give more information.
|
||||
for(var/re in injection_chems)
|
||||
var/datum/reagent/C = SSchemistry.chemical_reagents[re]
|
||||
var/datum/reagent/C = chemical_reagents_list[re]
|
||||
if(C)
|
||||
dat += "<A href='?src=\ref[src];inject=[C.id]'>Inject [C.name]</A><BR>"
|
||||
else
|
||||
for(var/re in injection_chems)
|
||||
var/datum/reagent/C = SSchemistry.chemical_reagents[re]
|
||||
var/datum/reagent/C = chemical_reagents_list[re]
|
||||
if(C)
|
||||
dat += "<span class='linkOff'>Inject [C.name]</span><BR>"
|
||||
|
||||
@@ -393,7 +393,7 @@
|
||||
patient.reagents.add_reagent(chem, inject_amount)
|
||||
drain(750) //-750 charge per injection
|
||||
var/units = round(patient.reagents.get_reagent_amount(chem))
|
||||
to_chat(hound, "<span class='notice'>Injecting [units] unit\s of [SSchemistry.chemical_reagents[chem]] into occupant.</span>") //If they were immersed, the reagents wouldn't leave with them.
|
||||
to_chat(hound, "<span class='notice'>Injecting [units] unit\s of [chemical_reagents_list[chem]] into occupant.</span>") //If they were immersed, the reagents wouldn't leave with them.
|
||||
|
||||
//For if the dogborg's existing patient uh, doesn't make it.
|
||||
/obj/item/device/dogborg/sleeper/proc/update_patient()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/mob/Logout()
|
||||
SSnanoui.user_logout(src) // this is used to clean up (remove) this user's Nano UIs
|
||||
GLOB.nanomanager.user_logout(src) // this is used to clean up (remove) this user's Nano UIs
|
||||
player_list -= src
|
||||
update_client_z(null)
|
||||
log_access_out(src)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
src.remoter_state = null
|
||||
|
||||
// Force an UI update before we go, ensuring that any windows we may have opened for the remote target closes.
|
||||
SSnanoui.update_uis(remote_target.nano_container())
|
||||
GLOB.nanomanager.update_uis(remote_target.nano_container())
|
||||
remote_target = null
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
"lost_sources" = lost_sources.len ? sanitize(english_list(lost_sources, nothing_text = "", and_text = ", ")) : ""))
|
||||
data["categories"] = categories
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "alarm_monitor.tmpl", "Alarm Monitoring Console", 800, 800, state = state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
data["alarms"] = alarms
|
||||
data["map_levels"] = using_map.get_map_levels(T.z)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_control.tmpl", src.name, 625, 625, state = state)
|
||||
// adding a template with the key "mapContent" enables the map ui functionality
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
for(var/z in (data["map_levels"] | T.z)) // Always show crew from the current Z even if we can't show a map
|
||||
data["crewmembers"] += crew_repository.health_data(z)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.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)
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
|
||||
data["change_hair_color"] = can_change(APPEARANCE_HAIR_COLOR)
|
||||
data["change_facial_hair_color"] = can_change(APPEARANCE_FACIAL_HAIR_COLOR)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "appearance_changer.tmpl", "[src]", 800, 450, state = state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
data["channels"] = channels
|
||||
data["law_sets"] = package_multiple_laws(data["isAdmin"] ? admin_laws : player_laws)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "law_manager.tmpl", sanitize("[src] - [owner]"), 800, is_malf(user) ? 600 : 400, state = state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
data["focus"] = focus.return_reading_data()
|
||||
data["map_levels"] = using_map.get_map_levels(T.z)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "power_monitor.tmpl", "Power Monitoring Console", 800, 500, state = state)
|
||||
// adding a template with the key "mapContent" enables the map ui functionality
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
data["hide_smes_details"] = hide_SMES_details
|
||||
data["hide_breakers"] = hide_breakers
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "rcon.tmpl", "RCON Console", 600, 400, state = state)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -1,3 +1,38 @@
|
||||
GLOBAL_DATUM_INIT(nanomanager, /datum/nanomanager, new) // NanoManager, the manager for Nano UIs.
|
||||
|
||||
// This is the window/UI manager for Nano UI
|
||||
// There should only ever be one (global) instance of nanomanger
|
||||
/datum/nanomanager
|
||||
// a list of current open /nanoui UIs, grouped by src_object and ui_key
|
||||
var/open_uis[0]
|
||||
// a list of current open /nanoui UIs, not grouped, for use in processing
|
||||
var/list/processing_uis = list()
|
||||
// a list of asset filenames which are to be sent to the client on user logon
|
||||
var/list/asset_files = list()
|
||||
|
||||
/**
|
||||
* Create a new nanomanager instance.
|
||||
* This proc generates a list of assets which are to be sent to each client on connect
|
||||
*
|
||||
* @return /nanomanager new nanomanager object
|
||||
*/
|
||||
/datum/nanomanager/New()
|
||||
var/list/nano_asset_dirs = list(\
|
||||
"nano/css/",\
|
||||
"nano/images/",\
|
||||
"nano/js/",\
|
||||
"nano/templates/"\
|
||||
)
|
||||
|
||||
var/list/filenames = null
|
||||
for (var/path in nano_asset_dirs)
|
||||
filenames = flist(path)
|
||||
for(var/filename in filenames)
|
||||
if(copytext(filename, length(filename)) != "/") // filenames which end in "/" are actually directories, which we want to ignore
|
||||
if(fexists(path + filename))
|
||||
asset_files.Add(fcopy_rsc(path + filename)) // add this file to asset_files for sending to clients when they connect
|
||||
|
||||
return
|
||||
|
||||
/**
|
||||
* Get an open /nanoui ui for the current user, src_object and ui_key and try to update it with data
|
||||
@@ -11,7 +46,7 @@
|
||||
*
|
||||
* @return /nanoui Returns the found ui, for null if none exists
|
||||
*/
|
||||
/datum/controller/subsystem/nanoui/proc/try_update_ui(var/mob/user, src_object, ui_key, var/datum/nanoui/ui, data, var/force_open = 0)
|
||||
/datum/nanomanager/proc/try_update_ui(var/mob/user, src_object, ui_key, var/datum/nanoui/ui, data, var/force_open = 0)
|
||||
if (isnull(ui)) // no ui has been passed, so we'll search for one
|
||||
{
|
||||
ui = get_open_ui(user, src_object, ui_key)
|
||||
@@ -36,7 +71,7 @@
|
||||
*
|
||||
* @return /nanoui Returns the found ui, or null if none exists
|
||||
*/
|
||||
/datum/controller/subsystem/nanoui/proc/get_open_ui(var/mob/user, src_object, ui_key)
|
||||
/datum/nanomanager/proc/get_open_ui(var/mob/user, src_object, ui_key)
|
||||
var/src_object_key = "\ref[src_object]"
|
||||
if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list))
|
||||
//testing("nanomanager/get_open_ui mob [user.name] [src_object:name] [ui_key] - there are no uis open")
|
||||
@@ -59,7 +94,7 @@
|
||||
*
|
||||
* @return int The number of uis updated
|
||||
*/
|
||||
/datum/controller/subsystem/nanoui/proc/update_uis(src_object)
|
||||
/datum/nanomanager/proc/update_uis(src_object)
|
||||
var/src_object_key = "\ref[src_object]"
|
||||
if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list))
|
||||
return 0
|
||||
@@ -79,7 +114,7 @@
|
||||
*
|
||||
* @return int The number of uis close
|
||||
*/
|
||||
/datum/controller/subsystem/nanoui/proc/close_uis(src_object)
|
||||
/datum/nanomanager/proc/close_uis(src_object)
|
||||
var/src_object_key = "\ref[src_object]"
|
||||
if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list))
|
||||
return 0
|
||||
@@ -101,7 +136,7 @@
|
||||
*
|
||||
* @return int The number of uis updated
|
||||
*/
|
||||
/datum/controller/subsystem/nanoui/proc/update_user_uis(var/mob/user, src_object = null, ui_key = null)
|
||||
/datum/nanomanager/proc/update_user_uis(var/mob/user, src_object = null, ui_key = null)
|
||||
if (isnull(user.open_uis) || !istype(user.open_uis, /list) || open_uis.len == 0)
|
||||
return 0 // has no open uis
|
||||
|
||||
@@ -122,7 +157,7 @@
|
||||
*
|
||||
* @return int The number of uis closed
|
||||
*/
|
||||
/datum/controller/subsystem/nanoui/proc/close_user_uis(var/mob/user, src_object = null, ui_key = null)
|
||||
/datum/nanomanager/proc/close_user_uis(var/mob/user, src_object = null, ui_key = null)
|
||||
if (isnull(user.open_uis) || !istype(user.open_uis, /list) || open_uis.len == 0)
|
||||
//testing("nanomanager/close_user_uis mob [user.name] has no open uis")
|
||||
return 0 // has no open uis
|
||||
@@ -145,7 +180,7 @@
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/controller/subsystem/nanoui/proc/ui_opened(var/datum/nanoui/ui)
|
||||
/datum/nanomanager/proc/ui_opened(var/datum/nanoui/ui)
|
||||
var/src_object_key = "\ref[ui.src_object]"
|
||||
if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list))
|
||||
open_uis[src_object_key] = list(ui.ui_key = list())
|
||||
@@ -166,7 +201,7 @@
|
||||
*
|
||||
* @return int 0 if no ui was removed, 1 if removed successfully
|
||||
*/
|
||||
/datum/controller/subsystem/nanoui/proc/ui_closed(var/datum/nanoui/ui)
|
||||
/datum/nanomanager/proc/ui_closed(var/datum/nanoui/ui)
|
||||
var/src_object_key = "\ref[ui.src_object]"
|
||||
if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list))
|
||||
return 0 // wasn't open
|
||||
@@ -193,7 +228,7 @@
|
||||
*/
|
||||
|
||||
//
|
||||
/datum/controller/subsystem/nanoui/proc/user_logout(var/mob/user)
|
||||
/datum/nanomanager/proc/user_logout(var/mob/user)
|
||||
//testing("nanomanager/user_logout user [user.name]")
|
||||
return close_user_uis(user)
|
||||
|
||||
@@ -206,7 +241,7 @@
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/controller/subsystem/nanoui/proc/user_transferred(var/mob/oldMob, var/mob/newMob)
|
||||
/datum/nanomanager/proc/user_transferred(var/mob/oldMob, var/mob/newMob)
|
||||
//testing("nanomanager/user_transferred from mob [oldMob.name] to mob [newMob.name]")
|
||||
if (!oldMob || isnull(oldMob.open_uis) || !istype(oldMob.open_uis, /list) || open_uis.len == 0)
|
||||
//testing("nanomanager/user_transferred mob [oldMob.name] has no open uis")
|
||||
@@ -232,7 +267,7 @@
|
||||
* @return nothing
|
||||
*/
|
||||
|
||||
/datum/controller/subsystem/nanoui/proc/send_resources(client)
|
||||
/datum/nanomanager/proc/send_resources(client)
|
||||
for(var/file in asset_files)
|
||||
client << browse_rsc(file) // send the file to the client
|
||||
|
||||
|
||||
@@ -412,7 +412,7 @@ nanoui is used to open and update nano browser uis
|
||||
winset(user, "mapwindow.map", "focus=true") // return keyboard focus to map
|
||||
on_close_winset()
|
||||
//onclose(user, window_id)
|
||||
SSnanoui.ui_opened(src)
|
||||
GLOB.nanomanager.ui_opened(src)
|
||||
|
||||
/**
|
||||
* Reinitialise this UI, potentially with a different template and/or initial data
|
||||
@@ -433,7 +433,7 @@ nanoui is used to open and update nano browser uis
|
||||
*/
|
||||
/datum/nanoui/proc/close()
|
||||
is_auto_updating = 0
|
||||
SSnanoui.ui_closed(src)
|
||||
GLOB.nanomanager.ui_closed(src)
|
||||
user << browse(null, "window=[window_id]")
|
||||
for(var/datum/nanoui/child in children)
|
||||
child.close()
|
||||
@@ -492,7 +492,7 @@ nanoui is used to open and update nano browser uis
|
||||
map_update = 1
|
||||
|
||||
if ((src_object && src_object.Topic(href, href_list, state)) || map_update)
|
||||
SSnanoui.update_uis(src_object) // update all UIs attached to src_object
|
||||
GLOB.nanomanager.update_uis(src_object) // update all UIs attached to src_object
|
||||
|
||||
/**
|
||||
* Process this UI, updating the entire UI or just the status (aka visibility)
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
shut_up = !shut_up
|
||||
|
||||
add_fingerprint(usr)
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
// Also special treatment!
|
||||
/obj/machinery/vending/nifsoft_shop/vend(datum/stored_item/vending_product/R, mob/user)
|
||||
@@ -179,7 +179,7 @@
|
||||
vend_ready = 0 //One thing at a time!!
|
||||
status_message = "Installing..."
|
||||
status_error = 0
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
if(R.category & CAT_COIN)
|
||||
if(!coin)
|
||||
@@ -215,5 +215,5 @@
|
||||
status_error = 0
|
||||
vend_ready = 1
|
||||
currently_vending = null
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
return 1
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
data["engines_info"] = enginfo
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "engines_control.tmpl", "[linked.name] Engines Control", 380, 530)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
data["locations"] = locations
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "helm.tmpl", "[linked.name] Helm Control", 380, 530)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
"can_force" = can_go && shuttle.can_force(),
|
||||
)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "shuttle_control_console_exploration.tmpl", "[shuttle_tag] Shuttle Control", 470, 310)
|
||||
|
||||
@@ -57,7 +57,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
|
||||
data["cooldown"] = sendcooldown
|
||||
data["destination"] = destination
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "fax.tmpl", src.name, 500, 500)
|
||||
ui.set_initial_data(data)
|
||||
@@ -116,7 +116,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
|
||||
if(href_list["logout"])
|
||||
authenticated = 0
|
||||
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/sendfax(var/destination)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
else
|
||||
data["isSilicon"] = null
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "photocopier.tmpl", src.name, 300, 250)
|
||||
ui.set_initial_data(data)
|
||||
@@ -118,7 +118,7 @@
|
||||
toner -= 5
|
||||
sleep(15)
|
||||
|
||||
SSnanoui.update_uis(src)
|
||||
GLOB.nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/photocopier/attackby(obj/item/O as obj, mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/paper) || istype(O, /obj/item/weapon/photo) || istype(O, /obj/item/weapon/paper_bundle))
|
||||
|
||||
@@ -822,7 +822,7 @@
|
||||
)
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
|
||||
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "pacman.tmpl", src.name, 500, 560)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
@@ -328,7 +328,7 @@
|
||||
data["outputting"] = 0 // smes is not outputting
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.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
|
||||
|
||||
@@ -333,7 +333,7 @@
|
||||
data["ambient_pressure"] = round(env.return_pressure())
|
||||
data["detonating"] = grav_pulling
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "supermatter_crystal.tmpl", "Supermatter Crystal", 500, 300)
|
||||
ui.set_initial_data(data)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user