feat: some custom url support.
This commit is contained in:
parent
68129fc8c8
commit
3215b0caa9
|
@ -4751,7 +4751,8 @@ export class Game {
|
||||||
const audiosrc = "die:ext:" + extname + "/" + j + ".mp3";
|
const audiosrc = "die:ext:" + extname + "/" + j + ".mp3";
|
||||||
if (
|
if (
|
||||||
!pack[i][j][4].some(
|
!pack[i][j][4].some(
|
||||||
(str) => typeof str == "string" && /^(?:db:extension-|ext:):(?:.+)/.test(str)
|
(str) =>
|
||||||
|
typeof str == "string" && /^(?:db:extension-.+?|ext|img):(?:.+)/.test(str)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
pack[i][j][4].add(imgsrc);
|
pack[i][j][4].add(imgsrc);
|
||||||
|
@ -4800,6 +4801,7 @@ export class Game {
|
||||||
if (info.audio == true) {
|
if (info.audio == true) {
|
||||||
info.audio = "ext:" + extname;
|
info.audio = "ext:" + extname;
|
||||||
}
|
}
|
||||||
|
if (!info.image || typeof info.image !== "string") {
|
||||||
if (info.fullskin) {
|
if (info.fullskin) {
|
||||||
if (_status.evaluatingExtension) {
|
if (_status.evaluatingExtension) {
|
||||||
info.image = "db:extension-" + extname + ":" + name + ".png";
|
info.image = "db:extension-" + extname + ":" + name + ".png";
|
||||||
|
@ -4813,6 +4815,7 @@ export class Game {
|
||||||
info.image = "ext:" + extname + "/" + name + ".jpg";
|
info.image = "ext:" + extname + "/" + name + ".jpg";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
lib.card[name] = info;
|
lib.card[name] = info;
|
||||||
lib.translate[name] = info2.translate;
|
lib.translate[name] = info2.translate;
|
||||||
lib.translate[name + "_info"] = info2.description;
|
lib.translate[name + "_info"] = info2.description;
|
||||||
|
@ -4930,11 +4933,15 @@ export class Game {
|
||||||
lib.translate[name] = info2.translate;
|
lib.translate[name] = info2.translate;
|
||||||
let imgsrc;
|
let imgsrc;
|
||||||
let extname = _status.extension || info2.extension;
|
let extname = _status.extension || info2.extension;
|
||||||
|
if (info.splash) {
|
||||||
|
imgsrc = info.splash;
|
||||||
|
} else {
|
||||||
if (_status.evaluatingExtension) {
|
if (_status.evaluatingExtension) {
|
||||||
imgsrc = "extension-" + extname + ":" + name + ".jpg";
|
imgsrc = "extension-" + extname + ":" + name + ".jpg";
|
||||||
} else {
|
} else {
|
||||||
imgsrc = "ext:" + extname + "/" + name + ".jpg";
|
imgsrc = "ext:" + extname + "/" + name + ".jpg";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
lib.mode[name] = {
|
lib.mode[name] = {
|
||||||
name: info2.translate,
|
name: info2.translate,
|
||||||
config: info2.config,
|
config: info2.config,
|
||||||
|
|
|
@ -171,8 +171,7 @@ Reflect.defineProperty(HTMLDivElement.prototype, "setBackground", {
|
||||||
if (value.startsWith("img:")) {
|
if (value.startsWith("img:")) {
|
||||||
imgPrefixUrl = value.slice(4);
|
imgPrefixUrl = value.slice(4);
|
||||||
break;
|
break;
|
||||||
}
|
} else if (value.startsWith("ext:")) {
|
||||||
if (value.startsWith("ext:")) {
|
|
||||||
extimage = value;
|
extimage = value;
|
||||||
break;
|
break;
|
||||||
} else if (value.startsWith("db:")) {
|
} else if (value.startsWith("db:")) {
|
||||||
|
|
Loading…
Reference in New Issue