Skip to content

Commit 28b2a73

Browse files
committed
Okay, forget ToolInfo settings
1 parent 939d609 commit 28b2a73

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/ExportCodeFormatted.csx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ using System.Threading;
55
using System.Threading.Tasks;
66
using System.Collections.Generic;
77
using System.Linq;
8+
using Underanalyzer.Decompiler;
89

910
EnsureDataLoaded();
1011

1112
string codeFolder = Path.Combine(Path.GetDirectoryName(FilePath), "Export_Code");
1213
Directory.CreateDirectory(codeFolder);
1314

1415
GlobalDecompileContext globalDecompileContext = new(Data);
15-
Underanalyzer.Decompiler.DecompileSettings decompilerSettings = Data.ToolInfo.DecompilerSettings;
16+
// Cast for setters
17+
DecompileSettings decompilerSettings = new();
1618
decompilerSettings.RemoveSingleLineBlockBraces = true;
1719
decompilerSettings.OpenBlockBraceOnSameLine = false;
1820
decompilerSettings.EmptyLineAroundBranchStatements = false;
@@ -36,7 +38,7 @@ void DumpCode(UndertaleCode code)
3638
try
3739
{
3840
File.WriteAllText(path, (code != null
39-
? new Underanalyzer.Decompiler.DecompileContext(globalDecompileContext, code, decompilerSettings).DecompileToString()
41+
? new DecompileContext(globalDecompileContext, code, decompilerSettings).DecompileToString()
4042
: ""));
4143
}
4244
catch (Exception e)

0 commit comments

Comments
 (0)