forked from devsam/core
- ag-grid 기반 - 컬럼 사용자 정의 기능 제공 - 컬럼 재정렬, 고정, 정렬 기능 - 컬럼 상태 저장, 불러오기 - 마지막 컬럼 재 사용 - 아이콘, 장수명 클릭 시 특수 기능 제공 - 기본 세력 장수/암행부에서는 '감찰부' - 추가 컬럼 - 최근 전투 - 전투 수 - 승리 수 - 살상률 - API/Nation/GeneralList 추가 Co-authored-by: hide_d <hided62@gmail.com> Reviewed-on: https://storage.hided.net/gitea/devsam/core/pulls/213
92 lines
1.6 KiB
TypeScript
92 lines
1.6 KiB
TypeScript
export const OfficerLevelMapDefault: Record<number, string> = {
|
|
12: '군주',
|
|
11: '참모',
|
|
10: '제1장군',
|
|
9: '제1모사',
|
|
8: '제2장군',
|
|
7: '제2모사',
|
|
6: '제3장군',
|
|
5: '제3모사',
|
|
4: '태수',
|
|
3: '군사',
|
|
2: '종사',
|
|
1: '일반',
|
|
0: '재야',
|
|
}
|
|
|
|
export const OfficerLevelMapByNationLevel: Record<number, Record<number, string>> = {
|
|
7: {
|
|
12: '황제',
|
|
11: '승상',
|
|
10: '표기장군',
|
|
9: '사공',
|
|
8: '거기장군',
|
|
7: '태위',
|
|
6: '위장군',
|
|
5: '사도'
|
|
},
|
|
|
|
6: {
|
|
12: '왕',
|
|
11: '광록훈',
|
|
10: '좌장군',
|
|
9: '상서령',
|
|
8: '우장군',
|
|
7: '중서령',
|
|
6: '전장군',
|
|
5: '비서령'
|
|
},
|
|
|
|
5: {
|
|
12: '공',
|
|
11: '광록대부',
|
|
10: '안국장군',
|
|
9: '집금오',
|
|
8: '파로장군',
|
|
7: '소부'
|
|
},
|
|
|
|
4: {
|
|
12: '주목',
|
|
11: '태사령',
|
|
10: '아문장군',
|
|
9: '낭중',
|
|
8: '호군',
|
|
7: '종사중랑'
|
|
},
|
|
|
|
3: {
|
|
12: '주자사',
|
|
11: '주부',
|
|
10: '편장군',
|
|
9: '간의대부'
|
|
},
|
|
|
|
2: {
|
|
12: '군벌',
|
|
11: '참모',
|
|
10: '비장군',
|
|
9: '부참모'
|
|
},
|
|
|
|
1: {
|
|
12: '영주',
|
|
11: '참모'
|
|
},
|
|
|
|
0: {
|
|
12: '두목',
|
|
11: '부두목'
|
|
},
|
|
}
|
|
export function formatOfficerLevelText(officerLevel: number, nationLevel?: number) {
|
|
if (officerLevel < 5) {
|
|
return OfficerLevelMapDefault[officerLevel] ?? '???';
|
|
}
|
|
|
|
const nationMap = nationLevel === undefined
|
|
? OfficerLevelMapDefault
|
|
: (OfficerLevelMapByNationLevel[nationLevel] ?? OfficerLevelMapDefault);
|
|
|
|
return nationMap[officerLevel] ?? (OfficerLevelMapDefault[officerLevel] ?? '???');
|
|
} |