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
@@ -265,7 +265,7 @@
// Attept to load materials. Returns 0 if item wasn't a stack of materials, otherwise 1 (even if failed to load)
/obj/machinery/atmospherics/binary/algae_farm/proc/try_load_materials(var/mob/user, var/obj/item/stack/material/S)
/obj/machinery/atmospherics/binary/algae_farm/proc/try_load_materials(mob/user, obj/item/stack/material/S)
if(!istype(S))
return 0
if(!(S.material.name in stored_material))
@@ -63,7 +63,7 @@
air1.volume = ATMOS_DEFAULT_VOLUME_PUMP + 800
air2.volume = ATMOS_DEFAULT_VOLUME_PUMP + 800
/obj/machinery/atmospherics/binary/dp_vent_pump/update_icon(var/safety = 0)
/obj/machinery/atmospherics/binary/dp_vent_pump/update_icon(safety = 0)
cut_overlays()
var/vent_icon = "vent"
@@ -100,7 +100,7 @@
else
add_underlay(T, node2, dir)
/obj/machinery/atmospherics/binary/dp_vent_pump/hide(var/i)
/obj/machinery/atmospherics/binary/dp_vent_pump/hide(i)
update_icon()
update_underlays()
@@ -50,7 +50,7 @@
add_underlay(T, node1, turn(dir, 180))
add_underlay(T, node2, dir)
/obj/machinery/atmospherics/binary/passive_gate/hide(var/i)
/obj/machinery/atmospherics/binary/passive_gate/hide(i)
update_underlays()
/obj/machinery/atmospherics/binary/passive_gate/process()
@@ -275,7 +275,7 @@
update_icon()
add_fingerprint(ui.user)
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/binary/passive_gate/attackby(obj/item/W as obj, mob/user as mob)
if (!W.has_tool_quality(TOOL_WRENCH))
return ..()
if (unlocked)
@@ -88,7 +88,7 @@ Thus, the two variables affect pump operation are set in New():
add_underlay(T, node1, turn(dir, -180), node1?.icon_connect_type)
add_underlay(T, node2, dir, node2?.icon_connect_type)
/obj/machinery/atmospherics/binary/pump/hide(var/i)
/obj/machinery/atmospherics/binary/pump/hide(i)
update_underlays()
/obj/machinery/atmospherics/binary/pump/process()
@@ -236,7 +236,7 @@ Thus, the two variables affect pump operation are set in New():
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/binary/pump/attackby(obj/item/W as obj, mob/user as mob)
if (!W.has_tool_quality(TOOL_WRENCH))
return ..()
if (!(stat & NOPOWER) && use_power)
@@ -96,7 +96,7 @@ Thus, the two variables affect pump operation are set in New():
add_underlay(T, node1, turn(dir, -180), node1?.icon_connect_type)
add_underlay(T, node2, dir, node2?.icon_connect_type)
/obj/machinery/atmospherics/binary/volume_pump/hide(var/i)
/obj/machinery/atmospherics/binary/volume_pump/hide(i)
update_underlays()
/obj/machinery/atmospherics/binary/volume_pump/process()
@@ -260,7 +260,7 @@ Thus, the two variables affect pump operation are set in New():
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/binary/volume_pump/attackby(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/binary/volume_pump/attackby(obj/item/W as obj, mob/user as mob)
if (W.has_tool_quality(TOOL_WRENCH))
wrench_act(W, user)
@@ -277,7 +277,7 @@ Thus, the two variables affect pump operation are set in New():
. += "Its warning light is on[use_power ? " and it's spewing gas!" : "."]"
/obj/machinery/atmospherics/binary/volume_pump/proc/wrench_act(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/binary/volume_pump/proc/wrench_act(obj/item/W as obj, mob/user as mob)
if (!(stat & NOPOWER) && use_power)
to_chat(user, span_warning("You cannot unwrench this [src], turn it off first."))
return TRUE
@@ -294,7 +294,7 @@ Thus, the two variables affect pump operation are set in New():
"You hear ratchet.")
atom_deconstruct()
/obj/machinery/atmospherics/binary/volume_pump/proc/multitool_act(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/binary/volume_pump/proc/multitool_act(obj/item/W as obj, mob/user as mob)
if(!overclocked)
overclocked = TRUE
to_chat(user, span_notice("The pump makes a grinding noise and air starts to hiss out as you disable its pressure limits."))
@@ -31,7 +31,7 @@
var/obj/machinery/atmospherics/node
var/datum/pipe_network/network
/datum/omni_port/New(var/obj/machinery/atmospherics/omni/M, var/direction = NORTH)
/datum/omni_port/New(obj/machinery/atmospherics/omni/M, direction = NORTH)
..()
dir = direction
if(istype(M))
@@ -61,7 +61,7 @@
//returns a text string based on the direction flag input
// if capitalize is true, it will return the string capitalized
// otherwise it will return the direction string in lower case
/proc/dir_name(var/dir, var/capitalize = 0)
/proc/dir_name(dir, capitalize = 0)
var/string = null
switch(dir)
if(NORTH)
@@ -80,7 +80,7 @@
//returns a direction flag based on the string passed to it
// case insensitive
/proc/dir_flag(var/dir)
/proc/dir_flag(dir)
dir = lowertext(dir)
switch(dir)
if("north")
@@ -94,7 +94,7 @@
else
return 0
/proc/mode_to_gasid(var/mode)
/proc/mode_to_gasid(mode)
switch(mode)
if(ATM_O2)
return GAS_O2
@@ -137,7 +137,7 @@
return data
/obj/machinery/atmospherics/omni/atmos_filter/proc/mode_send_switch(var/mode = ATM_NONE)
/obj/machinery/atmospherics/omni/atmos_filter/proc/mode_send_switch(mode = ATM_NONE)
switch(mode)
if(ATM_O2)
return GASNAME_O2
@@ -192,7 +192,7 @@
update_icon()
/obj/machinery/atmospherics/omni/atmos_filter/proc/mode_return_switch(var/mode)
/obj/machinery/atmospherics/omni/atmos_filter/proc/mode_return_switch(mode)
switch(mode)
if(GASNAME_O2)
return ATM_O2
@@ -215,7 +215,7 @@
else
return null
/obj/machinery/atmospherics/omni/atmos_filter/proc/switch_filter(var/dir, var/mode)
/obj/machinery/atmospherics/omni/atmos_filter/proc/switch_filter(dir, mode)
//check they aren't trying to disable the input or output ~this can only happen if they hack the cached tmpl file
for(var/datum/omni_port/P in ports)
if(P.dir == dir)
@@ -224,7 +224,7 @@
switch_mode(dir, mode)
/obj/machinery/atmospherics/omni/atmos_filter/proc/switch_mode(var/port, var/mode)
/obj/machinery/atmospherics/omni/atmos_filter/proc/switch_mode(port, mode)
if(mode == null || !port)
return
var/datum/omni_port/target_port = null
@@ -263,7 +263,7 @@
if(gasid)
filtering_outputs[gasid] = P.air
/obj/machinery/atmospherics/omni/atmos_filter/proc/handle_port_change(var/datum/omni_port/P)
/obj/machinery/atmospherics/omni/atmos_filter/proc/handle_port_change(datum/omni_port/P)
switch(P.mode)
if(ATM_NONE)
initialize_directions &= ~P.dir
@@ -204,7 +204,7 @@
update_icon()
/obj/machinery/atmospherics/omni/mixer/proc/switch_mode(var/port = NORTH, var/mode = ATM_NONE)
/obj/machinery/atmospherics/omni/mixer/proc/switch_mode(port = NORTH, mode = ATM_NONE)
if(mode != ATM_INPUT && mode != ATM_OUTPUT)
switch(mode)
if("in")
@@ -244,7 +244,7 @@
update_ports()
rebuild_mixing_inputs()
/obj/machinery/atmospherics/omni/mixer/proc/change_concentration(var/port = NORTH, mob/user)
/obj/machinery/atmospherics/omni/mixer/proc/change_concentration(port = NORTH, mob/user)
tag_north_con = null
tag_south_con = null
tag_east_con = null
@@ -292,7 +292,7 @@
for(var/datum/omni_port/P in inputs)
mixing_inputs[P.air] = P.concentration
/obj/machinery/atmospherics/omni/mixer/proc/con_lock(var/port = NORTH)
/obj/machinery/atmospherics/omni/mixer/proc/con_lock(port = NORTH)
for(var/datum/omni_port/P in inputs)
if(P.dir == port)
P.con_lock = !P.con_lock
@@ -80,7 +80,7 @@
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/omni/attackby(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/omni/attackby(obj/item/W as obj, mob/user as mob)
if(!W.has_tool_quality(TOOL_WRENCH))
return ..()
@@ -154,7 +154,7 @@
update_icon()
/obj/machinery/atmospherics/omni/proc/select_port_icons(var/datum/omni_port/P)
/obj/machinery/atmospherics/omni/proc/select_port_icons(datum/omni_port/P)
if(!istype(P))
return
@@ -194,7 +194,7 @@
P.update = 1
update_ports()
/obj/machinery/atmospherics/omni/hide(var/i)
/obj/machinery/atmospherics/omni/hide(i)
update_underlays()
/obj/machinery/atmospherics/omni/proc/update_ports()
@@ -49,7 +49,7 @@
return
add_underlay(T, node, dir, node?.icon_connect_type)
/obj/machinery/atmospherics/portables_connector/hide(var/i)
/obj/machinery/atmospherics/portables_connector/hide(i)
update_underlays()
/obj/machinery/atmospherics/portables_connector/process()
@@ -146,7 +146,7 @@
return null
/obj/machinery/atmospherics/portables_connector/attackby(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/portables_connector/attackby(obj/item/W as obj, mob/user as mob)
if (!W.has_tool_quality(TOOL_WRENCH))
return ..()
if (connected_device)
+3 -3
View File
@@ -14,7 +14,7 @@ GLOBAL_LIST_EMPTY(shutoff_valves)
/obj/machinery/atmospherics/valve/shutoff/update_icon()
icon_state = "vclamp[open]"
/obj/machinery/atmospherics/valve/shutoff/examine(var/mob/user)
/obj/machinery/atmospherics/valve/shutoff/examine(mob/user)
. = ..()
. += "The automatic shutoff circuit is [close_on_leaks ? "enabled" : "disabled"]."
@@ -31,7 +31,7 @@ GLOBAL_LIST_EMPTY(shutoff_valves)
/obj/machinery/atmospherics/valve/shutoff/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/atmospherics/valve/shutoff/attack_hand(var/mob/user)
/obj/machinery/atmospherics/valve/shutoff/attack_hand(mob/user)
src.add_fingerprint(user)
update_icon(1)
close_on_leaks = !close_on_leaks
@@ -39,7 +39,7 @@ GLOBAL_LIST_EMPTY(shutoff_valves)
return TRUE
// Alt+Click now toggles the open/close function, when the autoseal is disabled
/obj/machinery/atmospherics/valve/shutoff/click_alt(var/mob/user)
/obj/machinery/atmospherics/valve/shutoff/click_alt(mob/user)
if(isliving(user))
if(close_on_leaks)
to_chat(user, "You try to manually [open ? "close" : "open"] the valve, but it [open ? "opens" : "closes"] automatically again.")
@@ -21,7 +21,7 @@
//node 3 is the outlet, nodes 1 & 2 are intakes
/obj/machinery/atmospherics/trinary/mixer/update_icon(var/safety = 0)
/obj/machinery/atmospherics/trinary/mixer/update_icon(safety = 0)
if(tee)
icon_state = "t"
else if(mirrored)
@@ -42,7 +42,7 @@
add_underlay(T, node2, node_connects[2])
add_underlay(T, node3, node_connects[3])
/obj/machinery/atmospherics/trinary/hide(var/i)
/obj/machinery/atmospherics/trinary/hide(i)
update_underlays()
/obj/machinery/atmospherics/trinary/power_change()
@@ -51,7 +51,7 @@
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/trinary/attackby(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/trinary/attackby(obj/item/W as obj, mob/user as mob)
if (!W.has_tool_quality(TOOL_WRENCH))
return ..()
if(!can_unwrench())
@@ -195,7 +195,7 @@
// Trinary init_dir() logic in a separate proc so it can be referenced from "trinary-ish" places like T-Valves
// TODO - Someday refactor those places under atmospherics/trinary
/proc/get_initialize_directions_trinary(var/dir, var/mirrored = FALSE, var/tee = FALSE)
/proc/get_initialize_directions_trinary(dir, mirrored = FALSE, tee = FALSE)
if(tee)
switch(dir)
if(NORTH)
@@ -228,7 +228,7 @@
return WEST|NORTH|EAST
// Trinary get_node_connect_dirs() logic in a separate proc so it can be referenced from "trinary-ish" places like T-Valves
/proc/get_node_connect_dirs_trinary(var/dir, var/mirrored = FALSE, var/tee = FALSE)
/proc/get_node_connect_dirs_trinary(dir, mirrored = FALSE, tee = FALSE)
var/node1_connect
var/node2_connect
var/node3_connect
+2 -2
View File
@@ -44,7 +44,7 @@
add_underlay(T, node2, node_connects[2])
add_underlay(T, node3, node_connects[3])
/obj/machinery/atmospherics/tvalve/hide(var/i)
/obj/machinery/atmospherics/tvalve/hide(i)
update_underlays()
/obj/machinery/atmospherics/tvalve/init_dir()
@@ -326,7 +326,7 @@
else
go_to_side()
/obj/machinery/atmospherics/tvalve/attackby(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/tvalve/attackby(obj/item/W as obj, mob/user as mob)
if (!W.has_tool_quality(TOOL_WRENCH))
return ..()
if(!can_unwrench())
@@ -171,11 +171,11 @@
air_contents.volume = max(initial(internal_volume) - 200, 0) + 200 * bin_rating
set_power_level(power_setting)
/obj/machinery/atmospherics/unary/freezer/proc/set_power_level(var/new_power_setting)
/obj/machinery/atmospherics/unary/freezer/proc/set_power_level(new_power_setting)
power_setting = new_power_setting
power_rating = max_power_rating * (power_setting/100)
/obj/machinery/atmospherics/unary/freezer/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/machinery/atmospherics/unary/freezer/attackby(obj/item/O as obj, mob/user as mob)
if(default_deconstruction_screwdriver(user, O))
return
if(default_deconstruction_crowbar(user, O))
@@ -70,7 +70,7 @@
return 1
/obj/machinery/atmospherics/unary/heat_exchanger/attackby(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/unary/heat_exchanger/attackby(obj/item/W as obj, mob/user as mob)
if (!W.has_tool_quality(TOOL_WRENCH))
return ..()
var/turf/T = src.loc
@@ -163,11 +163,11 @@
heating_efficiency = max(initial(heating_efficiency), (laser_rating-1))
set_power_level(power_setting)
/obj/machinery/atmospherics/unary/heater/proc/set_power_level(var/new_power_setting)
/obj/machinery/atmospherics/unary/heater/proc/set_power_level(new_power_setting)
power_setting = new_power_setting
power_rating = max_power_rating * (power_setting/100)
/obj/machinery/atmospherics/unary/heater/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/machinery/atmospherics/unary/heater/attackby(obj/item/O as obj, mob/user as mob)
if(default_deconstruction_screwdriver(user, O))
return
if(default_deconstruction_crowbar(user, O))
@@ -152,7 +152,7 @@
broadcast_status()
update_icon()
/obj/machinery/atmospherics/unary/outlet_injector/hide(var/i)
/obj/machinery/atmospherics/unary/outlet_injector/hide(i)
update_underlays()
/obj/machinery/atmospherics/unary/outlet_injector/attack_hand(mob/user as mob)
@@ -161,7 +161,7 @@
update_use_power(injecting ? USE_POWER_IDLE : USE_POWER_OFF)
update_icon()
/obj/machinery/atmospherics/unary/outlet_injector/attackby(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/unary/outlet_injector/attackby(obj/item/W as obj, mob/user as mob)
if (W.has_tool_quality(TOOL_MULTITOOL))
var/list/options = list("Frequency", "ID Tag", "-SAVE TO BUFFER-", "Cancel")
var/answer = tgui_alert(user, "[src] has an ID of \"[id]\" and a frequency of [frequency]. What would you like to change?", "Options!", options)
@@ -145,7 +145,7 @@
. = ..()
air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP + 500 //meant to match air injector
/obj/machinery/atmospherics/unary/vent_pump/update_icon(var/safety = 0)
/obj/machinery/atmospherics/unary/vent_pump/update_icon(safety = 0)
cut_overlays()
var/vent_icon = "vent"
@@ -421,7 +421,7 @@
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/unary/vent_pump/attackby(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/unary/vent_pump/attackby(obj/item/W as obj, mob/user as mob)
if (!W.has_tool_quality(TOOL_WRENCH))
return ..()
if (!(stat & NOPOWER) && use_power)
@@ -56,7 +56,7 @@
initial_loc.air_scrub_names -= id_tag
return ..()
/obj/machinery/atmospherics/unary/vent_scrubber/update_icon(var/safety = 0)
/obj/machinery/atmospherics/unary/vent_scrubber/update_icon(safety = 0)
cut_overlays()
var/scrubber_icon = "scrubber"
@@ -173,7 +173,7 @@
return 1
/obj/machinery/atmospherics/unary/vent_scrubber/hide(var/i) //to make the little pipe section invisible, the icon changes.
/obj/machinery/atmospherics/unary/vent_scrubber/hide(i) //to make the little pipe section invisible, the icon changes.
update_icon()
update_underlays()
@@ -270,7 +270,7 @@
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(obj/item/W as obj, mob/user as mob)
if(W.has_tool_quality(TOOL_WELDER))
var/obj/item/weldingtool/WT = W
if (WT.remove_fuel(0,user))
+2 -2
View File
@@ -37,7 +37,7 @@
add_underlay(T, node1, get_dir(src, node1))
add_underlay(T, node2, get_dir(src, node2))
/obj/machinery/atmospherics/valve/hide(var/i)
/obj/machinery/atmospherics/valve/hide(i)
update_underlays()
/obj/machinery/atmospherics/valve/init_dir()
@@ -287,7 +287,7 @@
else
open()
/obj/machinery/atmospherics/valve/attackby(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/valve/attackby(obj/item/W as obj, mob/user as mob)
if (!W.has_tool_quality(TOOL_WRENCH))
return ..()
if (istype(src, /obj/machinery/atmospherics/valve/digital) && !src.allowed(user))