feat: 실행 중 게임 옵션 변경을 지원
Gateway 관리 화면에서 현재 기수의 장수 생성 제한, 유저 자동턴, 턴 간격을 내구성 action으로 변경한다. 턴 간격 변경은 논리 tick과 현재 게임 시각을 보존하며 DB와 Redis의 tick 기반 시각을 재투영하고 기존 로그 timestamp는 유지한다.
This commit is contained in:
@@ -41,6 +41,19 @@ export interface TurnDaemonStatus {
|
||||
checkpoint?: TurnCheckpoint;
|
||||
}
|
||||
|
||||
export type RuntimeAutorunUserOption = 'develop' | 'warp' | 'recruit' | 'recruit_high' | 'train' | 'battle' | 'chief';
|
||||
|
||||
export interface RuntimeAutorunUserSettings {
|
||||
limitMinutes: number;
|
||||
options: RuntimeAutorunUserOption[];
|
||||
}
|
||||
|
||||
export interface RuntimeGameSettingsPatch {
|
||||
turnTermMinutes?: number;
|
||||
blockGeneralCreate?: 0 | 1 | 2;
|
||||
autorunUser?: RuntimeAutorunUserSettings | null;
|
||||
}
|
||||
|
||||
export type TurnDaemonCommand =
|
||||
| {
|
||||
type: 'run';
|
||||
@@ -49,6 +62,12 @@ export type TurnDaemonCommand =
|
||||
targetTime?: string;
|
||||
budget?: TurnRunBudget;
|
||||
}
|
||||
| {
|
||||
type: 'updateRuntimeSettings';
|
||||
requestId?: string;
|
||||
actionId: string;
|
||||
settings: RuntimeGameSettingsPatch;
|
||||
}
|
||||
| { type: 'pause'; requestId?: string; reason?: string }
|
||||
| { type: 'resume'; requestId?: string; reason?: string }
|
||||
| { type: 'shutdown'; requestId?: string; reason?: string }
|
||||
@@ -284,6 +303,29 @@ export type TurnDaemonCommandResult =
|
||||
commandType: TurnDaemonCommand['type'];
|
||||
reason: string;
|
||||
}
|
||||
| {
|
||||
type: 'updateRuntimeSettings';
|
||||
ok: true;
|
||||
actionId: string;
|
||||
settings: RuntimeGameSettingsPatch;
|
||||
termChanged: boolean;
|
||||
previousTurnTermMinutes: number;
|
||||
turnTermMinutes: number;
|
||||
previousClockBaseTime: string;
|
||||
clockBaseTime: string;
|
||||
lastTurnTime: string;
|
||||
shiftedGenerals: number;
|
||||
reprojectedAuctions: number;
|
||||
reprojectedMessages: number;
|
||||
reprojectedVotes: number;
|
||||
checkpoint?: TurnCheckpoint;
|
||||
}
|
||||
| {
|
||||
type: 'updateRuntimeSettings';
|
||||
ok: false;
|
||||
actionId: string;
|
||||
reason: string;
|
||||
}
|
||||
| {
|
||||
type: 'shiftSchedule';
|
||||
ok: true;
|
||||
|
||||
Reference in New Issue
Block a user