From 08ce9ab1244d3d0836145b9ef5318d92bb250f7d Mon Sep 17 00:00:00 2001 From: MalitsPlus <50281195+MalitsPlus@users.noreply.github.com> Date: Sat, 9 Dec 2023 14:07:41 +0900 Subject: [PATCH] fix: conditionless init --- db/dao/card_dao.ts | 8 ++++---- db/dao/character_dao.ts | 6 +++--- db/dao/quest_dao.ts | 30 +++++++++++++++--------------- db/dao/setting_dao.ts | 6 +++--- db/dao/skill_dao.ts | 6 +++--- package-lock.json | 4 ++-- package.json | 2 +- 7 files changed, 31 insertions(+), 31 deletions(-) diff --git a/db/dao/card_dao.ts b/db/dao/card_dao.ts index ebc3780..3f39858 100644 --- a/db/dao/card_dao.ts +++ b/db/dao/card_dao.ts @@ -8,10 +8,10 @@ let rawCardParameter: CardParameter[] let rawCardRarity: CardRarity[] async function initCard() { - if (isAllInitialzed(rawCard, rawCardParameter, rawCardRarity)) { - console.debug("card already inited") - return - } + // if (isAllInitialzed(rawCard, rawCardParameter, rawCardRarity)) { + // console.debug("card already inited") + // return + // } const results = await Promise.all([ getRaw("Card"), getRaw("CardParameter"), diff --git a/db/dao/character_dao.ts b/db/dao/character_dao.ts index 53d1661..f454d6d 100644 --- a/db/dao/character_dao.ts +++ b/db/dao/character_dao.ts @@ -7,9 +7,9 @@ let rawChara: Character[] let rawCharaGroup: CharacterGroup[] async function initCharacter() { - if (isAllInitialzed(rawChara, rawCharaGroup)) { - return - } + // if (isAllInitialzed(rawChara, rawCharaGroup)) { + // return + // } const results = await Promise.all([ getRaw("Character"), getRaw("CharacterGroup"), diff --git a/db/dao/quest_dao.ts b/db/dao/quest_dao.ts index 6320f26..900ab2c 100644 --- a/db/dao/quest_dao.ts +++ b/db/dao/quest_dao.ts @@ -22,21 +22,21 @@ let allRawQuest: QuestBase[] async function initQuest() { - if (isAllInitialzed( - rawQuest, - rawMarathonQuest, - rawMusic, - rawMusicChartPattern, - rawLiveBonusGroup, - rawLiveBonus, - rawLiveAbility, - rawPvpQuest, - rawGvgQuest, - rawLeagueQuest, - rawRaidQuest - )) { - return - } + // if (isAllInitialzed( + // rawQuest, + // rawMarathonQuest, + // rawMusic, + // rawMusicChartPattern, + // rawLiveBonusGroup, + // rawLiveBonus, + // rawLiveAbility, + // rawPvpQuest, + // rawGvgQuest, + // rawLeagueQuest, + // rawRaidQuest + // )) { + // return + // } const results = await Promise.all([ getRaw("Quest"), getRaw("MarathonQuest"), diff --git a/db/dao/setting_dao.ts b/db/dao/setting_dao.ts index 3f90fdc..1a53c1d 100644 --- a/db/dao/setting_dao.ts +++ b/db/dao/setting_dao.ts @@ -7,9 +7,9 @@ import { Unpromise } from "./typeUtils" let rawSetting: Setting[] async function initSetting() { - if (isAllInitialzed(rawSetting)) { - return - } + // if (isAllInitialzed(rawSetting)) { + // return + // } const results = await Promise.all([ getRaw("Setting"), ]) diff --git a/db/dao/skill_dao.ts b/db/dao/skill_dao.ts index e2bb540..7c2a4c8 100644 --- a/db/dao/skill_dao.ts +++ b/db/dao/skill_dao.ts @@ -14,9 +14,9 @@ let rawSkillEfficacy: SkillEfficacy[] async function initSkill() { - if (isAllInitialzed(rawSkill, rawSkillTarget, rawSkillTrigger, rawSkillEfficacy)) { - return - } + // if (isAllInitialzed(rawSkill, rawSkillTarget, rawSkillTrigger, rawSkillEfficacy)) { + // return + // } const results = await Promise.all([ getRaw("Skill"), getRaw("SkillTarget"), diff --git a/package-lock.json b/package-lock.json index 7aaa7ce..978df45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "hoshimi-venus", - "version": "0.21.0", + "version": "0.21.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "hoshimi-venus", - "version": "0.21.0", + "version": "0.21.1", "license": "Apache-2.0", "dependencies": { "dotenv": "^16.3.1", diff --git a/package.json b/package.json index 3123a08..cc823cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hoshimi-venus", - "version": "0.21.0", + "version": "0.21.1", "author": "vibbit (https://github.com/MalitsPlus)", "description": "Venus System Library (tentative)", "keywords": [],