Block movement now locks turning, migrate old save files to Ctrl (#53871)

The block movement key now correctly locks turning like it used to.

Old save files are now migrated to Ctrl if they didn't bind it to anything before. This correctly replicates the old behavior.
This commit is contained in:
Jared-Fogle
2020-09-23 03:42:41 -03:00
committed by GitHub
parent d42822c7b4
commit 78b79aef36
2 changed files with 31 additions and 14 deletions
+15 -1
View File
@@ -5,7 +5,7 @@
// You do not need to raise this if you are adding new values that have sane defaults.
// Only raise this value when changing the meaning/format/name/layout of an existing value
// where you would want the updater procs below to run
#define SAVEFILE_VERSION_MAX 37
#define SAVEFILE_VERSION_MAX 38
/*
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
@@ -73,6 +73,20 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
if(clientfps == 0)
clientfps = -1
if (current_version < 38)
var/found_block_movement = FALSE
for (var/list/key in key_bindings)
for (var/bind in key)
if (bind == "block_movement")
found_block_movement = TRUE
break
if (found_block_movement)
break
if (!found_block_movement)
LAZYADD(key_bindings["Ctrl"], "block_movement")
/datum/preferences/proc/update_character(current_version, savefile/S)
return