新增get.nameList()判断武将是否是某个ID或返回武将的所有id #1539
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受影响的平台
所有平台
诱因和背景
很多时候需要检查武将的id是否是某个id,但是需要检查name,name1,name2,使用一个函数直接进一步到位。
PR描述
传入两个参数,分别是Player和字符串武将id,返回{Array|boolean},如果未指定特定字符串,则返回玩家id列表Array,如果未指定Player,则返回空数组。
PR测试
console.log(获取.nameList(game.me))
扩展适配
无需适配
检查清单
character/rank.js
中添加对应的武将强度评级/在lib.translate
中加入语音文件的文字台词PR描述
中写入详细文档扩展适配
中写入详细文档诱因和背景
中明确链接到该issue.editorconfig
、eslint.config.mjs
和prettier.config.mjs
所规定的代码样式,并且已经通过prettier
格式化过代码