Skip to content

Commit 59718a2

Browse files
committed
feat: 添加 mod 选项
1 parent 0194ca9 commit 59718a2

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

MaiChartManager/Front/src/components/ModManager/ConfigEditor.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { computed, defineComponent, onMounted, PropType, ref, watch } from "vue";
2-
import { NButton, NCheckbox, NDivider, NFlex, NFormItem, NInput, NModal, NScrollbar, NSwitch, useDialog } from "naive-ui";
2+
import { NButton, NCheckbox, NDivider, NFlex, NFormItem, NInput, NInputNumber, NModal, NScrollbar, NSwitch, useDialog } from "naive-ui";
33
import { Config, GameEdition, GameModInfo } from "@/client/apiGen";
44
import comments from './modComments.yaml';
55
import api from "@/client/api";
@@ -107,7 +107,9 @@ export default defineComponent({
107107
{Object.keys(section).map((k) => <NFormItem key={k} label={capitalCase(k)} labelPlacement="left" labelWidth="10em">
108108
<NFlex vertical class="w-full ws-pre-line">
109109
<NFlex class="h-34px" align="center">
110-
{typeof section[k] === 'boolean' ? <NSwitch v-model:value={section[k]}/> : <NInput v-model:value={section[k]} placeholder=""/>}
110+
{typeof section[k] === 'boolean' && <NSwitch v-model:value={section[k]}/>}
111+
{typeof section[k] === 'string' && <NInput v-model:value={section[k]} placeholder=""/>}
112+
{typeof section[k] === 'number' && <NInputNumber v-model:value={section[k]} placeholder=""/>}
111113
{comments.shouldEnableOptions[key]?.[k] && !section[k] && <ProblemsDisplay problems={['需要开启此选项']}/>}
112114
</NFlex>
113115
{comments[key]?.[k]}

MaiChartManager/Front/src/components/ModManager/modComments.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ sections:
33
ux: 用户体验改进
44
performance: 一些性能优化
55
fix: 修复一些潜在的问题
6+
utils: 工具
67

78
cheat:
89
ticketUnlock: 解锁游戏里所有可能的跑图券
@@ -54,6 +55,12 @@ fix:
5455
正常情况下,请保持这个选项开启
5556
forceAsServer: 强制服务器模式,配置店内招募时关闭
5657
forceFreePlay: 强制免费游玩
58+
extendNotesPool: |
59+
增加更多待命的音符贴图,防止奇怪的自制谱用完音符贴图池
60+
如果遇到奇怪的谱面显示不正常或者闪退的话可以从 64 以上开始调整
61+
62+
utils:
63+
logUserId: 在玩家登录时调试输出用户 ID
5764

5865
shouldEnableOptions:
5966
ux:

0 commit comments

Comments
 (0)