From 235454b5f367b66f3132aba840a22dc6c6fc6717 Mon Sep 17 00:00:00 2001 From: Kugamo Date: Sat, 9 Jul 2022 11:41:01 -0500 Subject: [PATCH] Alt Click 2 Rotate Pipes (#18184) * Commit Comment * god damned ghosts * hal9000PR Request removed base desc, it isnt shown usually but with the .=..() call in the new examine proc def in /obj/item/pipe/ it starts using that desc for examine on any pipe. Getting rid of it necessary. * Farie82 Suggestions * Bruh Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com> * SteelSlayer Suggestion Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com> Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> --- code/game/machinery/pipe/construction.dm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index f8e94480465..aa0d1939915 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -3,7 +3,6 @@ /obj/item/pipe name = "pipe" - desc = "A pipe" var/pipe_type = 0 var/pipename var/connect_types[] = list(1) //1=regular, 2=supply, 3=scrubber @@ -151,6 +150,10 @@ else return ..() +/obj/item/pipe/examine(mob/user) + . = ..() + . += "Alt-click it to rotate, Alt-Shift-click it to flip!" + /obj/item/pipe/proc/update(obj/machinery/atmospherics/make_from) name = "[get_pipe_name(pipe_type, PIPETYPE_ATMOS)] fitting" icon_state = get_pipe_icon(pipe_type) @@ -560,3 +563,13 @@ our_rpd.delete_single_pipe(user, src) else ..() + +/obj/item/pipe/AltClick(mob/user) + if(user.incapacitated() || !user.Adjacent(src)) + return + rotate() + +/obj/item/pipe/AltShiftClick(mob/user) + if(user.incapacitated() || !user.Adjacent(src)) + return + flip()