-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ZO add zzz_dm using hakush.in * get HakushinData * add zzz-stats * baboom * fix bugs
- Loading branch information
Showing
525 changed files
with
88,390 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './lib/extrapolateFloat' | ||
export * from './lib/fetch' | ||
export * from './lib/pipeline' | ||
export * from './lib/util' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { get as httpsGet } from 'https' | ||
|
||
export function fetchJsonFromUrl(url: string, debug = false) { | ||
debug && console.log('Fetching', url) | ||
return new Promise((resolve, reject) => { | ||
httpsGet(url, (response) => { | ||
let data = '' | ||
|
||
// Accumulate data as it comes in | ||
response.on('data', (chunk) => { | ||
data += chunk | ||
}) | ||
|
||
// Resolve the promise once all data has been received | ||
response.on('end', () => { | ||
try { | ||
const json = JSON.parse(data) | ||
resolve(json) | ||
} catch (error) { | ||
reject(new Error(`Failed to parse JSON: ${(error as Error).message}`)) | ||
} | ||
}) | ||
}).on('error', (error) => { | ||
reject(new Error(`Request failed: ${error.message}`)) | ||
}) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { allAnomalyDmgKeys, allAttributeDamageKeys } from './common' | ||
|
||
export const allFormulaKeys = [ | ||
'initial_atk', | ||
...allAttributeDamageKeys, | ||
...allAnomalyDmgKeys, | ||
] as const | ||
export type FormulaKey = (typeof allFormulaKeys)[number] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export * from './character' | ||
export * from './common' | ||
export * from './disc' | ||
export * from './formula' | ||
export * from './wengine' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
export const allWengineRarityKeys = ['S', 'A'] as const | ||
export type WengineRarityKey = (typeof allWengineRarityKeys)[number] | ||
|
||
export const allWengineKeys = [ | ||
'BashfulDemon', | ||
'BigCylinder', | ||
'BlazingLaurel', | ||
'BunnyBand', | ||
'CannonRotor', | ||
'DeepSeaVisitor', | ||
'DemaraBatteryMarkII', | ||
'DrillRigRedAxis', | ||
'ElectroLipGloss', | ||
'ElegantVanity', | ||
'FlamemakerShaker', | ||
'FusionCompiler', | ||
'GildedBlossom', | ||
'HailstormShrine', | ||
'HeartstringNocturne', | ||
'HellfireGears', | ||
'Housekeeper', | ||
'IceJadeTeapot', | ||
'IdentityBase', | ||
'IdentityInflection', | ||
'KaboomTheCannon', | ||
'LunarDecrescent', | ||
'LunarNoviluna', | ||
'LunarPleniluna', | ||
'MagneticStormAlpha', | ||
'MagneticStormBravo', | ||
'MagneticStormCharlie', | ||
'MarcatoDesire', | ||
'OriginalTransmorpher', | ||
'PeacekeeperSpecialized', | ||
'PreciousFossilizedCore', | ||
'RainforestGourmet', | ||
'ReverbMarkI', | ||
'ReverbMarkII', | ||
'ReverbMarkIII', | ||
'RiotSuppressorMarkVI', | ||
'RoaringRide', | ||
'SharpenedStinger', | ||
'SixShooter', | ||
'SliceOfTime', | ||
'SpringEmbrace', | ||
'StarlightEngine', | ||
'StarlightEngineReplica', | ||
'SteamOven', | ||
'SteelCushion', | ||
'StreetSuperstar', | ||
'TheBrimstone', | ||
'TheRestrained', | ||
'TheVault', | ||
'Timeweaver', | ||
'TusksOfFury', | ||
'UnfetteredGameBall', | ||
'VortexArrow', | ||
'VortexHatchet', | ||
'VortexRevolver', | ||
'WeepingCradle', | ||
'WeepingGemini', | ||
'ZanshinHerbCase', | ||
] as const | ||
|
||
export type WengineKey = (typeof allWengineKeys)[number] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './useCharacter' | ||
export * from './useDisc' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { useDataManagerBase } from '@genshin-optimizer/common/database-ui' | ||
import type { CharacterKey } from '@genshin-optimizer/zzz/consts' | ||
import { useDatabaseContext } from '../context' | ||
|
||
export function useCharacter(characterKey: CharacterKey | '' | undefined) { | ||
const { database } = useDatabaseContext() | ||
return useDataManagerBase(database.chars, characterKey as CharacterKey) | ||
} |
Oops, something went wrong.