feat: 실행 중 게임 옵션 변경을 지원
Gateway 관리 화면에서 현재 기수의 장수 생성 제한, 유저 자동턴, 턴 간격을 내구성 action으로 변경한다. 턴 간격 변경은 논리 tick과 현재 게임 시각을 보존하며 DB와 Redis의 tick 기반 시각을 재투영하고 기존 로그 timestamp는 유지한다.
This commit is contained in:
@@ -149,7 +149,7 @@ export const createWorldReadModelSignature = (world: InMemoryTurnWorld): string
|
||||
currentYear: state.currentYear,
|
||||
currentMonth: state.currentMonth,
|
||||
tickSeconds: state.tickSeconds,
|
||||
config: world.getScenarioConfig(),
|
||||
config: world.getWorldConfig(),
|
||||
meta: projectWorldMeta(state.meta),
|
||||
});
|
||||
};
|
||||
@@ -438,11 +438,7 @@ export const createReadModelChangeJournal = (changes: RealtimeReadModelChanges):
|
||||
if (changes.worldChanged) {
|
||||
journal.mark('world.content').mark('map.world');
|
||||
}
|
||||
if (
|
||||
changes.mapChanged ||
|
||||
(changes.mapCityIds ?? []).length > 0 ||
|
||||
(changes.mapNationIds ?? []).length > 0
|
||||
) {
|
||||
if (changes.mapChanged || (changes.mapCityIds ?? []).length > 0 || (changes.mapNationIds ?? []).length > 0) {
|
||||
journal.mark('map.world');
|
||||
}
|
||||
if ((changes.frontStatusGeneralIds ?? []).length > 0 || changes.frontStatusChanged) {
|
||||
@@ -1119,6 +1115,7 @@ export const createDatabaseTurnHooks = async (
|
||||
clockMode: state.clockMode ?? 'manual',
|
||||
clockWallAnchor: state.clockWallAnchor ?? state.lastTurnTime,
|
||||
lastTurnTick: BigInt(state.lastTurnTick ?? world.dateToGameTick(state.lastTurnTime)),
|
||||
config: asJson(world.getWorldConfig()),
|
||||
meta: asJson(state.meta),
|
||||
};
|
||||
const persist = async (
|
||||
|
||||
Reference in New Issue
Block a user