mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 20:47:43 +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
@@ -1,4 +1,4 @@
|
||||
var/global/nttransfer_uid = 0
|
||||
GLOBAL_VAR_INIT(nttransfer_uid, 0)
|
||||
|
||||
/datum/computer_file/program/nttransfer
|
||||
filename = "nttransfer"
|
||||
@@ -27,8 +27,8 @@ var/global/nttransfer_uid = 0
|
||||
var/upload_menu = FALSE // Whether we show the program list and upload menu
|
||||
|
||||
/datum/computer_file/program/nttransfer/New()
|
||||
unique_token = nttransfer_uid
|
||||
nttransfer_uid++
|
||||
unique_token = GLOB.nttransfer_uid
|
||||
GLOB.nttransfer_uid++
|
||||
..()
|
||||
|
||||
/datum/computer_file/program/nttransfer/process_tick()
|
||||
@@ -109,7 +109,7 @@ var/global/nttransfer_uid = 0
|
||||
data["servers"] = list()
|
||||
if(!(downloaded_file || provided_file || upload_menu))
|
||||
var/list/all_servers = list()
|
||||
for(var/datum/computer_file/program/nttransfer/P in ntnet_global.fileservers)
|
||||
for(var/datum/computer_file/program/nttransfer/P in GLOB.ntnet_global.fileservers)
|
||||
if(!P.provided_file)
|
||||
continue
|
||||
all_servers.Add(list(list(
|
||||
@@ -127,7 +127,7 @@ var/global/nttransfer_uid = 0
|
||||
return TRUE
|
||||
switch(action)
|
||||
if("PRG_downloadfile")
|
||||
for(var/datum/computer_file/program/nttransfer/P in ntnet_global.fileservers)
|
||||
for(var/datum/computer_file/program/nttransfer/P in GLOB.ntnet_global.fileservers)
|
||||
if(P.unique_token == text2num(params["uid"]))
|
||||
remote = P
|
||||
break
|
||||
@@ -145,8 +145,8 @@ var/global/nttransfer_uid = 0
|
||||
error = ""
|
||||
upload_menu = 0
|
||||
finalize_download()
|
||||
if(src in ntnet_global.fileservers)
|
||||
ntnet_global.fileservers.Remove(src)
|
||||
if(src in GLOB.ntnet_global.fileservers)
|
||||
GLOB.ntnet_global.fileservers.Remove(src)
|
||||
for(var/datum/computer_file/program/nttransfer/T in connected_clients)
|
||||
T.crash_download("Remote server has forcibly closed the connection")
|
||||
provided_file = null
|
||||
@@ -167,7 +167,7 @@ var/global/nttransfer_uid = 0
|
||||
error = "I/O Error: File locked."
|
||||
return
|
||||
provided_file = F
|
||||
ntnet_global.fileservers |= src
|
||||
GLOB.ntnet_global.fileservers |= src
|
||||
return
|
||||
error = "I/O Error: Unable to locate file on hard drive."
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user