Пример #1
0
        private void UnloadModData()
        {
            if (this.Data != null)
            {
                ModCustomDataFileHelpers.SaveAsJson <ModHelpersData>(this, "data", true, this.Data);
            }

            this.Data = new ModHelpersData();
        }
Пример #2
0
        ////////////////

        private bool LoadModData()
        {
            var data = ModCustomDataFileHelpers.LoadJson <ModHelpersData>(this, "data");

            if (data != null)
            {
                this.Data = data;
                return(true);
            }

            return(false);
        }
Пример #3
0
        ////////////////

        private bool LoadModData()
        {
            bool success;
            var  data = DataFileHelpers.LoadJson <ModHelpersData>(this, "data", out success);

            if (success && data != null)
            {
                this.Data = data;
            }

            return(success);
        }
Пример #4
0
        private void UnloadModData()
        {
            DataFileHelpers.SaveAsJson <ModHelpersData>(this, "data", this.Data);

            this.Data = new ModHelpersData();
        }