Merge pull request #1245 from majick/tag-field-wtf-logspam

Make v2 spec read logspam at least slightly actionable.  Slightly.
This commit is contained in:
Cohee 2023-10-15 15:34:14 +03:00 committed by GitHub
commit d1d14bca13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -858,7 +858,7 @@ function unsetFavFlag(char) {
function readFromV2(char) {
if (_.isUndefined(char.data)) {
console.warn('Spec v2 data missing');
console.warn(`Char ${char['name']} has Spec v2 data missing`);
return char;
}
@ -893,12 +893,12 @@ function readFromV2(char) {
//console.debug(`Spec v2 extension data missing for field: ${charField}, using default value: ${defaultValue}`);
char[charField] = defaultValue;
} else {
console.debug(`Spec v2 data missing for unknown field: ${charField}`);
console.debug(`Char ${char['name']} has Spec v2 data missing for unknown field: ${charField}`);
return;
}
}
if (!_.isUndefined(char[charField]) && !_.isUndefined(v2Value) && String(char[charField]) !== String(v2Value)) {
console.debug(`Spec v2 data mismatch with Spec v1 for field: ${charField}`, char[charField], v2Value);
console.debug(`Char ${char['name']} has Spec v2 data mismatch with Spec v1 for field: ${charField}`, char[charField], v2Value);
}
char[charField] = v2Value;
});