From 153c5c0ca66bd0943889f02360e141c6fa8a25eb Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 19 Jul 2023 21:29:48 +0200 Subject: [PATCH] [MIRROR] Terminals will be on the same layer as their APC/SMES by default & Selecting a layer when constructing an APC terminal now works. [MDB IGNORE] (#22591) * Terminals will be on the same layer as their APC/SMES by default & Selecting a layer when constructing an APC terminal now works. (#76784) ## About The Pull Request Terminals built on APCs and SMES units using left click will now be on the same layer as the machine they're being built for, instead of the first layer. They can still be built on other layers using right click and that feature will now work for APCs, not just SMES units (it was seemingly forgotten to actually use the argument of the make_terminal() function.) ## Why It's Good For The Game It is far more intuitive this way, and makes building terminals generally more convenient. The fix in the case of APCs is good simply by virtue of being a fix. ## Changelog :cl: qol: terminals built by left-clicking on SMES and APC units will now be on the same layer as the machine. fix: constructing a terminal on a specific layer with right-click now works for APCs, not just SMES units /:cl: * Terminals will be on the same layer as their APC/SMES by default & Selecting a layer when constructing an APC terminal now works. --------- Co-authored-by: A miscellaneous Fern <80640114+FernandoJ8@users.noreply.github.com> --- code/modules/power/apc/apc_attack.dm | 2 +- code/modules/power/apc/apc_power_proc.dm | 4 ++-- code/modules/power/smes.dm | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/power/apc/apc_attack.dm b/code/modules/power/apc/apc_attack.dm index 1976c4b1acb..af922d84b91 100644 --- a/code/modules/power/apc/apc_attack.dm +++ b/code/modules/power/apc/apc_attack.dm @@ -61,7 +61,7 @@ balloon_alert(user, "need ten lengths of cable!") return - var/terminal_cable_layer = CABLE_LAYER_1 + var/terminal_cable_layer if(LAZYACCESS(params2list(params), RIGHT_CLICK)) var/choice = tgui_input_list(user, "Select Power Input Cable Layer", "Select Cable Layer", GLOB.cable_name_to_layer) if(isnull(choice)) diff --git a/code/modules/power/apc/apc_power_proc.dm b/code/modules/power/apc/apc_power_proc.dm index ecea1734608..b49c0ba0a74 100644 --- a/code/modules/power/apc/apc_power_proc.dm +++ b/code/modules/power/apc/apc_power_proc.dm @@ -7,11 +7,11 @@ if(terminal) terminal.connect_to_network() -/obj/machinery/power/apc/proc/make_terminal(terminal_cable_layer) +/obj/machinery/power/apc/proc/make_terminal(terminal_cable_layer = cable_layer) // create a terminal object at the same position as original turf loc // wires will attach to this terminal = new/obj/machinery/power/terminal(loc) - terminal.cable_layer = cable_layer + terminal.cable_layer = terminal_cable_layer terminal.setDir(dir) terminal.master = src diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index a6e45c848f6..f6a8ddfe99c 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -134,7 +134,7 @@ to_chat(user, span_warning("You need more wires!")) return - var/terminal_cable_layer = CABLE_LAYER_1 + var/terminal_cable_layer if(LAZYACCESS(params2list(params), RIGHT_CLICK)) var/choice = tgui_input_list(user, "Select Power Input Cable Layer", "Select Cable Layer", GLOB.cable_name_to_layer) if(isnull(choice)) @@ -205,7 +205,7 @@ // create a terminal object pointing towards the SMES // wires will attach to this -/obj/machinery/power/smes/proc/make_terminal(turf/T, terminal_cable_layer) +/obj/machinery/power/smes/proc/make_terminal(turf/T, terminal_cable_layer = cable_layer) terminal = new/obj/machinery/power/terminal(T) terminal.cable_layer = terminal_cable_layer terminal.setDir(get_dir(T,src))