removes var/ inside all procs (#19450)

* removes var/ inside all procs

* .

* ugh
This commit is contained in:
Kashargul
2026-05-05 10:55:17 +02:00
committed by GitHub
parent 13162d13a2
commit 5926589c16
1987 changed files with 7376 additions and 7377 deletions
@@ -61,7 +61,7 @@
paired_uavs.Cut()
return ..()
/obj/item/modular_computer/emag_act(var/remaining_charges, var/mob/user)
/obj/item/modular_computer/emag_act(remaining_charges, mob/user)
if(computer_emagged)
to_chat(user, "\The [src] was already emagged.")
return //NO_EMAG_ACT
@@ -102,7 +102,7 @@
return add_overlay(.)
/obj/item/modular_computer/proc/turn_on(var/mob/user)
/obj/item/modular_computer/proc/turn_on(mob/user)
if(bsod)
return
if(tesla_link)
@@ -129,7 +129,7 @@
to_chat(user, "You press the power button but \the [src] does not respond")
// Relays kill program request to currently active program. Use this to quit current program.
/obj/item/modular_computer/proc/kill_program(var/forced = 0)
/obj/item/modular_computer/proc/kill_program(forced = 0)
if(active_program)
active_program.kill_program(forced)
active_program = null
@@ -137,7 +137,7 @@
addtimer(CALLBACK(src, PROC_REF(delayed_reopen_ui), user), 1, TIMER_DELETE_ME)
update_icon()
/obj/item/modular_computer/proc/delayed_reopen_ui(var/mob/user)
/obj/item/modular_computer/proc/delayed_reopen_ui(mob/user)
// Re-open the UI on this computer. It should show the main screen now.
// Expected from kill_program()
PRIVATE_PROC(TRUE)
@@ -147,18 +147,18 @@
tgui_interact(user)
// Returns 0 for No Signal, 1 for Low Signal and 2 for Good Signal. 3 is for wired connection (always-on)
/obj/item/modular_computer/proc/get_ntnet_status(var/specific_action = 0)
/obj/item/modular_computer/proc/get_ntnet_status(specific_action = 0)
if(network_card)
return network_card.get_signal(specific_action)
else
return 0
/obj/item/modular_computer/proc/add_log(var/text)
/obj/item/modular_computer/proc/add_log(text)
if(!get_ntnet_status())
return 0
return GLOB.ntnet_global.add_log(text, network_card)
/obj/item/modular_computer/proc/shutdown_computer(var/loud = 1)
/obj/item/modular_computer/proc/shutdown_computer(loud = 1)
kill_program(1)
for(var/datum/computer_file/program/P in idle_threads)
P.kill_program(1)
@@ -168,7 +168,7 @@
enabled = 0
update_icon()
/obj/item/modular_computer/proc/enable_computer(var/mob/user = null)
/obj/item/modular_computer/proc/enable_computer(mob/user = null)
enabled = 1
update_icon()
@@ -285,7 +285,7 @@
else
autorun.stored_data = program
/obj/item/modular_computer/proc/find_file_by_uid(var/uid)
/obj/item/modular_computer/proc/find_file_by_uid(uid)
if(hard_drive)
. = hard_drive.find_file_by_uid(uid)
if(portable_drive && !.)
@@ -1,4 +1,4 @@
/obj/item/modular_computer/examine(var/mob/user)
/obj/item/modular_computer/examine(mob/user)
. = ..()
if(damage > broken_damage)
. += span_danger("It is heavily damaged!")
@@ -16,7 +16,7 @@
H.take_damage(rand(10,30))
qdel()
/obj/item/modular_computer/take_damage(var/amount, var/component_probability, var/damage_casing = 1, var/randomize = 1)
/obj/item/modular_computer/take_damage(amount, component_probability, damage_casing = 1, randomize = 1)
if(randomize)
// 75%-125%, rand() works with integers, apparently.
amount *= (rand(75, 125) / 100.0)
@@ -35,7 +35,7 @@
// Stronger explosions cause serious damage to internal components
// Minor explosions are mostly mitigitated by casing.
/obj/item/modular_computer/ex_act(var/severity)
/obj/item/modular_computer/ex_act(severity)
take_damage(rand(100,200) / severity, 30 / severity)
// EMPs are similar to explosions, but don't cause physical damage to the casing. Instead they screw up the components
@@ -48,7 +48,7 @@
// "Stun" weapons can cause minor damage to components (short-circuits?)
// "Burn" damage is equally strong against internal components and exterior casing
// "Brute" damage mostly damages the casing.
/obj/item/modular_computer/bullet_act(var/obj/item/projectile/Proj)
/obj/item/modular_computer/bullet_act(obj/item/projectile/Proj)
switch(Proj.damage_type)
if(BRUTE)
take_damage(Proj.damage, Proj.damage / 2)
@@ -1,5 +1,5 @@
// Attempts to install the hardware into apropriate slot.
/obj/item/modular_computer/proc/try_install_component(var/mob/living/user, var/obj/item/computer_hardware/H, var/found = 0)
/obj/item/modular_computer/proc/try_install_component(mob/living/user, obj/item/computer_hardware/H, found = 0)
// "USB" flash drive.
if(istype(H, /obj/item/computer_hardware/hard_drive/portable))
if(portable_drive)
@@ -57,7 +57,7 @@
update_verbs()
// Uninstalls component. Found and Critical vars may be passed by parent types, if they have additional hardware.
/obj/item/modular_computer/proc/uninstall_component(var/mob/living/user, var/obj/item/computer_hardware/H, var/found = 0, var/critical = 0)
/obj/item/modular_computer/proc/uninstall_component(mob/living/user, obj/item/computer_hardware/H, found = 0, critical = 0)
if(portable_drive == H)
portable_drive = null
found = 1
@@ -98,7 +98,7 @@
// Checks all hardware pieces to determine if name matches, if yes, returns the hardware piece, otherwise returns null
/obj/item/modular_computer/proc/find_hardware_by_name(var/name)
/obj/item/modular_computer/proc/find_hardware_by_name(name)
if(portable_drive && (portable_drive.name == name))
return portable_drive
if(hard_drive && (hard_drive.name == name))
@@ -97,7 +97,7 @@
uninstall_component(user, portable_drive)
update_uis()
/obj/item/modular_computer/attack_ghost(var/mob/observer/dead/user)
/obj/item/modular_computer/attack_ghost(mob/observer/dead/user)
if(enabled)
tgui_interact(user)
else if(check_rights_for(user.client, R_ADMIN|R_EVENT|R_DEBUG))
@@ -105,10 +105,10 @@
if(response == "Yes")
turn_on(user)
/obj/item/modular_computer/attack_ai(var/mob/user)
/obj/item/modular_computer/attack_ai(mob/user)
return attack_self(user)
/obj/item/modular_computer/attack_hand(var/mob/user)
/obj/item/modular_computer/attack_hand(mob/user)
if(anchored || ispAI(user))
return attack_self(user)
return ..()
@@ -134,7 +134,7 @@
return
turn_on(user)
/obj/item/modular_computer/attackby(var/obj/item/W, var/mob/user)
/obj/item/modular_computer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/card/id)) // ID Card, try to insert it.
var/obj/item/card/id/I = W
if(!card_slot)
@@ -1,4 +1,4 @@
/obj/item/modular_computer/proc/power_failure(var/malfunction = 0)
/obj/item/modular_computer/proc/power_failure(malfunction = 0)
if(enabled) // Shut down the computer
visible_message(span_danger("\The [src]'s screen flickers briefly and then goes dark."))
if(active_program)
@@ -8,7 +8,7 @@
shutdown_computer(0)
// Tries to use power from battery. Passing 0 as parameter results in this proc returning whether battery is functional or not.
/obj/item/modular_computer/proc/battery_power(var/power_usage = 0)
/obj/item/modular_computer/proc/battery_power(power_usage = 0)
apc_powered = FALSE
if(!battery_module || !battery_module.check_functionality() || battery_module.battery.charge <= 0)
return FALSE
@@ -23,7 +23,7 @@
..()
// Tries to use power from APC, if present.
/obj/item/modular_computer/proc/apc_power(var/power_usage = 0)
/obj/item/modular_computer/proc/apc_power(power_usage = 0)
apc_powered = TRUE
// Tesla link was originally limited to machinery only, but this probably works too, and the benefit of being able to power all devices from an APC outweights
// the possible minor performance loss.