-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
112 lines (103 loc) · 2.32 KB
/
index.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
export type sourceType = "GlossMod" | "NexusMods" | "Thunderstore" | "ModIo"
export interface ITag {
name: string
color: string
}
export interface IModInfo {
id: number
from?: sourceType
webId?: number
nexus_id?: string
modIo_id?: number
modName: string
gameID?: number
md5: string
modVersion: string
tags?: ITag[]
isUpdate?: boolean
modType?: number
isInstalled: boolean
weight: number
modFiles: string[]
modDesc?: string
modAuthor?: string
modWebsite?: string
advanced?: {
enabled: boolean
data: any
}
}
export interface IGameExe {
name: string
rootPath: string
}
export interface IStartExe {
name: string
exePath: string
}
export interface IGameInfo {
GlossGameId: number
steamAppID: number
installdir: string
gameName: string
gameExe: string | IGameExe[]
startExe: string | IStartExe[]
gamePath?: string
gameVersion?: string
gameCoverImg: string
NexusMods?: {
game_id: number
game_domain_name: string
},
Thunderstore?: {
community_identifier: string
},
mod_io?: {
game_id: number
}
}
export interface IState {
file: string,
state: boolean
}
interface IAdvancedItem {
type: "input" | "selects" | "switch"
label: string
key: string
selectItem?: { name: string, value: string }[]
defaultValue?: string | boolean
}
export interface IType {
id: number
name: string
installPath?: string
advanced?: {
name: string
icon: string
item: IAdvancedItem[]
}
install: (mod: IModInfo) => Promise<IState[] | boolean>
uninstall: (mod: IModInfo) => Promise<IState[] | boolean>
checkPlugin?: (plugin: IModInfo) => boolean
}
export interface ISupportedGames extends IGameInfo {
modType: IType[]
checkModType: (mod: IModInfo) => number
}
export interface ISettings {
managerGame?: ISupportedGames
managerGameList: ISupportedGames[]
modStorageLocation: string
tourGameList: number[]
proxy: string
// UnzipPath: string
autoInstall: boolean
leftMenuRail: boolean
autoLaunch: boolean
language: string
theme: 'light' | 'dark' | 'system'
fold: boolean,
exploreType: sourceType
selectGameByFolder: boolean
showPakeMessage: boolean
}