internal void Save(DeepDrillerSaveData saveDataList) { var prefabIdentifier = GetComponent <PrefabIdentifier>(); var id = prefabIdentifier.Id; if (_saveData == null) { _saveData = new DeepDrillerSaveDataEntry(); } _saveData.Id = id; _saveData.BodyColor = ColorManager.GetMaskColor().ColorToVector4(); _saveData.PowerState = PowerManager.GetPowerState(); _saveData.PullFromRelay = PowerManager.GetPullFromPowerRelay(); _saveData.Items = DeepDrillerContainer.SaveData(); _saveData.PowerData = PowerManager.SaveData(); _saveData.FocusOres = OreGenerator.GetFocuses(); _saveData.IsFocused = OreGenerator.GetIsFocused(); _saveData.IsBlackListMode = OreGenerator.GetInBlackListMode(); _saveData.Biome = CurrentBiome; _saveData.OilTimeLeft = OilHandler.GetOilTimeLeft(); _saveData.SolarExtended = PowerManager.IsSolarExtended(); _saveData.Upgrades = UpgradeManager.Save(); _saveData.IsRangeVisible = _isRangeVisible; _saveData.AllowedToExport = TransferManager.IsAllowedToExport(); saveDataList.Entries.Add(_saveData); }
internal void Save(DeepDrillerSaveData saveDataList) { var prefabIdentifier = GetComponent <PrefabIdentifier>(); var id = prefabIdentifier.Id; if (_saveData == null) { _saveData = new DeepDrillerSaveDataEntry(); } _saveData.Id = id; _saveData.BodyColor = ColorManager.GetMaskColor().ColorToVector4(); _saveData.PowerState = PowerManager.GetPowerState(); _saveData.PullFromRelay = PowerManager.GetPullFromPowerRelay(); _saveData.Items = DeepDrillerContainer.SaveData(); if (QPatch.Configuration.AllowDamage) { _saveData.Health = HealthManager.GetHealth(); } _saveData.PowerData = PowerManager.SaveData(); _saveData.FocusOres = OreGenerator.GetFocuses(); _saveData.IsFocused = OreGenerator.GetIsFocused(); _saveData.Biome = CurrentBiome; _saveData.OilTimeLeft = OilHandler.GetOilTimeLeft(); _saveData.SolarExtended = PowerManager.IsSolarExtended(); _saveData.Upgrades = UpgradeManager.Save(); saveDataList.Entries.Add(_saveData); }