mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 21:19:44 +01:00
Convert some more globals (#19231)
* move ref lists from world new to ref list creation * tg styl * . * next globals * ugh * some more * pain * . * horror * . * . * . * shoe me * ye * . * eh * . * . --------- Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Cameron Lennox
parent
ecca95d008
commit
1fcbb216e7
@@ -107,7 +107,7 @@
|
||||
|
||||
switch(action)
|
||||
if("switchTo")
|
||||
var/obj/machinery/camera/C = locate(params["camera"]) in cameranet.cameras
|
||||
var/obj/machinery/camera/C = locate(params["camera"]) in GLOB.cameranet.cameras
|
||||
if(!C)
|
||||
return
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
all_networks += additional_networks
|
||||
|
||||
var/list/D = list()
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
if(!C.network)
|
||||
stack_trace("Camera in a cameranet has no camera network")
|
||||
continue
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
var/datum/comm_message_listener/l = obtain_message_listener()
|
||||
data["messages"] = l.messages
|
||||
data["message_deletion_allowed"] = l != global_message_listener
|
||||
data["message_deletion_allowed"] = l != GLOB.global_message_listener
|
||||
data["message_current_id"] = current_viewing_message_id
|
||||
data["message_current"] = current_viewing_message
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
if(istype(host, /datum/computer_file/program/comm))
|
||||
var/datum/computer_file/program/comm/P = host
|
||||
return P.message_core
|
||||
return global_message_listener
|
||||
return GLOB.global_message_listener
|
||||
|
||||
/proc/post_status(atom/source, command, data1, data2, mob/user = null)
|
||||
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
|
||||
@@ -302,7 +302,7 @@
|
||||
var/response = tgui_alert(ui.user, "Are you sure you wish to delete this message?", "Confirm", list("Yes", "No"))
|
||||
if(response == "Yes")
|
||||
if(current_viewing_message)
|
||||
if(l != global_message_listener)
|
||||
if(l != GLOB.global_message_listener)
|
||||
l.Remove(current_viewing_message)
|
||||
current_viewing_message = null
|
||||
setMenuState(ui.user, COMM_SCREEN_MESSAGES)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
var/datum/computer_file/data/email_message/current_message = null
|
||||
|
||||
/datum/tgui_module/email_client/proc/log_in()
|
||||
for(var/datum/computer_file/data/email_account/account in ntnet_global.email_accounts)
|
||||
for(var/datum/computer_file/data/email_account/account in GLOB.ntnet_global.email_accounts)
|
||||
if(!account.can_login)
|
||||
continue
|
||||
if(account.login == stored_login)
|
||||
@@ -128,7 +128,7 @@
|
||||
data["current_account"] = current_account.login
|
||||
if(addressbook)
|
||||
var/list/all_accounts = list()
|
||||
for(var/datum/computer_file/data/email_account/account in ntnet_global.email_accounts)
|
||||
for(var/datum/computer_file/data/email_account/account in GLOB.ntnet_global.email_accounts)
|
||||
if(!account.can_login)
|
||||
continue
|
||||
all_accounts.Add(list(list(
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
var/list/zlevels_in_long_range = using_map.get_map_levels(their_z, TRUE, om_range = DEFAULT_OVERMAP_RANGE) - zlevels_in_range
|
||||
var/their_signal = 0
|
||||
// Measure z-distance between the AM passed in and the nearest relay
|
||||
for(var/obj/machinery/ntnet_relay/R as anything in ntnet_global.relays)
|
||||
for(var/obj/machinery/ntnet_relay/R as anything in GLOB.ntnet_global.relays)
|
||||
if(!R.operable())
|
||||
continue
|
||||
if(R.z == their_z)
|
||||
|
||||
@@ -58,7 +58,7 @@ GLOBAL_DATUM_INIT(tgui_default_state, /datum/tgui_state/default, new)
|
||||
// If we're installed in a chassi, rather than transfered to an inteliCard or other container, then check if we have camera view
|
||||
if(is_in_chassis())
|
||||
//stop AIs from leaving windows open and using then after they lose vision
|
||||
if(cameranet && !cameranet.checkTurfVis(get_turf(src_object)))
|
||||
if(GLOB.cameranet && !GLOB.cameranet.checkTurfVis(get_turf(src_object)))
|
||||
return STATUS_CLOSE
|
||||
return STATUS_INTERACTIVE
|
||||
else if(get_dist(src_object, src) <= client.view) // View does not return what one would expect while installed in an inteliCard
|
||||
|
||||
Reference in New Issue
Block a user