Skip to content

Commit

Permalink
fix: conditionless init
Browse files Browse the repository at this point in the history
  • Loading branch information
MalitsPlus committed Dec 9, 2023
1 parent 96db35f commit 08ce9ab
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 31 deletions.
8 changes: 4 additions & 4 deletions db/dao/card_dao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[]>("Card"),
getRaw<CardParameter[]>("CardParameter"),
Expand Down
6 changes: 3 additions & 3 deletions db/dao/character_dao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[]>("Character"),
getRaw<CharacterGroup[]>("CharacterGroup"),
Expand Down
30 changes: 15 additions & 15 deletions db/dao/quest_dao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<QuestBase[]>("Quest"),
getRaw<QuestBase[]>("MarathonQuest"),
Expand Down
6 changes: 3 additions & 3 deletions db/dao/setting_dao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[]>("Setting"),
])
Expand Down
6 changes: 3 additions & 3 deletions db/dao/skill_dao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[]>("Skill"),
getRaw<SkillTarget[]>("SkillTarget"),
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [],
Expand Down

0 comments on commit 08ce9ab

Please sign in to comment.