移除一个绕圈子判断

This commit is contained in:
Spmario233 2024-05-06 19:35:02 +08:00
parent 6e9bd21f26
commit f4f7ce66fc
1 changed files with 3 additions and 8 deletions

View File

@ -142,17 +142,14 @@ Reflect.defineProperty(HTMLDivElement.prototype, "setBackground", {
gzbool = false; gzbool = false;
const mode = get.mode(); const mode = get.mode();
if (type == "character") { if (type == "character") {
nameinfo = get.character(name);
if (lib.characterPack[`mode_${mode}`] && lib.characterPack[`mode_${mode}`][name]) { if (lib.characterPack[`mode_${mode}`] && lib.characterPack[`mode_${mode}`][name]) {
if (mode == "guozhan") { if (mode == "guozhan") {
nameinfo = lib.character[name];
if (name.startsWith("gz_shibing")) name = name.slice(3, 11); if (name.startsWith("gz_shibing")) name = name.slice(3, 11);
else { else {
if ( if (lib.config.mode_config.guozhan.guozhanSkin && nameinfo && nameinfo.hasSkinInGuozhan){
lib.config.mode_config.guozhan.guozhanSkin &&
lib.character[name] &&
lib.character[name].hasSkinInGuozhan
)
gzbool = true; gzbool = true;
}
name = name.slice(3); name = name.slice(3);
} }
} else modeimage = mode; } else modeimage = mode;
@ -161,8 +158,6 @@ Reflect.defineProperty(HTMLDivElement.prototype, "setBackground", {
name = name.split("::"); name = name.split("::");
modeimage = name[0]; modeimage = name[0];
name = name[1]; name = name[1];
} else {
nameinfo = get.character(name);
} }
} }
let imgPrefixUrl; let imgPrefixUrl;