feat: 응답 가능한 서신과 턴 시간 호환 이관
등용장과 이민족 선택 응답을 turn daemon transaction으로 연결하고 Ref의 통일 이후 상태 전이와 수신자별 메시지 저장 규칙을 보존한다.\n\n유산 턴 시간 변경을 nextTurnTimeBase 기반 결정적 계산으로 바로잡고 API, 엔진, Chromium 회귀를 추가한다.
This commit is contained in:
@@ -111,6 +111,14 @@ const zInstantRetreat = z.object({
|
||||
generalId: zFiniteNumber,
|
||||
});
|
||||
|
||||
const zMessageRespond = z.object({
|
||||
type: z.literal('messageRespond'),
|
||||
userId: z.string().min(1),
|
||||
generalId: z.number().int().positive(),
|
||||
messageId: z.number().int().positive(),
|
||||
response: z.boolean(),
|
||||
});
|
||||
|
||||
const zVacation = z.object({
|
||||
type: z.literal('vacation'),
|
||||
generalId: zFiniteNumber,
|
||||
@@ -488,6 +496,14 @@ const normalizeInstantRetreat: CommandNormalizer<'instantRetreat'> = (envelope)
|
||||
return { ...command, requestId: envelope.requestId };
|
||||
};
|
||||
|
||||
const normalizeMessageRespond: CommandNormalizer<'messageRespond'> = (envelope) => {
|
||||
const command = parseWith(zMessageRespond, envelope.command);
|
||||
if (!command) {
|
||||
return null;
|
||||
}
|
||||
return { ...command, requestId: envelope.requestId };
|
||||
};
|
||||
|
||||
const normalizeVacation: CommandNormalizer<'vacation'> = (envelope) => {
|
||||
const command = parseWith(zVacation, envelope.command);
|
||||
if (!command) {
|
||||
@@ -705,6 +721,7 @@ const normalizers: CommandNormalizerMap = {
|
||||
ensureDieOnPrestartStatus: normalizeEnsureDieOnPrestartStatus,
|
||||
buildNationCandidate: normalizeBuildNationCandidate,
|
||||
instantRetreat: normalizeInstantRetreat,
|
||||
messageRespond: normalizeMessageRespond,
|
||||
vacation: normalizeVacation,
|
||||
setMySetting: normalizeSetMySetting,
|
||||
dropItem: normalizeDropItem,
|
||||
|
||||
Reference in New Issue
Block a user