mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-09-22 22:27:56 +03:00
Merge pull request #20 from RoxCian/bst-support
Fix a webui bug about name saving for BeatStream Animtribe
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# BeatStream
|
# BeatStream
|
||||||
|
|
||||||
Plugin Version: **v1.0.1**
|
Plugin Version: **v1.0.2**
|
||||||
|
|
||||||
Supported Versions:
|
Supported Versions:
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,10 @@ export namespace Bst2HandlersWebUI {
|
|||||||
sfxStreamNoteTail: number
|
sfxStreamNoteTail: number
|
||||||
}) => {
|
}) => {
|
||||||
try {
|
try {
|
||||||
|
let base = await DB.FindOne<IBst2Base>(data.refid, { collection: "bst.bst2.player.base" })
|
||||||
let customization = await DB.FindOne<IBst2Customization>(data.refid, { collection: "bst.bst2.player.customization" })
|
let customization = await DB.FindOne<IBst2Customization>(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[0] = data.rippleNote
|
||||||
customization.custom[2] = data.sfxNormalNote
|
customization.custom[2] = data.sfxNormalNote
|
||||||
customization.custom[3] = data.sfxRippleNote
|
customization.custom[3] = data.sfxRippleNote
|
||||||
@@ -30,6 +32,7 @@ export namespace Bst2HandlersWebUI {
|
|||||||
customization.custom[6] = data.backgroundBrightness
|
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[7] = (data.judgeText << 0) | (data.rippleNoteGuide << 1) | (data.streamNoteGuide << 2) | (data.sfxStreamNoteTail << 3) | (data.sfxFine << 4)
|
||||||
customization.custom[9] = data.judgeText
|
customization.custom[9] = data.judgeText
|
||||||
|
DBM.update<IBst2Base>(data.refid, { collection: "bst.bst2.player.base" }, base)
|
||||||
DBM.update<IBst2Customization>(data.refid, { collection: "bst.bst2.player.customization" }, customization)
|
DBM.update<IBst2Customization>(data.refid, { collection: "bst.bst2.player.customization" }, customization)
|
||||||
UtilityHandlersWebUI.pushMessage("Save BeatStream Animtribe settings succeeded!", 2, WebUIMessageType.success, data.refid)
|
UtilityHandlersWebUI.pushMessage("Save BeatStream Animtribe settings succeeded!", 2, WebUIMessageType.success, data.refid)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user