1. 脚本转c#代码功能,支持了[Flipflop]触发器节点

2. 修复了Script.StringNode转C#中存在多余的转义符的问题
3. 为IFlowControl添加了Task StratNodeAsync(string)的接口,用于在代码生成场景中的流程控制
4. 调整了关于Lightweight运行环境的文件位置
This commit is contained in:
fengjiayi
2025-08-04 22:38:20 +08:00
parent e159b61bf0
commit 0d89ac1415
16 changed files with 1180 additions and 925 deletions

View File

@@ -230,18 +230,27 @@ namespace Serein.Script
else
{
Append($"\"");
foreach (var s in sp)
for (int index = 0; index < sp.Length; index++)
{
string? s = sp[index];
var content = EscapeForCSharpString(s);
if(OperatingSystem.IsWindows())
if(index == 0)
{
Append($"\\r\\n{content}");
Append(content);
}
else if (OperatingSystem.IsLinux())
else
{
Append($"\\n{content}");
if (OperatingSystem.IsWindows())
{
Append($"\\r\\n{content}");
}
else if (OperatingSystem.IsLinux())
{
Append($"\\n{content}");
}
}
}
Append($"\"");
}