merge: 최신 main을 턴 입력기 연월 경계 수정에 통합한다

This commit is contained in:
2026-08-21 17:17:41 +00:00
24 changed files with 305 additions and 25 deletions
+2 -1
View File
@@ -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';
@@ -526,6 +526,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(),
+3
View File
@@ -68,7 +68,10 @@ export const lobbyRouter = router({
preopenAt: worldState.meta.preopenAt ?? '',
turntime: worldState.meta.turntime ?? '',
serverTime: gameTime.now.toISOString(),
serverWallTime: gameTime.wallNow.toISOString(),
clockMode: gameTime.mode ?? 'realtime',
clockRunning: gameTime.running,
clockStartsAt: gameTime.startsAt?.toISOString() ?? null,
otherTextInfo: worldState.meta.otherTextInfo ?? '',
npcMode: worldState.config.npcMode ?? 0,
defaultStatTotal: asNumber(asRecord(rawConfig.stat).total, 165),
@@ -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,
+3 -2
View File
@@ -79,7 +79,7 @@ export const troopRouter = router({
troopLeaderIds.length === 0
? []
: await ctx.db.generalTurn.findMany({
where: { generalId: { in: troopLeaderIds } },
where: { generalId: { in: troopLeaderIds }, turnIdx: { lt: 5 } },
select: { generalId: true, turnIdx: true, actionCode: true },
orderBy: [{ generalId: 'asc' }, { turnIdx: 'asc' }],
});
@@ -94,7 +94,8 @@ export const troopRouter = router({
: 30;
for (const turn of turns) {
const list = reservedByLeader.get(turn.generalId) ?? [];
list.push(turn.actionCode);
// Ref 부대 편성은 앞쪽 슬롯이 집합인지 여부만 공개하고 다른 명령은 가립니다.
list.push(turn.actionCode === 'che_집합' ? '집합' : '-');
reservedByLeader.set(turn.generalId, list);
}