chore(merge): 合并 develop 并整合 Day2 梦境剧情与演出
This commit is contained in:
@@ -142,10 +142,27 @@ namespace AibisDream
|
||||
details = string.Empty;
|
||||
|
||||
RestoreResult result = null;
|
||||
yield return SaveRestoreOrchestrator.RestoreFromFile(
|
||||
var completed = false;
|
||||
var accepted = GameManager.Instance.TryRestoreFile(
|
||||
entry.SnapshotPathWithoutExtension,
|
||||
RestoreOptions.DevJump,
|
||||
value => result = value);
|
||||
value =>
|
||||
{
|
||||
result = value;
|
||||
completed = true;
|
||||
});
|
||||
|
||||
if (!accepted)
|
||||
{
|
||||
status = $"跳转失败:{entry.Label}(当前存在其他会话命令)";
|
||||
isJumping = false;
|
||||
yield break;
|
||||
}
|
||||
|
||||
while (!completed)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
|
||||
if (result?.Success == true)
|
||||
{
|
||||
@@ -181,14 +198,20 @@ namespace AibisDream
|
||||
status = $"冒烟测试 {i + 1}/{entries.Count}:{entry.Label}";
|
||||
RestoreResult result = null;
|
||||
var completed = false;
|
||||
var routine = StartCoroutine(SaveRestoreOrchestrator.RestoreFromFile(
|
||||
var accepted = GameManager.Instance.TryRestoreFile(
|
||||
entry.SnapshotPathWithoutExtension,
|
||||
RestoreOptions.DevJump,
|
||||
value =>
|
||||
{
|
||||
result = value;
|
||||
completed = true;
|
||||
}));
|
||||
});
|
||||
|
||||
if (!accepted)
|
||||
{
|
||||
failures.Add($"{entry.Label}: 当前存在其他会话命令");
|
||||
break;
|
||||
}
|
||||
|
||||
const float timeoutSeconds = 60f;
|
||||
var elapsed = 0f;
|
||||
@@ -200,7 +223,7 @@ namespace AibisDream
|
||||
|
||||
if (!completed)
|
||||
{
|
||||
StopCoroutine(routine);
|
||||
GameManager.Instance.TryReturnToMainMenu();
|
||||
failures.Add($"{entry.Label}: 超过 {timeoutSeconds:0} 秒");
|
||||
break;
|
||||
}
|
||||
@@ -378,11 +401,6 @@ namespace AibisDream
|
||||
|
||||
try
|
||||
{
|
||||
if (SnapshotPersistence.IsLegacyFormat(SnapshotPathWithoutExtension))
|
||||
{
|
||||
Error = "不支持旧格式存档";
|
||||
return;
|
||||
}
|
||||
Snapshot = SnapshotPersistence.Load(SnapshotPathWithoutExtension);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace AibisDream.Utility
|
||||
public static class YarnUtil
|
||||
{
|
||||
private const string AutoNext = "auto_next";
|
||||
public const string OptionPrompt = "option_prompt";
|
||||
|
||||
#region 处理行信息
|
||||
|
||||
@@ -23,6 +24,14 @@ namespace AibisDream.Utility
|
||||
return line.Metadata != null && line.Metadata.Contains(AutoNext);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 当前行是否应作为下一组梦境选项的提示语。
|
||||
/// </summary>
|
||||
public static bool IsOptionPromptLine(this LocalizedLine line)
|
||||
{
|
||||
return line.Metadata != null && line.Metadata.Contains(OptionPrompt);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从line中获取角色vo定义
|
||||
/// </summary>
|
||||
@@ -124,4 +133,4 @@ namespace AibisDream.Utility
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user