-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7b3276a
commit fe10279
Showing
4 changed files
with
412 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
interface studentsInfo { | ||
id?: number; | ||
info?: string; | ||
} | ||
|
||
interface schaleInfo { | ||
Id: number; | ||
IsReleased: boolean[]; | ||
DefaultOrder: number; | ||
PathName: string; | ||
DevName: string; | ||
/**姓名 */ | ||
Name: string; | ||
/**所在学校名字 */ | ||
School: string; | ||
/**所在部门名字 */ | ||
Club: string; | ||
StarGrade: number; | ||
SquadType: string; | ||
TacticRole: string; | ||
Summons: []; | ||
Position: string; | ||
BulletType: string; | ||
ArmorType: string; | ||
StreetBattleAdaptation: number; | ||
OutdoorBattleAdaptation: number; | ||
IndoorBattleAdaptation: number; | ||
WeaponType: string; | ||
WeaponImg: string; | ||
Cover: true; | ||
Equipment: string[]; | ||
CollectionBG: string; | ||
CollectionTexture: string; | ||
FamilyName: string; | ||
FamilyNameRuby: null; | ||
PersonalName: string; | ||
SchoolYear: string; | ||
CharacterAge: string; | ||
Birthday: string; | ||
CharacterSSRNew: string; | ||
ProfileIntroduction: string | ||
Hobby: string; | ||
CharacterVoice: string; | ||
BirthDay: string; | ||
ArtistName: string; | ||
CharHeightMetric: string; | ||
CharHeightImperial: string; | ||
StabilityPoint: number; | ||
AttackPower1: number; | ||
AttackPower100: number; | ||
MaxHP1: number; | ||
MaxHP100: number; | ||
DefensePower1: number; | ||
DefensePower100: number; | ||
HealPower1: number; | ||
HealPower100: number; | ||
DodgePoint: number; | ||
AccuracyPoint: number; | ||
CriticalPoint: number; | ||
CriticalDamageRate: number; | ||
AmmoCount: number; | ||
AmmoCost: number; | ||
Range: number; | ||
RegenCost: number; | ||
} | ||
|
||
export interface Main { | ||
studentsJson?: studentsInfo[]; | ||
schaleJson?: schaleInfo[]; | ||
} | ||
|
||
export interface MainInfo { | ||
json?: studentsInfo; | ||
schale?: schaleInfo; | ||
} | ||
|
||
export async function getStudentJson(): Promise<Main> { | ||
const studentsJson: studentsInfo[] = await fetch('/students.json').then(r => r.json()); | ||
const schaleJson: schaleInfo[] = await fetch('https://schale.gg/data/cn/students.min.json?v=102').then(r => r.json()); | ||
return { studentsJson, schaleJson }; | ||
} | ||
|
||
export function getStudentInfo({ studentsJson, schaleJson }: Main, studentId: number): MainInfo { | ||
const json = studentsJson && studentsJson.filter(info => (info.id === studentId))[0]; | ||
const schale = schaleJson && schaleJson.filter(info => (info.Id === studentId))[0]; | ||
return { json, schale }; | ||
} |
Oops, something went wrong.
fe10279
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
momotalk-editor – ./
momotalk-editor.vercel.app
momotalk.slouchwind.tk
momotalk-editor-slouchwind.vercel.app
momotalk-editor-git-main-slouchwind.vercel.app