From 23b4b6a8783f457ee956c14682e57ff911928131 Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Fri, 28 Jun 2024 13:45:17 +0300 Subject: [PATCH 1/2] a --- code/_onclick/click.dm | 12 +++++++----- code/_onclick/click_hold.dm | 3 +++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 57c529c7a156..e33f44d36398 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -17,12 +17,13 @@ ~ BMC777 */ -/client/Click(atom/A, location, control, params) +/client/Click(atom/A, location, control, params, mouse_down=FALSE) + to_world("Mouse Down: [mouse_down] Ignore Next Click: [ignore_next_click]") if (control && !ignore_next_click) // No .click macros allowed, and only one click per mousedown. ignore_next_click = TRUE - return usr.do_click(A, location, params) + return usr.do_click(A, location, params, mouse_down) -/mob/proc/do_click(atom/A, location, params) +/mob/proc/do_click(atom/A, location, params, mouse_down) // We'll be sending a lot of signals and things later on, this will save time. if(!client) return @@ -130,9 +131,10 @@ return next_move = world.time - // If standing next to the atom clicked. + // Ontop or right next to us if(A.Adjacent(src)) - click_adjacent(A, W, mods) + if(mouse_down) + click_adjacent(A, W, mods) return // If not standing next to the atom clicked. diff --git a/code/_onclick/click_hold.dm b/code/_onclick/click_hold.dm index 41e2be147d85..a1f27a12e864 100644 --- a/code/_onclick/click_hold.dm +++ b/code/_onclick/click_hold.dm @@ -55,6 +55,9 @@ Click(A, T, skin_ctl, params) + if(A.Adjacent(mob)) + Click(A, T, skin_ctl, params, TRUE) + /client/MouseUp(atom/A, turf/T, skin_ctl, params) if(!A) return From ffc68d102aaa6d21d955e47867f1cf9fea810f64 Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Sat, 29 Jun 2024 07:03:06 +0300 Subject: [PATCH 2/2] Update code/_onclick/click.dm Co-authored-by: Doubleumc --- code/_onclick/click.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index e33f44d36398..2ac6bcd2b375 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -18,7 +18,6 @@ */ /client/Click(atom/A, location, control, params, mouse_down=FALSE) - to_world("Mouse Down: [mouse_down] Ignore Next Click: [ignore_next_click]") if (control && !ignore_next_click) // No .click macros allowed, and only one click per mousedown. ignore_next_click = TRUE return usr.do_click(A, location, params, mouse_down)