More story fixes

This commit is contained in:
gamer147
2026-05-25 19:07:49 -04:00
parent ce8d80559b
commit fa0901b776
16 changed files with 6361 additions and 48 deletions

View File

@@ -171,6 +171,38 @@ public class StoryMasterEntry
[JsonPropertyName("is_skip_enabled")]
[Key("is_skip_enabled")]
public bool IsSkipEnabled { get; set; }
// Optional — prod omits the key entirely on chapters without sub-chapters. Only emitted for
// chapters that split into N narrative vignettes (e.g. section 9 ch.13 has 5 sub-chapters).
// The client uses each sub's is_finish flag to derive the parent's ChapterClearStatus
// (AllCleared / AlreadyRead / NotCleared per StoryChapterData.GetClearStatusUsingSubChapter).
// Explicit WhenWritingNull (rather than relying on global policy) so the key is dropped
// under any serializer config — including the wire-shape snapshot test which sets
// DefaultIgnoreCondition=Never to exercise every populated field.
[JsonPropertyName("sub_chapters")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[Key("sub_chapters")]
public List<SubChapterDto>? SubChapters { get; set; }
}
[MessagePackObject]
public class SubChapterDto
{
[JsonPropertyName("story_id")]
[Key("story_id")]
public int StoryId { get; set; }
[JsonPropertyName("sub_chapter_id")]
[Key("sub_chapter_id")]
public int SubChapterId { get; set; }
[JsonPropertyName("is_finish")]
[Key("is_finish")]
public bool IsFinish { get; set; }
[JsonPropertyName("is_maintenance_chapter")]
[Key("is_maintenance_chapter")]
public bool IsMaintenanceChapter { get; set; }
}
[MessagePackObject]