feat(WIP): processing, 출병 추가
- 장수 선택기 추가 - v-model 안 쓰는 바보짓 수정 - proc 전역 변수를 procRes로 묶음
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
import { combineArray } from "@/util/combineArray";
|
||||
|
||||
export type procGeneralItem = {
|
||||
no: number,
|
||||
name: string,
|
||||
officerLevel: number,
|
||||
npc: number,
|
||||
gold: number,
|
||||
rice: number,
|
||||
leadership: number,
|
||||
strength: number,
|
||||
intel: number,
|
||||
cityID: number,
|
||||
crew: number,
|
||||
train: number,
|
||||
atmos: number,
|
||||
troopID: number,
|
||||
}
|
||||
|
||||
export type procGeneralList = procGeneralItem[];
|
||||
|
||||
export type procGeneralKeyList = [
|
||||
'no', 'name', 'officerLevel', 'npc', 'gold', 'rice', 'leadership', 'strength', 'intel', 'cityID', 'crew', 'train', 'atmos', 'troopID'
|
||||
];
|
||||
|
||||
export type procGeneralRawItem = [
|
||||
procGeneralItem[procGeneralKeyList[0]],
|
||||
procGeneralItem[procGeneralKeyList[1]],
|
||||
procGeneralItem[procGeneralKeyList[2]],
|
||||
procGeneralItem[procGeneralKeyList[3]],
|
||||
procGeneralItem[procGeneralKeyList[4]],
|
||||
procGeneralItem[procGeneralKeyList[5]],
|
||||
procGeneralItem[procGeneralKeyList[6]],
|
||||
procGeneralItem[procGeneralKeyList[7]],
|
||||
procGeneralItem[procGeneralKeyList[8]],
|
||||
procGeneralItem[procGeneralKeyList[9]],
|
||||
procGeneralItem[procGeneralKeyList[10]],
|
||||
procGeneralItem[procGeneralKeyList[11]],
|
||||
procGeneralItem[procGeneralKeyList[12]],
|
||||
procGeneralItem[procGeneralKeyList[13]],
|
||||
];
|
||||
|
||||
export type procTroopItem = {
|
||||
troop_leader: number,
|
||||
nation: number,
|
||||
name: string
|
||||
};
|
||||
export type procTroopList = Record<number, procTroopItem>;
|
||||
|
||||
export type procGeneralRawItemList = procGeneralRawItem[];
|
||||
|
||||
export function convertGeneralList(keys: procGeneralKeyList, rawList: procGeneralRawItemList): procGeneralList{
|
||||
return combineArray(rawList, keys) as procGeneralList;
|
||||
}
|
||||
Reference in New Issue
Block a user