public static void LoadDeepDrillerData() { QuickLogger.Info("Loading Save Data..."); ModUtils.LoadSaveData <DeepDrillerSaveData>(SaveDataFilename, GetSaveFileDirectory(), (data) => { _deepDrillerSaveData = data; QuickLogger.Info("Save Data Loaded"); OnDeepDrillerDataLoaded?.Invoke(_deepDrillerSaveData); }); }
public static void SaveDeepDriller() { if (!IsSaving()) { _saveObject = new GameObject().AddComponent <ModSaver>(); DeepDrillerSaveData newSaveData = new DeepDrillerSaveData(); var drills = GameObject.FindObjectsOfType <FCSDeepDrillerController>(); foreach (var drill in drills) { drill.Save(newSaveData); } _deepDrillerSaveData = newSaveData; ModUtils.Save <DeepDrillerSaveData>(_deepDrillerSaveData, SaveDataFilename, GetSaveFileDirectory(), OnSaveComplete); } }