refactor mod to account for changes in the IC10Editor mod interface

This commit is contained in:
2025-11-29 12:42:07 -07:00
parent 502c60d45e
commit 18fbf26dae
8 changed files with 409 additions and 297 deletions

View File

@@ -1,12 +1,24 @@
namespace Slang;
using StationeersIC10Editor;
namespace Slang
public class SlangFormatter : ICodeFormatter
{
public class SlangFormatter : ICodeFormatter
public static readonly uint ColorInstruction = ColorFromHTML("#ffff00");
public static readonly uint ColorString = ColorFromHTML("#ce9178");
public override Line ParseLine(string line)
{
public override Line ParseLine(string line)
return Marshal.TokenizeLine(line);
}
public override string Compile()
{
if (Marshal.CompileFromString(this.Lines.RawText, out string compiled))
{
return Marshal.TokenizeLine(line);
return compiled;
}
return string.Empty;
}
}