From 46dd32788732bcd41a3e8c3e85f568a6bb35c4b3 Mon Sep 17 00:00:00 2001 From: Tipx-L <138244655+Tipx-L@users.noreply.github.com> Date: Mon, 23 Oct 2023 21:02:37 -0700 Subject: [PATCH] Fix `updateTransform`. --- game/game.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/game/game.js b/game/game.js index d988de5cb..c4e80fc49 100644 --- a/game/game.js +++ b/game/game.js @@ -30621,6 +30621,9 @@ } _status.event.excludeButton.add(this); } + get updateTransform(){ + return lib.element.Card.prototype.updateTransform; + } }, GameEvent:class{ /** @@ -43250,21 +43253,17 @@ //创建身份牌实例 identityCard:function(identity,position,info,noclick){ const card=ui.create.card(position,info,noclick); - card._customintro=function(uiintro){ - uiintro.add(`${get.translation(identity+2)}的身份牌`); - } + card._customintro=uiintro=>uiintro.add(`${get.translation(`${identity}${2}`)}的身份牌`); const fileName=`image/card/identity_${identity}.jpg`; new Promise((resolve,reject)=>{ const image=new Image(); - image.onload=()=>resolve(); + image.onload=resolve; image.onerror=reject; image.src=`${lib.assetURL}${fileName}`; }).then(()=>{ card.classList.add('fullskin'); card.node.image.setBackgroundImage(fileName); - }).catch(()=>{ - card.node.background.innerHTML=get.translation(identity)[0]; - }); + },()=>card.node.background.innerHTML=get.translation(identity)[0]); return card; }, //让卡牌旋转