mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-04-24 15:37:43 -05:00
initailize migration helper
This commit is contained in:
parent
75b6cd9464
commit
91f772d309
|
|
@ -1,14 +1,18 @@
|
|||
GITADORA Plugin for Asphyxia-Core
|
||||
=================================
|
||||
This plugin is converted from public-exported Asphyxia's Routes.
|
||||
This plugin is based on converted from public-exported Asphyxia's Routes.
|
||||
|
||||
Supported Versions
|
||||
==================
|
||||
- Matixx
|
||||
- Exchain
|
||||
- NEX+AGE (Beta)
|
||||
- NEX+AGE
|
||||
|
||||
|
||||
Profile sharing between version (WIP)
|
||||
-------------------------------------
|
||||
Only scores are shared between versions. As It's planned to support some Version-specific features.
|
||||
|
||||
Note about newer version of Asphyxia Core
|
||||
-----------------------------------------
|
||||
Since newer version of Core separate the save db per each plugin, Seems there was an error after the migration process. till it's fixed on Core side, you maybe need backup the old save and start from zero.
|
||||
|
|
@ -16,8 +20,13 @@ Since newer version of Core separate the save db per each plugin, Seems there wa
|
|||
Release Notes
|
||||
=============
|
||||
|
||||
v1.1.0 (Current)
|
||||
----------------
|
||||
v2.0.0 (Current, WIP)
|
||||
---------------------
|
||||
* Support score shares between versions.
|
||||
|
||||
|
||||
v1.1.0-beta
|
||||
------------
|
||||
* NEX+AGE Support (Beta)
|
||||
|
||||
v1.0.0
|
||||
|
|
|
|||
|
|
@ -2,13 +2,16 @@ import { gameInfoGet, shopInfoRegist } from "./handlers/info";
|
|||
import { playableMusic } from "./handlers/MusicList"
|
||||
import { getPlayer, check, regist, savePlayer } from "./handlers/profiles";
|
||||
import { updatePlayerInfo } from "./handlers/webui";
|
||||
import { isRequiredVersion } from "./utils";
|
||||
import { isRequiredCoreVersion } from "./utils";
|
||||
import { initialze as migrationInitialize } from "./utils/migration"
|
||||
|
||||
export function register() {
|
||||
if(!isRequiredVersion(1, 20)) {
|
||||
if(!isRequiredCoreVersion(1, 20)) {
|
||||
console.error("You need newer version of Core. v1.20 or newer required.")
|
||||
}
|
||||
|
||||
migrationInitialize()
|
||||
|
||||
R.GameCode('M32');
|
||||
|
||||
R.Config("enable_custom_mdb", {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ export interface Scores {
|
|||
collection: 'scores';
|
||||
|
||||
game: 'gf' | 'dm';
|
||||
version: string;
|
||||
version?: string;
|
||||
pluginVer: number
|
||||
|
||||
scores: {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export const getVersion = (info: EamuseInfo) => {
|
|||
return moduleName.match(/([^_]*)_(.*)/)[1];
|
||||
};
|
||||
|
||||
export function isRequiredVersion(major: number, minor: number) {
|
||||
export function isRequiredCoreVersion(major: number, minor: number) {
|
||||
// version value exposed since Core v1.19
|
||||
const core_major = typeof CORE_VERSION_MAJOR === "number" ? CORE_VERSION_MAJOR : 1
|
||||
const core_minor = typeof CORE_VERSION_MINOR === "number" ? CORE_VERSION_MINOR : 18
|
||||
|
|
|
|||
7
gitadora@asphyxia/utils/migration.ts
Normal file
7
gitadora@asphyxia/utils/migration.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
export async function initialze() {
|
||||
await dbMigration()
|
||||
}
|
||||
|
||||
async function dbMigration() {
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user