Merge pull request #515 from nofficalfs/Dev-FixGetNoArgs

修复`get`函数存在传入类数组无`map`方式
This commit is contained in:
Spmario233 2023-10-12 16:22:28 +08:00 committed by GitHub
commit f667edd06f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -57975,9 +57975,9 @@
} }
return info; return info;
}, },
infoTargets:infos=>infos.map(info=>game.playerMap[info]), infoTargets:infos=>Array.from(infos||[]).map(info=>game.playerMap[info]),
cardInfo:card=>[card.suit,card.number,card.name,card.nature], cardInfo:card=>[card.suit,card.number,card.name,card.nature],
cardsInfo:cards=>cards.map(get.cardInfo), cardsInfo:cards=>Array.from(cards||[]).map(get.cardInfo),
infoCard:info=>{ infoCard:info=>{
var card=ui.create.card(); var card=ui.create.card();
if(info[0]){ if(info[0]){
@ -57985,7 +57985,7 @@
} }
return card; return card;
}, },
infoCards:infos=>infos.map(get.infoCard), infoCards:infos=>Array.from(infos||[]).map(get.infoCard),
cardInfoOL:card=>'_noname_card:'+JSON.stringify([card.cardid,card.suit,card.number,card.name,card.nature]), cardInfoOL:card=>'_noname_card:'+JSON.stringify([card.cardid,card.suit,card.number,card.name,card.nature]),
infoCardOL:info=>{ infoCardOL:info=>{
if(!lib.cardOL) return info; if(!lib.cardOL) return info;
@ -58015,12 +58015,12 @@
} }
return card||info; return card||info;
}, },
cardsInfoOL:cards=>cards.map(get.cardInfoOL), cardsInfoOL:cards=>Array.from(cards||[]).map(get.cardInfoOL),
infoCardsOL:infos=>infos.map(get.infoCardOL), infoCardsOL:infos=>Array.from(infos||[]).map(get.infoCardOL),
playerInfoOL:player=>'_noname_player:'+player.playerid, playerInfoOL:player=>'_noname_player:'+player.playerid,
infoPlayerOL:info=>lib.playerOL?(lib.playerOL[info.slice(15)]||info):info, infoPlayerOL:info=>lib.playerOL?(lib.playerOL[info.slice(15)]||info):info,
playersInfoOL:players=>players.map(get.playerInfoOL), playersInfoOL:players=>Array.from(players||[]).map(get.playerInfoOL),
infoPlayersOL:infos=>infos.map(get.infoPlayerOL), infoPlayersOL:infos=>Array.from(infos||[]).map(get.infoPlayerOL),
funcInfoOL:func=>{ funcInfoOL:func=>{
if(typeof func=='function'){ if(typeof func=='function'){
if(func._filter_args){ if(func._filter_args){