Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
Git-Nivrak committed Jun 28, 2024
1 parent 29d93a3 commit 23b4b6a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 7 additions & 5 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions code/_onclick/click_hold.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 23b4b6a

Please sign in to comment.