feat # 继续补全遗物系统

This commit is contained in:
2026-10-08 23:46:57 +08:00
parent 623f53a1d2
commit 1c93c77f4f
335 changed files with 11528 additions and 1797 deletions
+11
View File
@@ -0,0 +1,11 @@
import { lib } from "../../../../noname.js";
export function relicImageURL(image) {
return typeof image==="string" && /^extension\/术樱包\/mengsan\/assets\/relics\/[a-z0-9_]+\.png$/.test(image) ? (lib.assetURL || "")+image : null;
}
export function createRelicIcon(image) {
const src=relicImageURL(image);if(!src)return null;
const icon=document.createElement("img");
icon.className="mengsan-relic-icon-shuying";icon.src=src;icon.alt="";
icon.setAttribute("aria-hidden","true");icon.width=48;icon.height=48;icon.loading="lazy";
icon.addEventListener("error",()=>icon.remove(),{once:true});return icon;
}