-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDevilMayCry5.ts
133 lines (126 loc) · 4.22 KB
/
DevilMayCry5.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/**
* @description 鬼泣5 支持
*/
import { join, extname, basename } from 'path'
import { ElMessage } from "element-plus";
export const supportedGames: ISupportedGames = {
GlossGameId: 183,
steamAppID: 601150,
NexusMods: {
game_id: 2751,
game_domain_name: "devilmaycry5",
},
installdir: "Devil May Cry 5",
gameName: "Devil May Cry 5",
gameExe: 'DevilMayCry5.exe',
startExe: [
{
name: 'Steam 启动',
cmd: 'steam://rungameid/601150'
},
{
name: '直接启动',
exePath: 'DevilMayCry5.exe'
}
],
archivePath: (() => {
let steamPath = Steam.getSteamInstallPath()
if (steamPath) {
return join(steamPath, 'userdata', Steam.GetLastSteamId32(), '601150', 'remote')
} else {
return join(FileHandler.GetAppData(), "Local", "SKIDROW", "220440", "Storage")
}
})(),
gameCoverImg: "https://mod.3dmgame.com/static/upload/game/183.jpg",
modType: [
{
id: 2,
name: "REFramework",
installPath: join(''),
async install(mod) {
return Manager.generalInstall(mod, this.installPath ?? "", true)
},
async uninstall(mod) {
return Manager.generalUninstall(mod, this.installPath ?? "", true)
}
},
{
id: 1,
name: "autorun",
installPath: join('reframework', 'autorun'),
async install(mod) {
if (!Manager.checkInstalled("REFramework", 202996)) return false
return Manager.installByFolder(mod, this.installPath ?? "", 'autorun', true)
},
async uninstall(mod) {
return Manager.installByFolder(mod, this.installPath ?? "", 'autorun', false)
}
},
{
id: 4,
name: 'plugins',
installPath: join('reframework', 'plugins'),
async install(mod) {
if (!Manager.checkInstalled("REFramework", 202996)) return false
return Manager.installByFolder(mod, this.installPath ?? "", 'plugins', true)
},
async uninstall(mod) {
return Manager.installByFolder(mod, this.installPath ?? "", 'plugins', false)
}
},
{
id: 3,
name: "模型替换",
installPath: join('natives'),
async install(mod) {
if (!Manager.checkInstalled("REFramework", 202996)) return false
if (!Manager.checkInstalled("FirstNatives", 202971)) return false
return Manager.installByFolder(mod, this.installPath ?? "", 'natives', true)
},
async uninstall(mod) {
return Manager.installByFolder(mod, this.installPath ?? "", 'natives', false)
}
},
{
id: 5,
name: '主目录',
installPath: join(''),
async install(mod) {
return Manager.generalInstall(mod, this.installPath ?? "", true)
},
async uninstall(mod) {
return Manager.generalUninstall(mod, this.installPath ?? "", true)
}
},
{
id: 99,
name: "未知",
installPath: join(''),
async install(mod) {
ElMessage.warning("未知类型, 请手动安装")
return false
},
async uninstall(mod) {
return true
}
}
],
checkModType(mod) {
let natives = false
let plugins = false
let autorun = false
let REFramework = false
// if (mod.webId == 197869) return 2
mod.modFiles.forEach(item => {
if (basename(item) == 'dinput8.dll') REFramework = true
if (item.toLowerCase().includes('natives')) natives = true
if (item.toLowerCase().includes('autorun')) autorun = true
if (item.toLowerCase().includes('plugins')) plugins = true
})
if (REFramework) return 2
if (autorun) return 1
if (plugins) return 4
if (natives) return 3
return 99
}
}