添加game.parseDieTextMap,将character[4]里的阵亡语音相关屎山规范化 #1315
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR受影响的平台
全部
诱因和背景
先前添加Character类时,未对阵亡语音相关的参数进行处理。为了统一本体内存在的多种不同的阵亡语音结构,做出此次更新。
PR描述
原本位于character[4]中的
"die:ext:xxx/yyy"
格式和"die_audio:xxx:yyy"的文件,现在全部统一化格式,进入Character#dieAudios
中。例:当角色阵亡时,若dieAudios存在内容,则从dieAudios中存在的内容里随机选择一条播放。若不存在内容,则播放
audio/die/角色名称.mp3
。此外,提供game.parseDieTextMap函数。返回一个角色拥有的所有阵亡语音ID/对应语音文件/对应台词。例:
PR测试
武将资料页面能够正确显示武将的阵亡语音台词。
本地不断杀死族钟会,成功做到随机播放语音。并且能够正确播放扩展的阵亡语音。
扩展适配
需要具有阵亡特效,覆盖了die事件流程的扩展更新阵亡语音的播放,从而进行适配。但Character类本身提供了垃圾桶的向下兼容,也许并不会出现问题?
检查清单
PR描述
中写入详细文档扩展适配
中写入详细文档诱因和背景
中明确链接到该issue.editorconfig
、eslint.config.mjs
和prettier.config.mjs
所规定的代码样式,并且已经通过prettier
格式化过代码