fix: preserve pre-month notice log date

This commit is contained in:
2026-07-25 23:43:03 +00:00
parent ed9d479359
commit 9405055a97
3 changed files with 346 additions and 1 deletions
@@ -32,7 +32,7 @@ export const createProcessIncomeActionHandler = (incomeHandler: IncomeHandler):
export const createNoticeToHistoryLogHandler = (options: {
getWorld: () => InMemoryTurnWorld | null;
}): MonthlyEventActionHandler => {
return (args) => {
return (args, environment) => {
const text = args[0];
if (typeof text !== 'string') {
throw new Error('NoticeToHistoryLog message must be a string.');
@@ -46,6 +46,8 @@ export const createNoticeToHistoryLogHandler = (options: {
category: LogCategory.HISTORY,
text,
format: parseLogFormat(args[1]),
year: environment.year,
month: environment.month,
});
};
};