Ejemplo n.º 1
0
        /// <summary>
        /// Called after dll has been injected
        /// </summary>
        public Core()
        {
            DebugHelper.ShowConsoleWindow();
            CurrentProcess = Process.GetCurrentProcess();

            Globals.Players = new Player[33];

            GameFuncs.Init();
            Blitzmax.Init();
            Patches.Init();

            ReadSignatures();
            InitHooks();
        }
Ejemplo n.º 2
0
    public static void Init(string modDir, string settings)
    {
        Log("Starting up");
        harmony = HarmonyInstance.Create("ca.gnivler.BattleTech.Z_JK_AppearanceDates");
        harmony.PatchAll(Assembly.GetExecutingAssembly());
        // read settings
        try
        {
            ModSettings = JsonConvert.DeserializeObject <Settings>(settings);
            ModSettings.modDirectory = modDir;
        }
        catch (Exception)
        {
            ModSettings = new Settings();
        }

        Patches.Init();

        //File.WriteAllText(Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName + "settings.json", JSON.ToNiceJSON(ModSettings, new JSONParameters()));
    }
Ejemplo n.º 3
0
 static void Load(UnityModManager.ModEntry mod_entry)
 {
     mod_entry.OnToggle = OnToggle;
     Patches.Init();
     Log("Startup");
 }