chore(m2): 保存功能验收及后续清理前检查点

This commit is contained in:
Liubing\LB
2026-10-10 20:40:27 +08:00
parent d3c5394a55
commit 144e7f739f
110 changed files with 12672 additions and 7514 deletions

View File

@@ -1,4 +1,4 @@
using asap.core;
using asap.core;
using cfg;
using game;
using GameCore;
@@ -104,23 +104,10 @@ public class CampDataMM
public bool IsFix => _isFix && AreaIndex < AreaList.Count;
bool _isFix;
internal static game.PlayerDataStorage.PlayerKVCampState DecodeForKVLoad(IReadOnlyDictionary<string,string> raw,
game.PlayerDataStorage.PlayerKVSchemaDiagnostics errors) => game.PlayerDataStorage.PlayerKVSaveSchema.DecodeCamp(raw,errors);
internal void ResetForKVLoad()
{
CampDataDic=new Dictionary<string,int>(StringComparer.Ordinal);
_isFix=false; _isOpenSkyscraper="0"; _id=101;
PreID=AreaIndex=AreaStep=AreaId=AreaStepCount=TimelineId=0;
AreaIcon=null; constructionArea=null; StepInfo=null; AreaStepList=null; IsUpdataArea=false;
}
internal void ReplaceFromKVDecoded(game.PlayerDataStorage.PlayerKVCampState state)
{
if (state == null) throw new ArgumentNullException(nameof(state));
CampDataDic=state.Values.ToDictionary(p=>p.Key,p=>p.Value,StringComparer.Ordinal);
_isFix=state.IsFix; _isOpenSkyscraper=state.Skyscraper;
}
internal game.PlayerDataStorage.PlayerKVCampState SnapshotForKVValidation() =>
new game.PlayerDataStorage.PlayerKVCampState(_isFix,_isOpenSkyscraper,CampDataDic);
public void InitData(Dictionary<string, string> userData)
{
string value;