mirror of
https://github.com/Shu-Ying/noname-shuying.git
synced 2026-10-21 23:00:06 +08:00
fixed # 重构梦三项目结构
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
export function mountEnergy(player, session, document) {
|
||||
const badge = document.createElement("div");
|
||||
badge.className = "mengsan-energy-shuying";
|
||||
const refresh = () => {
|
||||
const current = player.storage.mengsanEnergy_shuying;
|
||||
const maximum = player.storage.mengsanMaxEnergy_shuying;
|
||||
badge.textContent = `费用 ${current}/${maximum}`;
|
||||
};
|
||||
player.appendChild(badge);
|
||||
session.ownResource(badge, () => badge.remove());
|
||||
refresh();
|
||||
return refresh;
|
||||
}
|
||||
Reference in New Issue
Block a user