[MIRROR] Fixes pipe layer and rotation actions interfering [MDB IGNORE] (#9733)

* Fixes pipe layer and rotation actions interfering (#63059)

Currently, attempting to left + alt click a pipe or pipe accessory will both rotate and change the layer the pipe sits on in the same click. This changes the layer swapping to occur on right + alt click while leaving the rotation action to a left + alt click.

Fixes #62809 (and improves atmospherics game-play):
    try and rotate a pipe with alt click
    it changes its layer too
    be sad

* Fixes pipe layer and rotation actions interfering

Co-authored-by: HarseTheef <74737391+HarseTheef@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-11-26 20:49:05 -05:00
committed by GitHub
co-authored by HarseTheef
parent 3887794863
commit aa6fa4e498
+3 -3
View File
@@ -302,10 +302,10 @@ Buildable meters
/obj/item/pipe/examine(mob/user)
. = ..()
. += span_notice("The pipe layer is set to [piping_layer].")
. += span_notice("You can change the pipe layer by Alt-Clicking the device.")
. += span_notice("You can rotate it by using it in hand.")
. += span_notice("You can change the pipe layer by Alt-Right-Clicking the device.")
. += span_notice("You can rotate it by using it in hand or by Alt-Left-Clicking the device.")
/obj/item/pipe/AltClick(mob/user)
/obj/item/pipe/alt_click_secondary(mob/user)
. = ..()
var/layer_to_set = (piping_layer >= PIPING_LAYER_MAX) ? PIPING_LAYER_MIN : (piping_layer + 1)
set_piping_layer(layer_to_set)