Stardew_Valley_Mods/GeneralMods/Revitalize/Framework/Configs/ObjectsConfig.cs

32 lines
921 B
C#
Raw Normal View History

2019-09-19 08:33:45 +08:00
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Revitalize.Framework.Configs
{
public class ObjectsConfig
{
public bool showDyedColorName;
public ObjectsConfig()
{
this.showDyedColorName = true;
}
public static ObjectsConfig InitializeConfig()
{
if (File.Exists(Path.Combine(ModCore.ModHelper.DirectoryPath, "Configs", "ObjectsConfig.json")))
return ModCore.ModHelper.Data.ReadJsonFile<ObjectsConfig>(Path.Combine("Configs", "ObjectsConfig.json"));
else
{
ObjectsConfig Config = new ObjectsConfig();
ModCore.ModHelper.Data.WriteJsonFile<ObjectsConfig>(Path.Combine("Configs", "ObjectsConfig.json"), Config);
return Config;
}
}
}
}