feat: 优化存档管理,增强链状态获取逻辑,添加 ISaveable 接口支持
This commit is contained in:
@@ -195,7 +195,12 @@ namespace BaseGames.Core.Save
|
||||
public void SetChainCompleted(string chainId)
|
||||
{ _current ??= new SaveData(); _current.EventChains.ChainStates[chainId] = "Completed"; }
|
||||
public IEnumerable<string> GetCompletedChains()
|
||||
=> _current?.EventChains.ChainStates.Keys ?? Enumerable.Empty<string>();
|
||||
{
|
||||
if (_current?.EventChains?.ChainStates == null) return System.Linq.Enumerable.Empty<string>();
|
||||
return _current.EventChains.ChainStates
|
||||
.Where(kv => kv.Value == "Completed")
|
||||
.Select(kv => kv.Key);
|
||||
}
|
||||
|
||||
public bool IsFirstClear(string challengeId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user