mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 02:54:44 +01:00
[MIRROR] Cleanup up all instances of using var/ definitions in proc parameters. (#240)
* Cleanup up all instances of using var/ definitions in proc parameters. (#52728) * var/list cleanup * The rest of the owl * plushvar bad * Can't follow my own advice. * Cleanup up all instances of using var/ definitions in proc parameters. Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
This commit is contained in:
@@ -111,7 +111,7 @@
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/modular_computer/attackby(var/obj/item/W as obj, mob/user)
|
||||
/obj/machinery/modular_computer/attackby(obj/item/W as obj, mob/user)
|
||||
if(cpu && !(flags_1 & NODECONSTRUCT_1))
|
||||
return cpu.attackby(W, user)
|
||||
return ..()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
var/assigned = FALSE
|
||||
var/first_load = TRUE
|
||||
|
||||
/datum/computer_file/program/contract_uplink/run_program(var/mob/living/user)
|
||||
/datum/computer_file/program/contract_uplink/run_program(mob/living/user)
|
||||
. = ..(user)
|
||||
|
||||
/datum/computer_file/program/contract_uplink/ui_act(action, params)
|
||||
|
||||
@@ -10,7 +10,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()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
var/malfunction_probability = 10// Chance of malfunction when the component is damaged
|
||||
var/device_type
|
||||
|
||||
/obj/item/computer_hardware/New(var/obj/L)
|
||||
/obj/item/computer_hardware/New(obj/L)
|
||||
..()
|
||||
pixel_x = rand(-8, 8)
|
||||
pixel_y = rand(-8, 8)
|
||||
@@ -56,7 +56,7 @@
|
||||
return TRUE
|
||||
|
||||
// Called on multitool click, prints diagnostic information to the user.
|
||||
/obj/item/computer_hardware/proc/diagnostics(var/mob/user)
|
||||
/obj/item/computer_hardware/proc/diagnostics(mob/user)
|
||||
to_chat(user, "Hardware Integrity Test... (Corruption: [damage]/[max_damage]) [damage > damage_failure ? "FAIL" : damage > damage_malfunction ? "WARN" : "PASS"]")
|
||||
|
||||
// Handles damage checks
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
return TRUE // Good to go.
|
||||
|
||||
/obj/item/computer_hardware/examine(var/mob/user)
|
||||
/obj/item/computer_hardware/examine(mob/user)
|
||||
. = ..()
|
||||
if(damage > damage_failure)
|
||||
. += "<span class='danger'>It seems to be severely damaged!</span>"
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
. = ..()
|
||||
. += "<span class='notice'>It has [max_capacity] GQ of storage capacity.</span>"
|
||||
|
||||
/obj/item/computer_hardware/hard_drive/diagnostics(var/mob/user)
|
||||
/obj/item/computer_hardware/hard_drive/diagnostics(mob/user)
|
||||
..()
|
||||
// 999 is a byond limit that is in place. It's unlikely someone will reach that many files anyway, since you would sooner run out of space.
|
||||
to_chat(user, "NT-NFS File Table Status: [stored_files.len]/999")
|
||||
to_chat(user, "Storage capacity: [used_capacity]/[max_capacity]GQ")
|
||||
|
||||
// Use this proc to add file to the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks.
|
||||
/obj/item/computer_hardware/hard_drive/proc/store_file(var/datum/computer_file/F)
|
||||
/obj/item/computer_hardware/hard_drive/proc/store_file(datum/computer_file/F)
|
||||
if(!F || !istype(F))
|
||||
return 0
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
return 1
|
||||
|
||||
// Use this proc to remove file from the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks.
|
||||
/obj/item/computer_hardware/hard_drive/proc/remove_file(var/datum/computer_file/F)
|
||||
/obj/item/computer_hardware/hard_drive/proc/remove_file(datum/computer_file/F)
|
||||
if(!F || !istype(F))
|
||||
return 0
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
used_capacity = total_size
|
||||
|
||||
// Checks whether file can be stored on the hard drive. We can only store unique files, so this checks whether we wouldn't get a duplicity by adding a file.
|
||||
/obj/item/computer_hardware/hard_drive/proc/can_store_file(var/datum/computer_file/F)
|
||||
/obj/item/computer_hardware/hard_drive/proc/can_store_file(datum/computer_file/F)
|
||||
if(!F || !istype(F))
|
||||
return 0
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
|
||||
// Tries to find the file by filename. Returns null on failure
|
||||
/obj/item/computer_hardware/hard_drive/proc/find_file_by_name(var/filename)
|
||||
/obj/item/computer_hardware/hard_drive/proc/find_file_by_name(filename)
|
||||
if(!check_functionality())
|
||||
return null
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
device_type = MC_NET
|
||||
var/static/ntnet_card_uid = 1
|
||||
|
||||
/obj/item/computer_hardware/network_card/diagnostics(var/mob/user)
|
||||
/obj/item/computer_hardware/network_card/diagnostics(mob/user)
|
||||
..()
|
||||
to_chat(user, "NIX Unique ID: [identification_id]")
|
||||
to_chat(user, "NIX User Tag: [identification_string]")
|
||||
@@ -22,7 +22,7 @@
|
||||
if(ethernet)
|
||||
to_chat(user, "OpenEth (Physical Connection) - Physical network connection port")
|
||||
|
||||
/obj/item/computer_hardware/network_card/New(var/l)
|
||||
/obj/item/computer_hardware/network_card/New(l)
|
||||
..()
|
||||
identification_id = ntnet_card_uid++
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
return "[identification_string] (NID [identification_id])"
|
||||
|
||||
// 0 - No signal, 1 - Low signal, 2 - High signal. 3 - Wired Connection
|
||||
/obj/item/computer_hardware/network_card/proc/get_signal(var/specific_action = 0)
|
||||
/obj/item/computer_hardware/network_card/proc/get_signal(specific_action = 0)
|
||||
if(!holder) // Hardware is not installed in anything. No signal. How did this even get called?
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user