let's play the optimization game featuring lighting (#12310)
* debug proc * kinda quirky * let's play the lighting game * let's play the macro game * let's play the refactor game * let's play the optimization game * let's play the optimization game x2 * yeehaw * e * let's play the memory game * fix * lighting fix * sanitization and checks * mh * hotkeys fix * ok
This commit is contained in:
@@ -317,8 +317,23 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
no_tetris_storage = sanitize_integer(no_tetris_storage, 0, 1, initial(no_tetris_storage))
|
||||
key_bindings = sanitize_islist(key_bindings, list())
|
||||
|
||||
verify_keybindings_valid() // one of these days this will runtime and you'll be glad that i put it in a different proc so no one gets their saves wiped
|
||||
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/verify_keybindings_valid()
|
||||
// Sanitize the actual keybinds to make sure they exist.
|
||||
for(var/key in key_bindings)
|
||||
if(!islist(key_bindings[key]))
|
||||
key_bindings -= key
|
||||
var/list/binds = key_bindings[key]
|
||||
for(var/bind in binds)
|
||||
if(!GLOB.keybindings_by_name[bind])
|
||||
binds -= bind
|
||||
if(!length(binds))
|
||||
key_bindings -= key
|
||||
// End
|
||||
|
||||
/datum/preferences/proc/save_preferences()
|
||||
if(!path)
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user