Merge pull request #1186 from DragonTrance/character-change-warning

Let players know that savefile preferences got updated
This commit is contained in:
QuoteFox
2021-05-22 01:59:26 +01:00
committed by GitHub
2 changed files with 13 additions and 2 deletions
+2 -2
View File
@@ -633,8 +633,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
return 1
#undef SAVEFILE_VERSION_MAX
#undef SAVEFILE_VERSION_MIN
//#undef SAVEFILE_VERSION_MAX
//#undef SAVEFILE_VERSION_MIN
#ifdef TESTING
//DEBUG
+11
View File
@@ -32,3 +32,14 @@
else
postfix = "soon"
to_chat(src, "Please set up your character and select \"Ready\". The game will start [postfix].")
if(client.prefs.path) //Hyper edit: notify of a newer preference version
var/savefile/S = new /savefile(client.prefs.path)
if(S)
S.cd = "/"
var/slot
S["default_slot"] >> slot
if(slot)
S.cd = "/character[slot]"
if(S["version"] < SAVEFILE_VERSION_MAX)
to_chat(src, "<span class='redtext'>Your characters are outdated from recent updates. Please make sure if everything is within reasonable levels.</span>")