mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-15 09:48:14 +08:00
feat(GCG): 添加 GCG 数据,目前只有简略的
This commit is contained in:
1736
src/data/app/GCG.json
Normal file
1736
src/data/app/GCG.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -5,12 +5,16 @@
|
||||
* @since Alpha
|
||||
*/
|
||||
|
||||
// Data
|
||||
import achievements from "./achievements.json";
|
||||
import achievementSeries from "./achievementSeries.json";
|
||||
import GCG from "./GCG.json";
|
||||
import nameCards from "./nameCards.json";
|
||||
// Interface
|
||||
import { Achievement, AchievementSeries } from "../../interface/Achievements";
|
||||
import { NameCard } from "../../interface/NameCard";
|
||||
import { Map } from "../../interface/Base";
|
||||
import { BaseCard } from "../../interface/GCG";
|
||||
import { NameCard } from "../../interface/NameCard";
|
||||
|
||||
export const AppDataList = [
|
||||
{
|
||||
@@ -21,6 +25,10 @@ export const AppDataList = [
|
||||
name: "achievementSeries.json",
|
||||
data: achievementSeries as Map<AchievementSeries>,
|
||||
},
|
||||
{
|
||||
name: "GCG.json",
|
||||
data: GCG as BaseCard[],
|
||||
},
|
||||
{
|
||||
name: "nameCards.json",
|
||||
data: nameCards as unknown as Map<NameCard[]>,
|
||||
@@ -30,5 +38,6 @@ export const AppDataList = [
|
||||
export const AppData = {
|
||||
achievements: achievements as Map<Achievement>,
|
||||
achievementSeries: achievementSeries as Map<AchievementSeries>,
|
||||
GCG: GCG as BaseCard[],
|
||||
nameCards: nameCards as unknown as Map<NameCard[]>,
|
||||
};
|
||||
|
||||
37
src/data/init/GCG.ts
Normal file
37
src/data/init/GCG.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @file data init GCG
|
||||
* @description data init GCG
|
||||
* @description 分类参考:米游社卡牌图鉴
|
||||
* @author BTMuli<bt-muli@outlook.com>
|
||||
* @since Alpha
|
||||
*/
|
||||
import { AppData } from "../app";
|
||||
import { BaseCard } from "../../interface/GCG";
|
||||
|
||||
/**
|
||||
* @description 卡牌表参数
|
||||
* @since Alpha
|
||||
*/
|
||||
export const Config = {
|
||||
storeName: "GCG",
|
||||
keyPath: "name",
|
||||
// 根据 type 分类
|
||||
indexes: [
|
||||
"type",
|
||||
"info.element",
|
||||
"info.weapon",
|
||||
"info.camp",
|
||||
"info.actionType",
|
||||
"info.actionTag",
|
||||
"info.actionCost",
|
||||
],
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 卡牌数据
|
||||
* @since Alpha
|
||||
* @return {BaseCard[]}
|
||||
*/
|
||||
export function getData() {
|
||||
return AppData.GCG;
|
||||
}
|
||||
@@ -4,17 +4,14 @@
|
||||
* @author BTMuli<bt-muli@outlook.com>
|
||||
* @since Alpha
|
||||
*/
|
||||
import { Config as NameCardConfig, getData as getNameCardData } from "./nameCard";
|
||||
import { Config as AchievementsConfig, getData as getAchievementsData } from "./achievements";
|
||||
import { Config as GCGConfig, getData as getGCGData } from "./GCG";
|
||||
import { Config as NameCardConfig, getData as getNameCardData } from "./nameCard";
|
||||
import { Config as SeriesConfig, getData as getSeriesData } from "./achievementSeries";
|
||||
|
||||
export const ConfigList = [NameCardConfig, AchievementsConfig, SeriesConfig];
|
||||
export const ConfigList = [AchievementsConfig, GCGConfig, NameCardConfig, SeriesConfig];
|
||||
|
||||
export const getDataList = [
|
||||
{
|
||||
name: "NameCard",
|
||||
data: getNameCardData(),
|
||||
},
|
||||
{
|
||||
name: "Achievements",
|
||||
data: getAchievementsData(),
|
||||
@@ -23,4 +20,12 @@ export const getDataList = [
|
||||
name: "AchievementSeries",
|
||||
data: getSeriesData(),
|
||||
},
|
||||
{
|
||||
name: "GCG",
|
||||
data: getGCGData(),
|
||||
},
|
||||
{
|
||||
name: "NameCard",
|
||||
data: getNameCardData(),
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user