mirror of
https://github.com/kwsch/NHSE.git
synced 2026-08-04 00:40:50 -05:00
Originally ported from https://github.com/Martin005/SMO_Translation_Helper , via https://github.com/IcySon55/3DLandMSBTeditor Add some tests to ensure functions
25 lines
664 B
C#
25 lines
664 B
C#
using System.Diagnostics;
|
|
using System.Linq;
|
|
|
|
namespace NHSE.Parsing
|
|
{
|
|
public static class MSBTUtil
|
|
{
|
|
public static void DebugDumpLines(this MSBT obj)
|
|
{
|
|
var sorted = obj.LBL1.Labels
|
|
.Where(z => !z.Name.EndsWith("_pl"))
|
|
.OrderBy(z => z.Index);
|
|
|
|
foreach (var x in sorted)
|
|
{
|
|
var index = x.Index;
|
|
var name = x.Name;
|
|
var data = obj.TXT2.Strings[(int) index];
|
|
var line = data.ToString(obj.FileEncoding).TrimEnd('\0');
|
|
Debug.WriteLine($"{index}\t{name}\t{line}");
|
|
}
|
|
}
|
|
}
|
|
}
|