Files
Bubberstation/code/_onclick
LemonInTheDark bd9f9e81de Adds logic to provide leniency for drag clicks (#71082)
## About The Pull Request

Ok so like, in byond. if you click on something and release the click
without moving off its sprite, that counts as a "click"

If you however move your mouse off its sprite, or it does so on its own,
any further releases count as dragdrops.

We already have logic for catching drag -> mouse back over sprite. The
code I'm adding here basically is just a bit nicer about how exact you
need to be

I'm adding tweakable values for how much your mouse is allowed to move
(This isn't perfect currently, since if the target itself moves we don't
care, need to work on this) in a short time period. If you meet these
cases, we instead call it a click.

They're globs for now cause I don't have a good feel for em, will tweak
over time. I want to reduce dumb clickspam and click dragging moving
mobs/drifting items by accident.

Oh also fixed a bug in ai behaviors that came from not knowing what
get_active_hand did

Fixes a monkey behavior of using their held item

It turns out it never worked, and the only reason it didn't runtime was
because of an if() check that got passed the result of an invalid proc
call. this fixes that

## Why It's Good For The Game

Spam clicking and drag clicking are stupid. they should be less stupid

## Changelog
🆑
add: Adds a grace period for hit detection, between clicking ON someone,
and then moving your mouse off before releasing the click. It's short,
hopefully it helps with stupid
/🆑
2022-12-12 23:04:59 -08:00
..
2022-11-15 03:50:11 +00:00
2022-07-24 16:18:59 +01:00
2022-11-07 16:22:37 -08:00