!38 #喵喵设置未实装关闭 时,不显示未实装角色的预设面板

Merge pull request !38 from 环顾四周/fork_dev
This commit is contained in:
Kokomi 2023-10-11 08:22:45 +00:00 committed by Gitee
commit 4c37ad39f3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 11 additions and 3 deletions

View File

@ -100,7 +100,9 @@ let ProfileDetail = {
if (!profileChange && Number(e.uid) > 100000006) {
e.reply('角色尚未实装')
return true
} else if (Cfg.get('notReleasedData') === false) {
}
// 但仅在未实装开启时展示
if (Cfg.get('notReleasedData') === false) {
e.reply('未实装角色面板已禁用...')
return true
}

View File

@ -1,5 +1,5 @@
import ProfileDetail from './ProfileDetail.js'
import { Data, Common, Format } from '#miao'
import { Data, Common, Format, Cfg } from '#miao'
import { Character, ProfileRank, ProfileDmg, Player } from '#miao.models'
import lodash from 'lodash'
@ -37,6 +37,10 @@ export async function groupRank (e) {
let player = Player.create(100000000)
if (player.getProfile(char.id)) {
e.uid = 100000000
if (Cfg.get('notReleasedData') === false) {
e.reply('未实装角色面板已禁用...')
return true
}
return await ProfileDetail.render(e, char)
} else {
return true

View File

@ -137,7 +137,9 @@ export const cfgSchema = {
notReleasedData: {
title: '未实装角色数据',
key: '未实装',
def: true
def: true,
showDesc: true,
desc: '开启时才能查看未实装角色信息。数据仅供参考,请以游戏正式实装内容为准'
},
charPic: {
title: '角色图片',