summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/files.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-22 20:04:08 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-22 20:04:08 +0000
commit9d966b8b823ace0c4d5312aae9aaff635ea5cc57 (patch)
tree68467cac2132074191ddbb5c7a3b0eeaa6a2ac5a /crawl-ref/source/files.cc
parenta34de2b319560dd0a2e75b16729df6cfaf9daa12 (diff)
downloadcrawl-ref-9d966b8b823ace0c4d5312aae9aaff635ea5cc57.tar.gz
crawl-ref-9d966b8b823ace0c4d5312aae9aaff635ea5cc57.zip
Better feedback on old saves/bones.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10019 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r--crawl-ref/source/files.cc22
1 files changed, 20 insertions, 2 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 4ea0bd5fee..8c77d28f48 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -1632,11 +1632,18 @@ void _load_ghost(void)
fclose(gfile);
+ // FIXME: This message will have to be shortened again as trunk reaches
+ // 0.6 state and players using old bones becomes increasingly less
+ // likely.
if (!debug_check_ghosts())
{
- mprf(MSGCH_DIAGNOSTICS, "Refusing to load buggy ghost from file \"%s\"! "
- "Please submit a bug report.",
+ mprf(MSGCH_DIAGNOSTICS,
+ "Refusing to load buggy ghost from file \"%s\"! "
+ "Note that all bones files from 0.4.x are invalid, so you should "
+ "delete them. If this is a newer ghost, please submit a bug "
+ "report.",
cha_fil.c_str());
+
return;
}
@@ -1864,6 +1871,17 @@ static bool _get_and_validate_version(FILE *restoreFile, char &major, char &mino
return (false);
}
+ // NOTE: This is a hacky replacement for what should have been caught
+ // by MAJOR_VERSION above. Once the next major version update happens
+ // (preferably when saves break with 0.5 -> 0.6) this check will need
+ // to be removed.
+ if (minor < TAG_MINOR_RELIGION)
+ {
+ *reason = "Sorry, but 0.4.x save and bones files are incompatible "
+ "with 0.5!";
+ return (false);
+ }
+
if (minor > TAG_MINOR_VERSION)
{
*reason = make_stringf("Minor version mismatch: %d (want <= %d).",