mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-27 18:51:53 +00:00
* Port /tg/ move manager, drift and jetpack components. * don't add go through newtonian movement if not moved to a turf * various cleans for blood drifts and mob speed * fix slow meteors * why on fuck's earth aren't speedbikes vehicles * style lint * also wtf * okay i'm an idiot * fix meaty ore speed and blood decal double stepping * fix not unbuckling pulled object occupants * don't bother dealing with immovable rods just yet * exclude bubblegum and vetus from move manager for now * fix issues related to null weightless blood icons * reset blood icon state properly * fuck it, we'll deal with mobs when basic mobs happen * break infinite loop in decal splat
30 lines
1.1 KiB
Plaintext
30 lines
1.1 KiB
Plaintext
/client/proc/update_active_keybindings()
|
|
active_keybindings = list()
|
|
movement_kb_dirs = list()
|
|
|
|
for(var/key in prefs?.keybindings)
|
|
for(var/kb in prefs.keybindings[key])
|
|
var/datum/keybinding/KB = kb
|
|
if(!KB.can_use(src, mob))
|
|
continue
|
|
if(istype(KB, /datum/keybinding/movement))
|
|
var/datum/keybinding/movement/KBM = KB
|
|
movement_kb_dirs[key] = KBM.move_dir
|
|
else
|
|
active_keybindings[key] += list(KB)
|
|
if(!mob) // Clients can join before world/new is setup, so we gotta mob check em
|
|
return active_keybindings
|
|
for(var/atom/movable/screen/movable/action_button/button as anything in mob.hud_used.get_all_action_buttons())
|
|
// TODO VERIFY THIS (AND KEYBINDS) WORK PROPERLY
|
|
if(button.linked_keybind?.binded_to)
|
|
var/datum/keybinding/mob/trigger_action_button/linked_bind = button.linked_keybind
|
|
active_keybindings[linked_bind.binded_to] += list(linked_bind)
|
|
|
|
return active_keybindings
|
|
|
|
/client/proc/calculate_move_dir()
|
|
. = NONE
|
|
for(var/held_key in input_data.keys_held)
|
|
if(held_key in movement_kb_dirs)
|
|
. |= movement_kb_dirs[held_key]
|