示例#1
0
        private void ReadySaveData()
        {
            QuickLogger.Debug("In OnProtoDeserialize");
            var prefabIdentifier = GetComponentInParent <PrefabIdentifier>() ?? GetComponent <PrefabIdentifier>();
            var id = prefabIdentifier?.Id ?? string.Empty;

            _savedData = Mod.GetSaveData(id);
        }
        internal void Save(SaveData saveDataList)
        {
            var prefabIdentifier = GetComponent <PrefabIdentifier>() ?? GetComponentInParent <PrefabIdentifier>();
            var id       = prefabIdentifier.Id;
            var saveData = new SaveDataEntry();

            saveData.Id             = id;
            saveData.PowercellDatas = PowerManager.GetSaveData();

            saveDataList.Entries.Add(saveData);
        }
示例#3
0
        internal void Save(SaveData saveDataList)
        {
            var prefabIdentifier = GetComponent <PrefabIdentifier>() ?? GetComponentInParent <PrefabIdentifier>();
            var id       = prefabIdentifier.Id;
            var saveData = new SaveDataEntry();

            saveData.Id        = id;
            saveData.SCA       = Container.NumberOfFirstAids;
            saveData.TTS       = Container.GetTimeToSpawn();
            saveData.BodyColor = _currentBodyColor.ColorToVector4();
            saveDataList.Entries.Add(saveData);
        }
示例#4
0
        internal void LoadRunningState(SaveDataEntry data)
        {
            if (!data.IsCooking)
            {
                return;
            }

            _passedTime = data.PassedTime;
            _fromSave   = true;
            CookAllFood(_mono.StorageManager.GetContainer());

            //_targetTime = data.TargetTime;
            //_isCooking = data.IsCooking;
        }
示例#5
0
        internal void Save(SaveData saveData)
        {
            var prefabIdentifier = GetComponent <PrefabIdentifier>();
            var id = prefabIdentifier.Id;

            if (_savedData == null)
            {
                _savedData = new SaveDataEntry();
            }
            _savedData.ID           = id;
            _savedData.GaspodAmount = GaspodCollectorStorage.GetStorageAmount();
            _savedData.BodyColor    = ColorManager.GetColor().ColorToVector4();
            _savedData.Batteries    = PowerManager.GetBatteries();
            saveData.Entries.Add(_savedData);
        }
        internal void Save(SaveData saveData)
        {
            var id = PrefabId.Id;

            if (_savedData == null)
            {
                _savedData = new SaveDataEntry();
            }

            _savedData.ID              = id;
            _savedData.BodyColor       = ColorManager.GetColor().ColorToVector4();
            _savedData.UnitName        = NameController.GetCurrentName();
            _savedData.FridgeContainer = FridgeComponent.Save();
            _savedData.PowercellData   = PowerManager.Save();
            saveData.Entries.Add(_savedData);
        }
示例#7
0
        internal void Save(SaveData newSaveData)
        {
            var prefabIdentifier = GetComponent <PrefabIdentifier>() ?? GetComponentInParent <PrefabIdentifier>();
            var id = prefabIdentifier.Id;

            if (_saveData == null)
            {
                _saveData = new SaveDataEntry();
            }
            _saveData.ID          = id;
            _saveData.OxygenLevel = OxygenManager.GetO2Level();
            _saveData.HealthLevel = HealthManager.GetHealth();
            _saveData.BeaconID    = (((_attachedBeacon != null) ? _attachedBeacon.GetComponent <UniqueIdentifier>().Id : null) ?? "");
            _saveData.IsPinging   = AnimationManager.GetBoolHash(_isPinging);
            newSaveData.Entries.Add(_saveData);
        }
        internal void Save(SaveData saveData)
        {
            var prefabIdentifier = GetComponent <PrefabIdentifier>();
            var id = prefabIdentifier.Id;

            if (_saveData == null)
            {
                _saveData = new SaveDataEntry();
            }
            _saveData.ID              = id;
            _saveData.BodyColor       = ColorManager.GetColor().ColorToVector4();
            _saveData.TankLevel       = TankManager.GetTankLevel();
            _saveData.ContainerAmount = StorageManager.NumberOfBottles;
            _saveData.IsInSub         = _isInSub;
            saveData.Entries.Add(_saveData);
        }
示例#9
0
        internal void Save(SaveData saveData)
        {
            var prefabIdentifier = GetComponent <PrefabIdentifier>();
            var id = prefabIdentifier.Id;

            if (_data == null)
            {
                _data = new SaveDataEntry();
            }
            _data.ID          = id;
            _data.BodyColor   = ColorManager.GetColor().ColorToVector4();
            _data.UnitName    = NameController.GetCurrentName();
            _data.IsGlobal    = _isGlobal;
            _data.SelectedTab = DisplayManager.GetSelectedTab();
            saveData.Entries.Add(_data);
        }
示例#10
0
        public override void Save(SaveData save)
        {
            if (!IsInitialized || !IsConstructed)
            {
                return;
            }

            var id = GetPrefabID();

            if (_savedData == null)
            {
                _savedData = new SaveDataEntry();
            }

            _savedData.ID = id;
            _savedData.ItemDisplayItem = _currentTechType;
            save.Entries.Add(_savedData);
        }
        public override void Save(SaveData newSaveData)
        {
            if (!IsInitialized || !IsConstructed)
            {
                return;
            }

            var id = GetPrefabIDString();

            if (_savedData == null)
            {
                _savedData = new SaveDataEntry();
            }

            _savedData.ID         = id;
            _savedData.ServerData = _items;
            newSaveData.Entries.Add(_savedData);
        }
        public override void Save(SaveData newSaveData)
        {
            if (!IsInitialized)
            {
                return;
            }

            var id = GetPrefabIDString();

            if (_savedData == null)
            {
                _savedData = new SaveDataEntry();
            }

            _savedData.ID         = id;
            _savedData.ServerData = FCSFilteredStorage.Items;
            _savedData.Filters    = FCSFilteredStorage.Filters;
            newSaveData.Entries.Add(_savedData);
        }
        public override void Save(SaveData newSaveData)
        {
            if (!IsInitialized ||
                !IsConstructed)
            {
                return;
            }

            var id = GetPrefabIDString();

            if (_savedData == null)
            {
                _savedData = new SaveDataEntry();
            }

            _savedData.ID = id;
            _savedData.AntennaBodyColor = ColorManager.GetMaskColor().ColorToVector4();
            _savedData.AntennaName      = Manager.GetBaseName();
            newSaveData.Entries.Add(_savedData);
        }
示例#14
0
        internal void Save(SaveData saveData)
        {
            var prefabIdentifier = GetComponent <PrefabIdentifier>();
            var id = prefabIdentifier.Id;

            if (_savedData == null)
            {
                _savedData = new SaveDataEntry();
            }
            _savedData.ID                  = id;
            _savedData.BodyColor           = ColorManager.GetColor().ColorToVector4();
            _savedData.Export              = StorageManager.GetExportContainer();
            _savedData.Input               = StorageManager.GetInputContainer();
            _savedData.ExportToSeaBreeze   = StorageManager.GetExportToSeabreeze();
            _savedData.CurrentSeaBreezeID  = SelectedSeaBreezeID;
            _savedData.AutoChooseSeabreeze = AutoChooseSeabreeze;
            FoodManager.SaveRunningState(_savedData);


            saveData.Entries.Add(_savedData);
        }
示例#15
0
 private void ReadySaveData()
 {
     QuickLogger.Debug("In OnProtoDeserialize");
     _savedData = Mod.GetSaveData(GetPrefabID());
 }
示例#16
0
 internal void SaveRunningState(SaveDataEntry data)
 {
     data.PassedTime = _passedTime;
     data.TargetTime = _targetTime;
     data.IsCooking  = _isCooking;
 }