Changes

Jump to navigation Jump to search
216 bytes added ,  00:12, 20 October 2021
→‎Track list export: update for decimal index
Line 1: Line 1:  
==Track list export==
 
==Track list export==
The initial track list was exported with this code, which can be run as a [[Modding:Modder Guide/Get Started|C# mod]]:
+
The initial track list was exported with this code, which can be run as a [[Modding:Modder Guide/Get Started|C# mod]] in Stardew Valley 1.5.5+:
 
{{collapse|source code|content=<syntaxhighlight lang="c#">
 
{{collapse|source code|content=<syntaxhighlight lang="c#">
 
/// <summary>The main entry point for the mod.</summary>
 
/// <summary>The main entry point for the mod.</summary>
Line 19: Line 19:  
                 output.AppendLine($"==={categoryGroup.Key}===");
 
                 output.AppendLine($"==={categoryGroup.Key}===");
 
                 output.AppendLine("{| class=\"wikitable sortable\"");
 
                 output.AppendLine("{| class=\"wikitable sortable\"");
                 output.AppendLine("|-\n! name\n! wavebank\n! soundbank ID\n! description");
+
                 output.AppendLine("|-\n!rowspan=\"2\"| name\n!rowspan=\"2\"| wavebank\n!colspan=\"2\"| soundbank index\n!rowspan=\"2\"| description");
 +
                output.AppendLine("|-\n! decimal\n! hexadecimal");
    
                 foreach (TrackInfo track in categoryGroup.OrderBy(p => p.Name).ThenBy(p => p.Index))
 
                 foreach (TrackInfo track in categoryGroup.OrderBy(p => p.Name).ThenBy(p => p.Index))
                     output.AppendLine($"|-\n| <tt>{track.Name}</tt>\n| <tt>{track.GetWavebankName()}</tt>\n| data-sort-value=\"{track.Index}\"| <tt>{track.GetSoundbankId()}</tt>\n| ");
+
                     output.AppendLine($"|-\n| <tt>{track.Name}</tt>\n| <tt>{track.GetWavebankName()}</tt>\n| <tt>{track.Index}</tt>\n| data-sort-value=\"{track.Index}\"| <tt>{track.GetSoundbankId()}</tt>\n| ");
    
                 output.AppendLine("|}");
 
                 output.AppendLine("|}");
Line 167: Line 168:  
|}
 
|}
   −
—<small>[[User:Pathoschild|Pathoschild]] ([[User talk:Pathoschild|talk]]) 05:21, 17 October 2021 (UTC)</small>
+
—<small>[[User:Pathoschild|Pathoschild]] ([[User talk:Pathoschild|talk]]) 05:21, 17 October 2021 (UTC)</small> (updated 00:12, 20 October 2021 (UTC))
translators
8,450

edits

Navigation menu