feat(WIP): 장비매매

- 초성 검색을 일원화
This commit is contained in:
2021-12-23 00:48:53 +09:00
parent cfbaf60989
commit 41d5df60f4
12 changed files with 442 additions and 117 deletions
+18 -3
View File
@@ -1,3 +1,4 @@
import { ItemTypeKey } from "@/defs";
import { combineArray } from "@/util/combineArray";
export type procGeneralItem = {
@@ -20,7 +21,7 @@ export type procGeneralItem = {
export type procGeneralList = procGeneralItem[];
export type procGeneralKey = 'no'| 'name'| 'nationID' | 'officerLevel'| 'npc'| 'gold'| 'rice'| 'leadership'| 'strength'| 'intel'| 'cityID'| 'crew'| 'train'| 'atmos'| 'troopID';
export type procGeneralKey = 'no' | 'name' | 'nationID' | 'officerLevel' | 'npc' | 'gold' | 'rice' | 'leadership' | 'strength' | 'intel' | 'cityID' | 'crew' | 'train' | 'atmos' | 'troopID';
export type procGeneralRawItem = procGeneralItem[procGeneralKey][];
@@ -33,7 +34,7 @@ export type procTroopList = Record<number, procTroopItem>;
export type procGeneralRawItemList = procGeneralRawItem[];
export function convertGeneralList(keys: procGeneralKey[], rawList: procGeneralRawItemList): procGeneralList{
export function convertGeneralList(keys: procGeneralKey[], rawList: procGeneralRawItemList): procGeneralList {
return combineArray(rawList, keys) as procGeneralList;
}
@@ -80,4 +81,18 @@ export type procCrewTypeItem = {
avoid: number,
img: string,
info: string[],
}
}
export type procItemType = {
id: string,
name: string,
reqSecu: number,
cost: number,
info: string,//<br>
isBuyable: boolean,
}
export type procItemList = Record<ItemTypeKey, {
typeName: string,
values: procItemType[],
}>