mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
Makes all global variables handled by the GLOB controller (#13152)
* Handlers converted, now to fix 3532 compile errors * 3532 compile fixes later, got runtimes on startup * Well the server loads now atleast * Take 2 * Oops
This commit is contained in:
@@ -6,7 +6,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
|
||||
*/
|
||||
|
||||
var/list/world_uplinks = list()
|
||||
GLOBAL_LIST_EMPTY(world_uplinks)
|
||||
|
||||
/obj/item/uplink
|
||||
var/welcome // Welcoming menu message
|
||||
@@ -35,10 +35,10 @@ var/list/world_uplinks = list()
|
||||
uses = SSticker.mode.uplink_uses
|
||||
uplink_items = get_uplink_items()
|
||||
|
||||
world_uplinks += src
|
||||
GLOB.world_uplinks += src
|
||||
|
||||
/obj/item/uplink/Destroy()
|
||||
world_uplinks -= src
|
||||
GLOB.world_uplinks -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/uplink/proc/generate_items(mob/user as mob)
|
||||
@@ -216,7 +216,7 @@ var/list/world_uplinks = list()
|
||||
/*
|
||||
NANO UI FOR UPLINK WOOP WOOP
|
||||
*/
|
||||
/obj/item/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
|
||||
/obj/item/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = GLOB.inventory_state)
|
||||
var/title = "Remote Uplink"
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
@@ -227,7 +227,7 @@ var/list/world_uplinks = list()
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
|
||||
/obj/item/uplink/hidden/ui_data(mob/user, ui_key = "main", datum/topic_state/state = inventory_state)
|
||||
/obj/item/uplink/hidden/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.inventory_state)
|
||||
var/data[0]
|
||||
|
||||
data["welcome"] = welcome
|
||||
@@ -277,14 +277,14 @@ var/list/world_uplinks = list()
|
||||
/obj/item/uplink/hidden/proc/update_nano_data(var/id)
|
||||
if(nanoui_menu == 1)
|
||||
var/permanentData[0]
|
||||
for(var/datum/data/record/L in sortRecord(data_core.general))
|
||||
for(var/datum/data/record/L in sortRecord(GLOB.data_core.general))
|
||||
permanentData[++permanentData.len] = list(Name = sanitize(L.fields["name"]),"id" = L.fields["id"])
|
||||
nanoui_data["exploit_records"] = permanentData
|
||||
|
||||
if(nanoui_menu == 11)
|
||||
nanoui_data["exploit_exists"] = 0
|
||||
|
||||
for(var/datum/data/record/L in data_core.general)
|
||||
for(var/datum/data/record/L in GLOB.data_core.general)
|
||||
if(L.fields["id"] == id)
|
||||
nanoui_data["exploit"] = list() // Setting this to equal L.fields passes it's variables that are lists as reference instead of value.
|
||||
nanoui_data["exploit"]["name"] = html_encode(L.fields["name"])
|
||||
|
||||
Reference in New Issue
Block a user