This commit is contained in:
Spmario233 2023-10-17 22:51:51 +08:00
parent 89186ff31b
commit ab87506a79
1 changed files with 23 additions and 18 deletions

View File

@ -22637,7 +22637,7 @@
player.hujia=hujia; player.hujia=hujia;
player.$update(); player.$update();
},this,this.hp,this.maxHp,this.hujia); },this,this.hp,this.maxHp,this.hujia);
this.$update(); this.$update(...arguments);
} }
$update(){ $update(){
if(this.hp>=this.maxHp) this.hp=this.maxHp; if(this.hp>=this.maxHp) this.hp=this.maxHp;
@ -36076,8 +36076,12 @@
} }
}, },
playAudio:function(){ playAudio:function(){
if(_status.video&&arguments[1]!='video') return;
let path='',emptyPath=true,notCheckDBPath=true,onError=null; let path='',emptyPath=true,notCheckDBPath=true,onError=null;
if(_status.video){
if(arguments[1]!='video') return;
path=arguments[0];
}
else{
for(const argument of arguments){ for(const argument of arguments){
if(typeof argument==='string'||typeof argument=='number'){ if(typeof argument==='string'||typeof argument=='number'){
if(emptyPath) emptyPath=false; if(emptyPath) emptyPath=false;
@ -36095,6 +36099,7 @@
if(path.startsWith('ext:')) path=path.replace(/^ext:/,'extension/'); if(path.startsWith('ext:')) path=path.replace(/^ext:/,'extension/');
else if(!path.startsWith('db:')) path=`audio/${path}`; else if(!path.startsWith('db:')) path=`audio/${path}`;
if(!lib.config.repeat_audio&&_status.skillaudio.contains(path)) return; if(!lib.config.repeat_audio&&_status.skillaudio.contains(path)) return;
}
_status.skillaudio.add(path); _status.skillaudio.add(path);
game.addVideo('playAudio',null,path); game.addVideo('playAudio',null,path);
setTimeout(()=>_status.skillaudio.remove(path),1000); setTimeout(()=>_status.skillaudio.remove(path),1000);