mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-03-21 17:34:46 -05:00
Now the player name can be saved via webui (BeatStream)
This commit is contained in:
parent
c3ad4e8c62
commit
ee92f52b59
|
|
@ -1,6 +1,6 @@
|
|||
# BeatStream
|
||||
|
||||
Plugin Version: **v1.0.1**
|
||||
Plugin Version: **v1.0.2**
|
||||
|
||||
Supported Versions:
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,10 @@ export namespace Bst2HandlersWebUI {
|
|||
sfxStreamNoteTail: number
|
||||
}) => {
|
||||
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" })
|
||||
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<IBst2Base>(data.refid, { collection: "bst.bst2.player.base" }, base)
|
||||
DBM.update<IBst2Customization>(data.refid, { collection: "bst.bst2.player.customization" }, customization)
|
||||
UtilityHandlersWebUI.pushMessage("Save BeatStream Animtribe settings succeeded!", 2, WebUIMessageType.success, data.refid)
|
||||
} catch (e) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user