fix(level): 默认返回 punchline 和 hint1 线索提示
未通关用户现在可以查看谐音梗说明和第一个线索提示, hint2/hint3 仍需通关后才显示。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -22,10 +22,10 @@ export class LevelListItemDto {
|
||||
@ApiProperty({ description: '答案(仅已通关时返回)', nullable: true })
|
||||
answer!: string | null;
|
||||
|
||||
@ApiProperty({ description: '谐音梗说明(仅已通关时返回)', nullable: true })
|
||||
@ApiProperty({ description: '谐音梗说明(始终返回)', nullable: true })
|
||||
punchline!: string | null;
|
||||
|
||||
@ApiProperty({ description: '线索1(仅已通关时返回)', nullable: true })
|
||||
@ApiProperty({ description: '线索1(始终返回)', nullable: true })
|
||||
hint1!: string | null;
|
||||
|
||||
@ApiProperty({ description: '线索2(仅已通关时返回)', nullable: true })
|
||||
|
||||
@@ -31,6 +31,7 @@ export function pickLevelImageFields(level: Level): LevelImageFields {
|
||||
|
||||
/**
|
||||
* Pick image fields with answer/hints masked for non-completed levels.
|
||||
* hint1 is always shown (first clue is the default hint shown to players).
|
||||
*/
|
||||
export function pickLevelImageFieldsMasked(
|
||||
level: Level,
|
||||
@@ -41,8 +42,8 @@ export function pickLevelImageFieldsMasked(
|
||||
image1Description: level.image1Description,
|
||||
image2Url: level.image2Url,
|
||||
image2Description: level.image2Description,
|
||||
punchline: completed ? level.punchline : null,
|
||||
hint1: completed ? level.hint1 : null,
|
||||
punchline: level.punchline,
|
||||
hint1: level.hint1,
|
||||
hint2: completed ? level.hint2 : null,
|
||||
hint3: completed ? level.hint3 : null,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user