Example #1
0
        public void Save()
        {
            //api_start2がロード済みのときのみ
            if (KCDatabase.Instance.MasterShips.Count == 0)
            {
                return;
            }

            bool successed = true;


            successed &= EnemyFleet.Save(MasterPath);
            successed &= ShipParameter.Save(MasterPath);
            successed &= Construction.Save(MasterPath);
            successed &= ShipDrop.Save(MasterPath);
            successed &= Development.Save(MasterPath);
            successed &= Resource.Save(MasterPath);

            if (successed)
            {
                Utility.Logger.Add(2, "レコードをセーブしました。");
            }
            else
            {
                Utility.Logger.Add(2, "レコードのセーブに失敗しました。");
            }
        }
Example #2
0
        public bool Save(bool logging = true)
        {
            //api_start2がロード済みのときのみ
            if (KCDatabase.Instance.MasterShips.Count == 0)
            {
                return(false);
            }

            bool succeeded = true;


            succeeded &= EnemyFleet.Save(MasterPath);
            succeeded &= ShipParameter.Save(MasterPath);
            succeeded &= Construction.Save(MasterPath);
            succeeded &= ShipDrop.Save(MasterPath);
            succeeded &= Development.Save(MasterPath);
            succeeded &= Resource.Save(MasterPath);
            if (logging)
            {
                if (succeeded)
                {
                    Utility.Logger.Add(2, LoggerRes.SavedRecords);
                }
                else
                {
                    Utility.Logger.Add(3, LoggerRes.FailedSavingRecords);
                }
            }

            return(succeeded);
        }