コード例 #1
0
        public static void Patch()
        {
            QCreatures.Load();

            var harmony = HarmonyInstance.Create("qcreatureconfig.mod");

            harmony.PatchAll(Assembly.GetExecutingAssembly());
        }
コード例 #2
0
        public static void Load()
        {
            if (!File.Exists(Environment.CurrentDirectory + @"\QMods\QCreatureConfig\creatures.json"))
            {
                return;
            }
            var json      = File.ReadAllText(Environment.CurrentDirectory + @"\QMods\QCreatureConfig\creatures.json");
            var creatures = JsonConvert.DeserializeObject <QCreatures>(json);

            Creatures = creatures;
        }
コード例 #3
0
        public static void Save(QCreatures creatures)
        {
            var json = JsonConvert.SerializeObject(creatures);

            File.WriteAllText(Environment.CurrentDirectory + @"\QMods\QCreatureConfig\creatures.json", json);
        }