내무부, 금/쌀수입, 감찰부 구현

This commit is contained in:
2026-01-18 16:40:12 +00:00
parent bb618a9ade
commit 5b51aad6d0
15 changed files with 2705 additions and 143 deletions
@@ -0,0 +1,22 @@
import type { TurnCalendarHandler } from './inMemoryWorld.js';
export const composeCalendarHandlers = (
...handlers: Array<TurnCalendarHandler | null | undefined>
): TurnCalendarHandler | null => {
const resolved = handlers.filter(Boolean) as TurnCalendarHandler[];
if (resolved.length === 0) {
return null;
}
return {
onMonthChanged: (context) => {
for (const handler of resolved) {
handler.onMonthChanged?.(context);
}
},
onYearChanged: (context) => {
for (const handler of resolved) {
handler.onYearChanged?.(context);
}
},
};
};