Beispiel #1
0
        public static void Patch()
        {
            QCreatures.Load();

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

            harmony.PatchAll(Assembly.GetExecutingAssembly());
        }
Beispiel #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;
        }
Beispiel #3
0
        public static void Save(QCreatures creatures)
        {
            var json = JsonConvert.SerializeObject(creatures);

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