diff --git a/bst@asphyxia/README.md b/bst@asphyxia/README.md index e1e4ebc..d47c864 100644 --- a/bst@asphyxia/README.md +++ b/bst@asphyxia/README.md @@ -1,6 +1,6 @@ # BeatStream -Plugin Version: **v1.0.1** +Plugin Version: **v1.0.2** Supported Versions: diff --git a/bst@asphyxia/handlers/bst2/webui.ts b/bst@asphyxia/handlers/bst2/webui.ts index 85e6ffd..ecd0ce0 100644 --- a/bst@asphyxia/handlers/bst2/webui.ts +++ b/bst@asphyxia/handlers/bst2/webui.ts @@ -20,8 +20,10 @@ export namespace Bst2HandlersWebUI { sfxStreamNoteTail: number }) => { try { + let base = await DB.FindOne(data.refid, { collection: "bst.bst2.player.base" }) let customization = await DB.FindOne(data.refid, { collection: "bst.bst2.player.customization" }) - if (customization == null) throw new Error("No profile for refid=" + data.refid) + if (!customization || !base) throw new Error("No profile for refid=" + data.refid) + base.name = data.name customization.custom[0] = data.rippleNote customization.custom[2] = data.sfxNormalNote customization.custom[3] = data.sfxRippleNote @@ -30,6 +32,7 @@ export namespace Bst2HandlersWebUI { customization.custom[6] = data.backgroundBrightness customization.custom[7] = (data.judgeText << 0) | (data.rippleNoteGuide << 1) | (data.streamNoteGuide << 2) | (data.sfxStreamNoteTail << 3) | (data.sfxFine << 4) customization.custom[9] = data.judgeText + DBM.update(data.refid, { collection: "bst.bst2.player.base" }, base) DBM.update(data.refid, { collection: "bst.bst2.player.customization" }, customization) UtilityHandlersWebUI.pushMessage("Save BeatStream Animtribe settings succeeded!", 2, WebUIMessageType.success, data.refid) } catch (e) {