refactor(save): 移除 Showcase 快照持久化
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
using System.Collections;
|
||||
|
||||
namespace AibisDream.SaveSystem
|
||||
{
|
||||
/// <summary>sections["showcase"]:梦境普通小图或大图。RestoreOrder=69。</summary>
|
||||
public sealed class ShowcaseSnapshotProvider : IAsyncSnapshotProvider
|
||||
{
|
||||
public string SaveId => SnapshotProviderIds.Showcase;
|
||||
public int RestoreOrder => 69;
|
||||
|
||||
public object Capture()
|
||||
{
|
||||
return SpriteShowcase.Instance != null
|
||||
? SpriteShowcase.Instance.CaptureSnapshot()
|
||||
: null;
|
||||
}
|
||||
|
||||
public IEnumerator RestoreAsync(object dto, SnapshotRestoreContext context)
|
||||
{
|
||||
if (dto is not ShowcaseSnapshotDto snapshot)
|
||||
{
|
||||
context.Warn("[ShowcaseSnapshotProvider] DTO 类型不匹配,跳过还原。");
|
||||
yield break;
|
||||
}
|
||||
|
||||
var showcase = SpriteShowcase.Instance;
|
||||
if (showcase == null)
|
||||
{
|
||||
context.Warn("[ShowcaseSnapshotProvider] SpriteShowcase 未初始化,跳过还原。");
|
||||
yield break;
|
||||
}
|
||||
|
||||
yield return showcase.RestoreSnapshotAsync(snapshot, context.Warn);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83cccdfaca2a42a89ed515c16c6adfad
|
||||
Reference in New Issue
Block a user