mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-03-21 17:34:46 -05:00
Update Readme, Support First fully with mdb.
This commit is contained in:
parent
f63ee8aae8
commit
b7bb38f626
|
|
@ -1,25 +1,26 @@
|
|||
# Nostalgia
|
||||
|
||||
Plugin Version: **v1.1.0**
|
||||
Plugin Version: **v1.2.0**
|
||||
|
||||
Supported Versions
|
||||
-------------------
|
||||
- Forte (Experiment)
|
||||
- ノスタルジア / First Version (Experiment-Old)
|
||||
- Forte (Experiment-Old)
|
||||
- Op.2
|
||||
|
||||
|
||||
About Forte Support
|
||||
-------------------
|
||||
Forte support is live. But since it has much difference compared to Op.2, Forte is not-primary-supported version.
|
||||
It may works unexpectedly. Forte was tested very lightly. So this feature is tagged as **Experiment**.
|
||||
|
||||
Also, Technically, This *may* support First version of Nostalgia too.
|
||||
But It's highly not recommend to run First version with it.
|
||||
About Experiment-Old Support
|
||||
----------------------------
|
||||
A version that marked as **Experiment-Old** is _Not_ Primary supported experiment version.
|
||||
Since This plugin is mainly focused on Op.2, other versions may not work correctly.
|
||||
|
||||
Changelog
|
||||
=========
|
||||
1.1.0 (Current)
|
||||
1.2.0 (Current)
|
||||
---------------
|
||||
- Nostalgia First version support.
|
||||
|
||||
1.1.0
|
||||
-----
|
||||
- Fix saving issue with brooch, island, and kentei.
|
||||
- Moved to Base64 encoded data base.
|
||||
- Forte support.
|
||||
|
|
|
|||
11
nostalgia@asphyxia/data/FirstMusic.ts
Normal file
11
nostalgia@asphyxia/data/FirstMusic.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { CommonMusicData, readJSONOrXML } from "./ForteMusic";
|
||||
import { readB64JSON } from "./helper";
|
||||
|
||||
export async function processData(): Promise<CommonMusicData> {
|
||||
if (IO.Exists("data/first_mdb.json.b64")) {
|
||||
return await readB64JSON("data/first_mdb.json.b64");
|
||||
}
|
||||
const data = await readJSONOrXML("data/first_mdb.json", "data/first_mdb.xml")
|
||||
// await IO.WriteFile("data/first_mdb.json.b64", Buffer.from(JSON.stringify(data)).toString("base64"))
|
||||
return data;
|
||||
}
|
||||
|
|
@ -5,7 +5,6 @@ export async function processData(): Promise<CommonMusicData> {
|
|||
return await readB64JSON("data/forte_mdb.json.b64");
|
||||
}
|
||||
const data = await readJSONOrXML("data/forte_mdb.json", "data/forte_mdb.xml")
|
||||
// await IO.WriteFile("data/forte_mdb.json.b64", Buffer.from(JSON.stringify(data)).toString("base64"))
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
@ -62,7 +61,7 @@ export async function readJSONOrXML(jsonPath: string, xmlPath: string): Promise<
|
|||
}
|
||||
}
|
||||
|
||||
interface CommonMusicData {
|
||||
export interface CommonMusicData {
|
||||
"@attr": {
|
||||
revision: string,
|
||||
release_code: string
|
||||
|
|
|
|||
1
nostalgia@asphyxia/data/first_mdb.json.b64
Normal file
1
nostalgia@asphyxia/data/first_mdb.json.b64
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,6 @@
|
|||
import { processData } from "../data/ForteMusic";
|
||||
|
||||
import { processData as firstData } from "../data/FirstMusic";
|
||||
import { processData as forteData } from "../data/ForteMusic";
|
||||
import { readB64JSON } from "../data/helper";
|
||||
import { NosVersionHelper } from "../utils";
|
||||
|
||||
|
|
@ -99,13 +101,7 @@ export const get_music_info: EPR = async (info, data, send) => {
|
|||
}));
|
||||
}
|
||||
|
||||
const music_list = async () => {
|
||||
const music_list = await processData()
|
||||
music_list.music_spec = music_list.music_spec.filter( (v) =>
|
||||
parseInt(v["@attr"].index, 10) <= version.getMusicMaxIndex()
|
||||
)
|
||||
return music_list;
|
||||
}
|
||||
const music_list = async () => version.version === 'Forte' ? await forteData() : await firstData()
|
||||
|
||||
const versionObject = version.isFirstOrForte()
|
||||
? {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user