Merge pull request #236 from nonameShijian/PR-Branch

修复懒加载ui.create.videoNode的bug
This commit is contained in:
Spmario233 2023-08-25 23:09:33 +08:00 committed by GitHub
commit 6ffa270a5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -182,7 +182,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return effect; return effect;
}, },
onChooseToUse:function(event){ onChooseToUse:function(event){
if(!game.online&&event.type=='phase'){ if(!game.online&&event.type=='phase'&&!event.dcpandi){
var players=game.filterPlayer(function(current){ var players=game.filterPlayer(function(current){
return current!=event.player&&current.getHistory('sourceDamage').length==0; return current!=event.player&&current.getHistory('sourceDamage').length==0;
}) })

View File

@ -27388,7 +27388,6 @@
this._tempCache[key1] = {}; this._tempCache[key1] = {};
} }
this._tempCache[key1][key2] = value; this._tempCache[key1][key2] = value;
console.log("put:"+key1+" "+key2+" "+value);
}, },
getTempCache:function(key1,key2){ getTempCache:function(key1,key2){
if(!this._tempCache){ if(!this._tempCache){
@ -45509,6 +45508,7 @@
var node=ui.create.div('.menubutton.large','录像',start.firstChild,clickMode); var node=ui.create.div('.menubutton.large','录像',start.firstChild,clickMode);
node.type='video'; node.type='video';
lib.videos=[]; lib.videos=[];
ui.create.videoNode=(video,before)=>lib.videos[before===true?'unshift':'push'](video);
node._initLink=function(){ node._initLink=function(){
node.link=page; node.link=page;
var store=lib.db.transaction(['video'],'readwrite').objectStore('video'); var store=lib.db.transaction(['video'],'readwrite').objectStore('video');