From 9d966b8b823ace0c4d5312aae9aaff635ea5cc57 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 22 Jun 2009 20:04:08 +0000 Subject: 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 --- crawl-ref/source/files.cc | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/files.cc') 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).", -- cgit v1.2.3-54-g00ecf