mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-09-22 22:27:56 +03:00
Fix GITADORA Plugin errors when launch asphyxia with devmode.
This commit is contained in:
@@ -60,7 +60,6 @@ export async function applySharedFavoriteMusicToExtra(refid : string, extra : Ex
|
||||
let favoriteMusic = await loadFavoriteMusic(refid)
|
||||
|
||||
if (favoriteMusic == null) {
|
||||
logger.debugInfo(`No shared favourite music available for profile ${refid}. Using game specific favorites. Favorites will be saved as shared favorites at the end of the game session.`);
|
||||
return
|
||||
}
|
||||
|
||||
@@ -84,10 +83,17 @@ export async function saveFavoriteMusic(refid: string, data : FavoriteMusic) : P
|
||||
}, data)
|
||||
}
|
||||
|
||||
export async function loadFavoriteMusic(refid : string) : Promise<FavoriteMusic>
|
||||
export async function loadFavoriteMusic(refid : string) : Promise<FavoriteMusic | null>
|
||||
{
|
||||
return await DB.FindOne<FavoriteMusic>(refid, {
|
||||
const favoriteMusic = await DB.FindOne<FavoriteMusic>(refid, {
|
||||
collection: 'favoritemusic'
|
||||
})
|
||||
|
||||
if (!favoriteMusic) {
|
||||
logger.debugInfo(`No shared favourite music available for profile ${refid}. Using game specific favorites. Favorites will be saved as shared favorites at the end of the game session.`);
|
||||
return null
|
||||
}
|
||||
|
||||
return favoriteMusic
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference lib="es2020.bigint" />
|
||||
|
||||
import { getEncoreStageData } from "../data/extrastage";
|
||||
import Logger from "../utils/logger";
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/// <reference lib="es2020.bigint" />
|
||||
|
||||
import { getDefaultPlayerInfo, PlayerInfo } from "../models/playerinfo";
|
||||
import { PlayerRanking } from "../models/playerranking";
|
||||
import { getDefaultProfile, Profile } from "../models/profile";
|
||||
|
||||
Reference in New Issue
Block a user