mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
Rebindable Hotkeys (#12138)
* demodularize interface * keybindings * binds * prefs * loose ends * globals * changes * s * datum ref lists * ok * fixes * fixes * fix * ok * sigh * sigh * indicators * let's play the move code around game * let's play the i didn't comma my lists game * let's play the indent game * let's play hte spelling bee * let's fail the spelling bee * LET'S PLAY THe HOW HARd IS IT TO SPELL A PROC GAME * let's play the bugfix game * bugfixes * improvements * Update bindings_client.dm * pixel shift * A * wups
This commit is contained in:
@@ -265,6 +265,9 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
else
|
||||
prefs = new /datum/preferences(src)
|
||||
GLOB.preferences_datums[ckey] = prefs
|
||||
if(SSinput.initialized)
|
||||
set_macros()
|
||||
update_movement_keys(prefs)
|
||||
|
||||
prefs.last_ip = address //these are gonna be used for banning
|
||||
prefs.last_id = computer_id //these are gonna be used for banning
|
||||
@@ -328,9 +331,6 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(SSinput.initialized)
|
||||
set_macros()
|
||||
|
||||
chatOutput.start() // Starts the chat
|
||||
|
||||
if(alert_mob_dupe_login)
|
||||
@@ -892,6 +892,23 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
y = clamp(y+change, min,max)
|
||||
change_view("[x]x[y]")
|
||||
|
||||
/client/proc/update_movement_keys(datum/preferences/direct_prefs)
|
||||
var/datum/preferences/D = prefs || direct_prefs
|
||||
if(!D?.key_bindings)
|
||||
return
|
||||
movement_keys = list()
|
||||
for(var/key in D.key_bindings)
|
||||
for(var/kb_name in D.key_bindings[key])
|
||||
switch(kb_name)
|
||||
if("North")
|
||||
movement_keys[key] = NORTH
|
||||
if("East")
|
||||
movement_keys[key] = EAST
|
||||
if("West")
|
||||
movement_keys[key] = WEST
|
||||
if("South")
|
||||
movement_keys[key] = SOUTH
|
||||
|
||||
/client/proc/change_view(new_size)
|
||||
if (isnull(new_size))
|
||||
CRASH("change_view called without argument.")
|
||||
|
||||
Reference in New Issue
Block a user