Fixed note scroll speed defaulting to 0.5x for newly registered profiles.

Introduced several new interfaces, and refactored code to cleanup profiles.ts
This commit is contained in:
Thome Valentin
2022-05-16 13:50:18 +02:00
parent b240a72cfa
commit 70d2fe2bb8
17 changed files with 450 additions and 372 deletions
+26 -1
View File
@@ -1,3 +1,5 @@
import { PLUGIN_VER } from "../const";
export interface Extra {
collection: 'extra';
@@ -13,4 +15,27 @@ export interface Extra {
list_3: number[];
recommend_musicid_list: number[];
reward_status: number[];
}
}
export function getDefaultExtra(game: 'gf' | 'dm', version: string, id: number) : Extra {
const result : Extra = {
collection: 'extra',
pluginVer: PLUGIN_VER,
game,
version,
id,
playstyle: Array(50).fill(0),
custom: Array(50).fill(0),
list_1: Array(100).fill(-1),
list_2: Array(100).fill(-1),
list_3: Array(100).fill(-1),
recommend_musicid_list: Array(5).fill(-1),
reward_status: Array(50).fill(0),
}
result.playstyle[1] = 1 // Note scroll speed (should default to 1.0x)
result.playstyle[36] = 20 // Unknown
result.playstyle[48] = 20 // Unknown
return result
}