Ejemplo n.º 1
0
        public static void Patch()
        {
            QCreatures.Load();

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

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

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