-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.ts
63 lines (55 loc) · 1.86 KB
/
options.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import type { Options } from 'ccmodmanager/types/mod-options'
export let Opts: ReturnType<typeof modmanager.registerAndGetModOptions<ReturnType<typeof registerOpts>>>
export const GameRestartType = {
LocationReload: 0,
ChromeRuntimeReload: 1,
} as const
export const Themes = {
Original: 0,
Gray: 1,
} as const
export function registerOpts() {
const opts = {
general: {
settings: {
title: 'General',
tabIcon: 'general',
},
headers: {
general: {
gameRestartType: {
type: 'BUTTON_GROUP',
enum: GameRestartType,
init: GameRestartType.ChromeRuntimeReload,
buttonNames: ['location.reload()', 'chrome.runtime.reload()'],
name: `'Restart Game' button mode`,
description: `True for location.reload(), false for chrome.runtime.reload()`,
},
theme: {
type: 'BUTTON_GROUP',
enum: Themes,
init: Themes.Original,
buttonNames: ['Original', 'Gray'],
name: 'Theme',
description: 'Crash message theme',
},
explosion: {
type: 'CHECKBOX',
init: false,
name: 'Explosion',
description: 'Explosion',
},
},
},
},
} as const satisfies Options
Opts = modmanager.registerAndGetModOptions(
{
modId: 'cc-fancy-crash',
title: 'cc-fancy-crash',
// helpMenu: Lang.help.options,
},
opts
)
return opts
}