Beispiel #1
0
        public override void Init()
        {
            base.Init();

            //	UIMenuBackgroundManager.background = new UI_BackgroundMain();
            //Ö÷²Ëµ¥
            MainMenuDrawer.Init();

            QuickStarter.CheckQuickStart();
            //°æ±¾ÐÅÏ¢
            VersionUpdateDialogMaker.CreateVersionUpdateDialogIfNecessary();

            //Todo:×¢ÊÍSteam¼ì²â

            /*
             * if (!SteamManager.Initialized)
             * {
             *   Dialog_MessageBox window = new Dialog_MessageBox((string)"SteamClientMissing".Translate(), "Quit".Translate(), delegate
             *   {
             *       Application.Quit();
             *   }, "Ignore".Translate());
             *   Find.WindowStack.Add(window);
             * }
             */
        }
Beispiel #2
0
        static CrossPromotion()
        {
            var instance = HarmonyInstance.Create(_crosspromotion);

            if (instance.HasAnyPatches(_crosspromotion))
            {
                return;
            }

            instance.Patch(
                SymbolExtensions.GetMethodInfo(() => MainMenuDrawer.Init()),
                postfix: new HarmonyMethod(SymbolExtensions.GetMethodInfo(() => MainMenuDrawer_Init_Postfix()))
                );

            instance.Patch(
                AccessTools.DeclaredMethod(typeof(Page_ModsConfig), nameof(Page_ModsConfig.PostClose)),
                postfix: new HarmonyMethod(SymbolExtensions.GetMethodInfo(() => Page_ModsConfig_PostClose_Postfix()))
                );

            instance.Patch(
                AccessTools.DeclaredMethod(typeof(WorkshopItems), "Notify_Subscribed"),
                postfix: new HarmonyMethod(SymbolExtensions.GetMethodInfo(() => WorkshopItems_Notify_Subscribed_Postfix(new PublishedFileId_t(0))))
                );

            instance.Patch(
                AccessTools.DeclaredMethod(typeof(Page_ModsConfig), nameof(Page_ModsConfig.DoWindowContents)),
                transpiler: new HarmonyMethod(SymbolExtensions.GetMethodInfo(() => Page_ModsConfig_DoWindowContents_Transpiler(null, null)))
                );
        }
Beispiel #3
0
 public override void Init()
 {
     base.Init();
     UIMenuBackgroundManager.background = new UI_BackgroundMain();
     MainMenuDrawer.Init();
     QuickStarter.CheckQuickStart();
     VersionUpdateDialogMaker.CreateVersionUpdateDialogIfNecessary();
     if (!SteamManager.Initialized)
     {
         Dialog_MessageBox window = new Dialog_MessageBox((string)"SteamClientMissing".Translate(), "Quit".Translate(), delegate
         {
             Application.Quit();
         }, "Ignore".Translate());
         Find.WindowStack.Add(window);
     }
 }