mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Fix mousepos runtime with esc (#91237)
## About The Pull Request esc manually calls keyup without mousepos ## Changelog 🆑 fix: fixed a runtime error with the escape menu /🆑 --------- Co-authored-by: TiviPlus <572233640+TiviPlus@users.noreply.com>
This commit is contained in:
committed by
Roxy
co-authored by
TiviPlus
parent
64edb08111
commit
9c1f0a2ab3
@@ -101,13 +101,15 @@
|
||||
calculate_move_dir()
|
||||
if(!movement_locked && !(next_move_dir_add & movement))
|
||||
next_move_dir_sub |= movement
|
||||
|
||||
var/list/click_data = get_loc_from_mousepos(mousepos_x, mousepos_y, sizex, sizey, src)
|
||||
var/list/click_data
|
||||
//manual calls of keyup
|
||||
if(mousepos_x && mousepos_y)
|
||||
click_data = get_loc_from_mousepos(mousepos_x, mousepos_y, sizex, sizey, src)
|
||||
// We don't do full key for release, because for mod keys you
|
||||
// can hold different keys and releasing any should be handled by the key binding specifically
|
||||
for (var/kb_name in prefs.key_bindings_by_key[_key])
|
||||
var/datum/keybinding/kb = GLOB.keybindings_by_name[kb_name]
|
||||
if(kb.can_use(src) && kb.up(src, click_data[1]))
|
||||
if(kb.can_use(src) && kb.up(src, click_data?[1]))
|
||||
break
|
||||
holder?.key_up(_key, src)
|
||||
mob.focus?.key_up(_key, src)
|
||||
|
||||
Reference in New Issue
Block a user