Merge pull request #954 from universe-st/PR-Branch

卡牌的audio支持function
This commit is contained in:
Spmario233 2024-02-15 21:29:03 +08:00 committed by GitHub
commit 310c290285
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1644,7 +1644,7 @@ export class Game extends Uninstantable {
return; return;
} }
} }
const audio = lib.card[card.name].audio; const audio = get.dynamicVariable(lib.card[card.name].audio,card,sex);
if (typeof audio == 'string') { if (typeof audio == 'string') {
const audioInfo = audio.split(':'); const audioInfo = audio.split(':');
if (audio.startsWith('db:')) game.playAudio(`${audioInfo[0]}:${audioInfo[1]}`, audioInfo[2], `${card.name}_${sex}.${audioInfo[3] || 'mp3'}`); if (audio.startsWith('db:')) game.playAudio(`${audioInfo[0]}:${audioInfo[1]}`, audioInfo[2], `${card.name}_${sex}.${audioInfo[3] || 'mp3'}`);