diff options
author | rubidium <rubidium@openttd.org> | 2012-12-29 10:35:33 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2012-12-29 10:35:33 +0000 |
commit | 945469f9933d8b891cbbddc539f0b9a127540b1d (patch) | |
tree | b36c4ac4d36bed12c8aeecbd5bfbcdfe33d13801 /src | |
parent | 745d71a6326827aa4d11dd24e1e9c94a8dec825a (diff) | |
download | openttd-945469f9933d8b891cbbddc539f0b9a127540b1d.tar.xz |
(svn r24870) -Change: make the duplicate base set message slightly more verbose, and mention files with wrong md5 checksums or files that are missing explicitly
Diffstat (limited to 'src')
-rw-r--r-- | src/base_media_func.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/base_media_func.h b/src/base_media_func.h index 0bea235f3..a28435fe6 100644 --- a/src/base_media_func.h +++ b/src/base_media_func.h @@ -137,12 +137,16 @@ bool BaseSet<T, Tnum_files, Tsearch_in_tars>::FillSetDetails(IniFile *ini, const switch (T::CheckMD5(file, BASESET_DIR)) { case MD5File::CR_MATCH: this->valid_files++; - /* FALL THROUGH */ + this->found_files++; + break; + case MD5File::CR_MISMATCH: + DEBUG(grf, 1, "MD5 checksum mismatch for: %s (in %s)", filename, full_filename); this->found_files++; break; case MD5File::CR_NO_FILE: + DEBUG(grf, 1, "The file %s specified in %s is missing", filename, full_filename); break; } } @@ -180,7 +184,8 @@ bool BaseMedia<Tbase_set>::AddFile(const char *filename, size_t basepath_length, /* The more complete set takes precedence over the version number. */ if ((duplicate->valid_files == set->valid_files && duplicate->version >= set->version) || duplicate->valid_files > set->valid_files) { - DEBUG(grf, 1, "Not adding %s (%i) as base " SET_TYPE " set (duplicate)", set->name, set->version); + DEBUG(grf, 1, "Not adding %s (%i) as base " SET_TYPE " set (duplicate, %s)", set->name, set->version, + duplicate->valid_files > set->valid_files ? "less valid files" : "lower version"); set->next = BaseMedia<Tbase_set>::duplicate_sets; BaseMedia<Tbase_set>::duplicate_sets = set; } else { @@ -195,7 +200,8 @@ bool BaseMedia<Tbase_set>::AddFile(const char *filename, size_t basepath_length, * version number until a new game is started which isn't a big problem */ if (BaseMedia<Tbase_set>::used_set == duplicate) BaseMedia<Tbase_set>::used_set = set; - DEBUG(grf, 1, "Removing %s (%i) as base " SET_TYPE " set (duplicate)", duplicate->name, duplicate->version); + DEBUG(grf, 1, "Removing %s (%i) as base " SET_TYPE " set (duplicate, %s)", duplicate->name, duplicate->version, + duplicate->valid_files < set->valid_files ? "less valid files" : "lower version"); duplicate->next = BaseMedia<Tbase_set>::duplicate_sets; BaseMedia<Tbase_set>::duplicate_sets = duplicate; ret = true; |