mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 15:08:34 +01:00
removes var/ inside all procs (#19450)
* removes var/ inside all procs * . * ugh
This commit is contained in:
@@ -43,7 +43,7 @@ GLOBAL_VAR_INIT(file_uid, 0)
|
||||
return ..()
|
||||
|
||||
// Returns independent copy of this file.
|
||||
/datum/computer_file/proc/clone(var/rename = 0)
|
||||
/datum/computer_file/proc/clone(rename = 0)
|
||||
var/datum/computer_file/temp = new type
|
||||
temp.unsendable = unsendable
|
||||
temp.undeletable = undeletable
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/archived // Set to 1 for older stuff
|
||||
var/cover //filename of cover.
|
||||
|
||||
/datum/computer_file/data/news_article/New(var/load_from_file = 0)
|
||||
/datum/computer_file/data/news_article/New(load_from_file = 0)
|
||||
..()
|
||||
if(server_file_path && load_from_file)
|
||||
stored_data = file2text(server_file_path)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
/// Name of the tgui interface
|
||||
var/tgui_id
|
||||
|
||||
/datum/computer_file/program/New(var/obj/item/modular_computer/comp = null)
|
||||
/datum/computer_file/program/New(obj/item/modular_computer/comp = null)
|
||||
..()
|
||||
if(comp && istype(comp))
|
||||
computer = comp
|
||||
@@ -66,19 +66,19 @@
|
||||
computer.update_icon()
|
||||
|
||||
// Attempts to create a log in global ntnet datum. Returns 1 on success, 0 on fail.
|
||||
/datum/computer_file/program/proc/generate_network_log(var/text)
|
||||
/datum/computer_file/program/proc/generate_network_log(text)
|
||||
if(computer)
|
||||
return computer.add_log(text)
|
||||
return 0
|
||||
|
||||
/datum/computer_file/program/proc/is_supported_by_hardware(var/hardware_flag = 0, var/loud = 0, var/mob/user = null)
|
||||
/datum/computer_file/program/proc/is_supported_by_hardware(hardware_flag = 0, loud = 0, mob/user = null)
|
||||
if(!(hardware_flag & usage_flags))
|
||||
if(loud && computer && user)
|
||||
to_chat(user, span_warning("\The [computer] flashes: \"Hardware Error - Incompatible software\"."))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/computer_file/program/proc/get_signal(var/specific_action = 0)
|
||||
/datum/computer_file/program/proc/get_signal(specific_action = 0)
|
||||
if(computer)
|
||||
return computer.get_ntnet_status(specific_action)
|
||||
return 0
|
||||
@@ -102,7 +102,7 @@
|
||||
// User has to wear their ID or have it inhand for ID Scan to work.
|
||||
// Can also be called manually, with optional parameter being access_to_check to scan the user's ID.
|
||||
// explicit_card can be passed by callers that already have a card reference (e.g. the laptop's inserted card).
|
||||
/datum/computer_file/program/proc/can_run(var/mob/living/user, var/loud = 0, var/access_to_check, var/obj/item/card/id/explicit_card)
|
||||
/datum/computer_file/program/proc/can_run(mob/living/user, loud = 0, access_to_check, obj/item/card/id/explicit_card)
|
||||
// Defaults to required_access
|
||||
if(!access_to_check)
|
||||
access_to_check = required_access
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
// This is performed on program startup. May be overriden to add extra logic. Remember to include ..() call. Return 1 on success, 0 on failure.
|
||||
// When implementing new program based device, use this to run the program.
|
||||
/datum/computer_file/program/proc/run_program(var/mob/living/user)
|
||||
/datum/computer_file/program/proc/run_program(mob/living/user)
|
||||
if(can_run(user, 1) || !requires_access_to_run)
|
||||
computer.active_program = src
|
||||
if(tguimodule_path)
|
||||
@@ -154,7 +154,7 @@
|
||||
return 0
|
||||
|
||||
// Use this proc to kill the program. Designed to be implemented by each program if it requires on-quit logic, such as the NTNRC client.
|
||||
/datum/computer_file/program/proc/kill_program(var/forced = 0)
|
||||
/datum/computer_file/program/proc/kill_program(forced = 0)
|
||||
program_state = PROGRAM_STATE_KILLED
|
||||
if(network_destination)
|
||||
generate_network_log("Connection to [network_destination] closed.")
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
// Always include a parent call when overriding an event.
|
||||
|
||||
// Called when the ID card is removed from computer. ID is removed AFTER this proc.
|
||||
/datum/computer_file/program/proc/event_idremoved(var/background)
|
||||
/datum/computer_file/program/proc/event_idremoved(background)
|
||||
return
|
||||
|
||||
// Called when the computer fails due to power loss. Override when program wants to specifically react to power loss.
|
||||
/datum/computer_file/program/proc/event_powerfailure(var/background)
|
||||
/datum/computer_file/program/proc/event_powerfailure(background)
|
||||
kill_program(1)
|
||||
|
||||
// Called when the network connectivity fails. Computer does necessary checks and only calls this when requires_ntnet_feature and similar variables are not met.
|
||||
/datum/computer_file/program/proc/event_networkfailure(var/background)
|
||||
/datum/computer_file/program/proc/event_networkfailure(background)
|
||||
kill_program(1)
|
||||
if(background)
|
||||
computer.visible_message(span_warning("\The [computer]'s screen displays an error: \"Network connectivity lost - process [filename].[filetype] (PID [rand(100,999)]) terminated.\""))
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/datum/access/target_access = null
|
||||
var/list/restricted_access_codes = list(ACCESS_CHANGE_IDS, ACCESS_NETWORK) // access codes that are not hackable due to balance reasons
|
||||
|
||||
/datum/computer_file/program/access_decrypter/kill_program(var/forced)
|
||||
/datum/computer_file/program/access_decrypter/kill_program(forced)
|
||||
reset()
|
||||
..(forced)
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
target = null
|
||||
error = "Connection to destination relay lost."
|
||||
|
||||
/datum/computer_file/program/ntnet_dos/kill_program(var/forced)
|
||||
/datum/computer_file/program/ntnet_dos/kill_program(forced)
|
||||
if(target)
|
||||
target.dos_sources.Remove(src)
|
||||
target = null
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
tgui_id = "NtosRevelation"
|
||||
var/armed = 0
|
||||
|
||||
/datum/computer_file/program/revelation/run_program(var/mob/living/user)
|
||||
/datum/computer_file/program/revelation/run_program(mob/living/user)
|
||||
. = ..(user)
|
||||
if(armed)
|
||||
activate()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
category = PROG_COMMAND
|
||||
var/datum/comm_message_listener/message_core
|
||||
|
||||
/datum/computer_file/program/comm/New(var/obj/item/modular_computer/comp = null)
|
||||
/datum/computer_file/program/comm/New(obj/item/modular_computer/comp = null)
|
||||
..()
|
||||
message_core = new
|
||||
|
||||
@@ -32,7 +32,7 @@ General message handling stuff
|
||||
GLOB.last_message_id = GLOB.last_message_id + 1
|
||||
return GLOB.last_message_id
|
||||
|
||||
/proc/post_comm_message(var/message_title, var/message_text)
|
||||
/proc/post_comm_message(message_title, message_text)
|
||||
var/list/message = list()
|
||||
message["id"] = get_comm_message_id()
|
||||
message["title"] = message_title
|
||||
@@ -49,8 +49,8 @@ General message handling stuff
|
||||
messages = list()
|
||||
GLOB.comm_message_listeners.Add(src)
|
||||
|
||||
/datum/comm_message_listener/proc/Add(var/list/message)
|
||||
/datum/comm_message_listener/proc/Add(list/message)
|
||||
messages[++messages.len] = message
|
||||
|
||||
/datum/comm_message_listener/proc/Remove(var/list/message)
|
||||
/datum/comm_message_listener/proc/Remove(list/message)
|
||||
messages -= list(message)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Returns which access is relevant to passed network. Used by the program.
|
||||
/proc/get_camera_access(var/network)
|
||||
/proc/get_camera_access(network)
|
||||
if(!network)
|
||||
return 0
|
||||
. = using_map.get_network_access(network)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
..()
|
||||
abort_file_download()
|
||||
|
||||
/datum/computer_file/program/ntnetdownload/proc/begin_file_download(var/filename)
|
||||
/datum/computer_file/program/ntnetdownload/proc/begin_file_download(filename)
|
||||
if(downloaded_file)
|
||||
return 0
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
downloaded_file = PRG.clone()
|
||||
|
||||
/datum/computer_file/program/ntnetdownload/proc/check_file_download(var/filename)
|
||||
/datum/computer_file/program/ntnetdownload/proc/check_file_download(filename)
|
||||
//returns 1 if file can be downloaded, returns 0 if download prohibited
|
||||
var/datum/computer_file/program/PRG = GLOB.ntnet_global.find_ntnet_file_by_name(filename)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ GLOBAL_VAR_INIT(nttransfer_uid, 0)
|
||||
if(!remote)
|
||||
crash_download("Connection to remote server lost")
|
||||
|
||||
/datum/computer_file/program/nttransfer/kill_program(var/forced = 0)
|
||||
/datum/computer_file/program/nttransfer/kill_program(forced = 0)
|
||||
if(downloaded_file) // Client mode, clean up variables for next use
|
||||
finalize_download()
|
||||
|
||||
@@ -64,7 +64,7 @@ GLOBAL_VAR_INIT(nttransfer_uid, 0)
|
||||
finalize_download()
|
||||
|
||||
// Crashes the download and displays specific error message
|
||||
/datum/computer_file/program/nttransfer/proc/crash_download(var/message)
|
||||
/datum/computer_file/program/nttransfer/proc/crash_download(message)
|
||||
error = message ? message : "An unknown error has occurred during download"
|
||||
finalize_download()
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
usage_flags = PROGRAM_ALL
|
||||
category = PROG_OFFICE
|
||||
|
||||
/datum/computer_file/program/wordprocessor/proc/get_file(var/filename)
|
||||
/datum/computer_file/program/wordprocessor/proc/get_file(filename)
|
||||
var/obj/item/computer_hardware/hard_drive/HDD = computer.hard_drive
|
||||
if(!HDD)
|
||||
return
|
||||
@@ -27,14 +27,14 @@
|
||||
return
|
||||
return F
|
||||
|
||||
/datum/computer_file/program/wordprocessor/proc/open_file(var/filename)
|
||||
/datum/computer_file/program/wordprocessor/proc/open_file(filename)
|
||||
var/datum/computer_file/data/F = get_file(filename)
|
||||
if(F)
|
||||
open_file = F.filename
|
||||
loaded_data = F.stored_data
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/wordprocessor/proc/save_file(var/filename)
|
||||
/datum/computer_file/program/wordprocessor/proc/save_file(filename)
|
||||
var/datum/computer_file/data/F = get_file(filename)
|
||||
if(!F) //try to make one if it doesn't exist
|
||||
F = create_file(filename, loaded_data)
|
||||
@@ -52,7 +52,7 @@
|
||||
is_edited = 0
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/wordprocessor/proc/create_file(var/newname, var/data = "")
|
||||
/datum/computer_file/program/wordprocessor/proc/create_file(newname, data = "")
|
||||
if(!newname)
|
||||
return
|
||||
var/obj/item/computer_hardware/hard_drive/HDD = computer.hard_drive
|
||||
|
||||
Reference in New Issue
Block a user