feat: 내정보와 감찰부에 개인 봉급을 표시한다
공헌 등급에서 계산한 개인 봉급을 두 read model에 투영하고 공통 요약 첫 행에 배치한다. 전투·계략·사관 행과 봉급 snapshot이 없는 과거 플레이의 빈 slot은 유지한다.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { TRPCError } from '@trpc/server';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { LogCategory, LogScope } from '@sammo-ts/logic';
|
||||
import { getBillByLevel, LogCategory, LogScope } from '@sammo-ts/logic';
|
||||
import { asRecord, type RankDataType } from '@sammo-ts/common';
|
||||
|
||||
import type { GameApiContext } from '../../context.js';
|
||||
@@ -517,6 +517,7 @@ export const getGeneralContext = async (ctx: GameApiContext) => {
|
||||
injury: general.injury,
|
||||
experience: general.experience,
|
||||
dedication: general.dedication,
|
||||
bill: getBillByLevel(dedicationLevel),
|
||||
age: general.age,
|
||||
retirementYear,
|
||||
turnTime: general.turnTime.toISOString(),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { TRPCError } from '@trpc/server';
|
||||
|
||||
import { asRecord, type RankDataType } from '@sammo-ts/common';
|
||||
import { LogCategory } from '@sammo-ts/logic';
|
||||
import { getBillByLevel, LogCategory } from '@sammo-ts/logic';
|
||||
|
||||
import { accessAuthedProcedure } from '../../../trpc.js';
|
||||
import {
|
||||
@@ -201,6 +201,7 @@ export const getBattleCenter = accessAuthedProcedure.query(async ({ ctx }) => {
|
||||
},
|
||||
experience: general.experience,
|
||||
dedication: general.dedication,
|
||||
bill: getBillByLevel(dedicationLevel),
|
||||
injury: general.injury,
|
||||
gold: general.gold,
|
||||
rice: general.rice,
|
||||
|
||||
@@ -297,6 +297,7 @@ describe('in-game my information ownership', () => {
|
||||
statUpgradeLimit: 20,
|
||||
dex: [350, 1_375, 3_500, 7_125, 12_650],
|
||||
},
|
||||
bill: 1_000,
|
||||
},
|
||||
city: {
|
||||
population: 322_886,
|
||||
@@ -433,6 +434,7 @@ describe('in-game my information ownership', () => {
|
||||
stats: { attack: 100, defence: 150, speed: 7, avoid: 10, magicCoef: 0, cost: 9, rice: 9 },
|
||||
},
|
||||
progression: { experienceLevel: 4, dedicationLevel: 2, dedicationText: '29품관' },
|
||||
bill: 800,
|
||||
itemNames: { horse: '노새(+3)' },
|
||||
itemInfo: { horse: '통솔 +3' },
|
||||
},
|
||||
@@ -855,6 +857,7 @@ describe('battle-center general and user permissions', () => {
|
||||
statUpgradeLimit: 20,
|
||||
dex: [0, 0, 0, 0, 0],
|
||||
},
|
||||
bill: 600,
|
||||
serviceYears: 3,
|
||||
battleStats: {
|
||||
kills: 5,
|
||||
|
||||
Reference in New Issue
Block a user