Closed Captions / Subtitles for Vintage Story.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update ID algorithm to remove - and _.

This simplifies the sound descriptions for The Critter Pack a lot.

+1 -1
+1 -1
ClosedCaptions/Caption.cs
··· 68 68 var id = sound.Location.Path; 69 69 if (id.StartsWith("sounds/")) id = id[7..]; 70 70 if (id.EndsWith(".ogg")) id = id[..^4]; 71 - id = id.TrimEnd('0', '1', '2', '3', '4', '5', '6', '7', '8', '9'); 71 + id = id.TrimEnd('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '_'); 72 72 73 73 // Unnamed sounds use ID as fallback. 74 74 var name = Lang.GetIfExists("captions:" + id) ?? id;