constraint 실패 후 실패 검사 결과 항목을 직접 반환.
This commit is contained in:
@@ -340,11 +340,12 @@ const buildConstraintContext = (
|
||||
mode: 'full',
|
||||
});
|
||||
|
||||
const createActionLog = (message: string): LogEntryDraft => ({
|
||||
const createActionLog = (message: string, meta?: Record<string, unknown>): LogEntryDraft => ({
|
||||
scope: LogScope.GENERAL,
|
||||
category: LogCategory.ACTION,
|
||||
format: LogFormat.MONTH,
|
||||
text: message,
|
||||
meta,
|
||||
});
|
||||
|
||||
const resolveDefinition = (
|
||||
@@ -505,7 +506,8 @@ export const createReservedTurnHandler = async (options: {
|
||||
actionArgs = definition.parseArgs({}) ?? {};
|
||||
actionKey = definition.key;
|
||||
const reason = result.kind === 'deny' ? result.reason : '조건을 확인할 수 없습니다.';
|
||||
logs.push(createActionLog(reason));
|
||||
const meta = result.kind === 'deny' ? { constraintName: result.constraintName } : undefined;
|
||||
logs.push(createActionLog(reason, meta));
|
||||
}
|
||||
|
||||
const seedBase = buildSeedBase(context.world);
|
||||
|
||||
Reference in New Issue
Block a user