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]

View File

@@ -106,4 +106,15 @@ public class SectionEntry
[JsonPropertyName("is_play_another_end_appearance_animation")]
[Key("is_play_another_end_appearance_animation")]
public bool IsPlayAnotherEndAppearanceAnimation { get; set; }
// Prod sends is_spoiler as 0/1 int (not bool) and spoiler_message as a SystemText key
// (e.g. "story_section_14"). Used by limited-story sections that sit inside main-story
// worlds — the client hides their title until you've cleared the gating main section.
[JsonPropertyName("is_spoiler")]
[Key("is_spoiler")]
public int IsSpoiler { get; set; }
[JsonPropertyName("spoiler_message")]
[Key("spoiler_message")]
public string SpoilerMessage { get; set; } = "";
}