Beispiel #1
0
        public static void Enable()
        {
            try {
                Log.Debug("Testing StackTrace:\n" + new StackTrace(true).ToString(), copyToGameLog: false);
                KianCommons.UI.TextureUtil.EmbededResources = false;
                HelpersExtensions.VERBOSE = false;
                Loaded       = false;
                Log.Buffered = true;

                HarmonyHelper.EnsureHarmonyInstalled();
                //LoadingManager.instance.m_simulationDataReady += SimulationDataReady; // load/update data
                LoadingManager.instance.m_levelPreLoaded += Preload;
                if (LoadingManager.instance.m_loadingComplete)
                {
                    HotReload();
                }

#if FAST_TEST_HARMONY
                HarmonyHelper.DoOnHarmonyReady(() => {
                    HarmonyUtil.InstallHarmony(HARMONY_ID);
                    Process.GetCurrentProcess().Kill();
                });
#endif
                Test();
            } catch (Exception ex) {
                Log.Exception(ex);
            }
        }
        public void OnEnabled()
        {
            IsEnabled = true;
            FileStream fs = File.Create("MoreEffectiveTransfer.txt");

            fs.Close();
            HarmonyHelper.EnsureHarmonyInstalled();
        }
        public void OnEnabled()
        {
            IsEnabled = true;
            FileStream fs = File.Create("RealConstruction.txt");

            fs.Close();
            HarmonyHelper.EnsureHarmonyInstalled();
        }
Beispiel #4
0
        public void OnEnabled()
        {
            IsEnabled = true;
            FileStream fs = File.Create("CSURToolBox.txt");

            fs.Close();
            HarmonyHelper.EnsureHarmonyInstalled();
        }
Beispiel #5
0
 public void OnEnabled()
 {
     HarmonyHelper.EnsureHarmonyInstalled();
     if (Extensions.InGame)
     {
         LifeCycle.Load();
     }
     IsEnabled = true;
 }
 public void OnEnabled()
 {
     KianCommons.UI.TextureUtil.EmbededResources = false;
     HarmonyHelper.EnsureHarmonyInstalled();
     if (HelpersExtensions.InGame)
     {
         LifeCycle.Load();
     }
 }
        public void OnEnabled()
        {
            Debug.Log($"[BND] Broken Node Detector enabled. Version {Version}");
            HarmonyHelper.EnsureHarmonyInstalled();
            ModSettings.Ensure();
#if DEBUG
            LoadingExtension.Patcher.PatchAll();
#endif
        }
Beispiel #8
0
        public void OnEnabled()
        {
            Log.InfoFormat(
                "TM:PE enabled. Version {0}, Build {1} {2} for game version {3}.{4}.{5}-f{6}",
                VersionString,
                Assembly.GetExecutingAssembly().GetName().Version,
                BRANCH,
                GAME_VERSION_A,
                GAME_VERSION_B,
                GAME_VERSION_C,
                GAME_VERSION_BUILD);
            Log.InfoFormat(
                "Enabled TM:PE has GUID {0}",
                Assembly.GetExecutingAssembly().ManifestModule.ModuleVersionId);

            // check for incompatible mods
            if (UIView.GetAView() != null)
            {
                // when TM:PE is enabled in content manager
                CheckForIncompatibleMods();
            }
            else
            {
                // or when game first loads if TM:PE was already enabled
                LoadingManager.instance.m_introLoaded += CheckForIncompatibleMods;
            }

            // Log Mono version
            Type monoRt = Type.GetType("Mono.Runtime");

            if (monoRt != null)
            {
                MethodInfo displayName = monoRt.GetMethod(
                    "GetDisplayName",
                    BindingFlags.NonPublic | BindingFlags.Static);
                if (displayName != null)
                {
                    Log.InfoFormat("Mono version: {0}", displayName.Invoke(null, null));
                }
            }

            Log._Debug("Scene is " + SceneManager.GetActiveScene().name);

            Instance        = this;
            InGameHotReload = InGame();

            HarmonyHelper.EnsureHarmonyInstalled();

#if DEBUG
            const bool installHarmonyASAP = false; // set true for fast testing
            if (installHarmonyASAP)
            {
                HarmonyHelper.DoOnHarmonyReady(delegate() { Patcher.Create().Install(); });
            }
#endif
        }
        public void OnEnabled()
        {
            IsEnabled = true;
            FileStream fs = File.Create("MoreOutsideInteraction.txt");

            fs.Close();
            LoadSetting();
            SaveSetting();
            HarmonyHelper.EnsureHarmonyInstalled();
        }
 public static void Enable()
 {
     Log.Debug(Environment.StackTrace);
     Loaded = false;
     HarmonyHelper.EnsureHarmonyInstalled();
     LoadingManager.instance.m_levelPreLoaded      += PreLoad;             //install harmony
     LoadingManager.instance.m_simulationDataReady += SimulationDataReady; // create DC textures on first load
     LoadingManager.instance.m_levelPreUnloaded    += ExitToMainMenu;      // undo DC textures when quite to main menue.
     if (!Helpers.InStartupMenu)
     {
         HotReload();
     }
 }
Beispiel #11
0
        public static void Enable()
        {
            Log.Debug("Testing StackTrace:\n" + new StackTrace(true).ToString(), copyToGameLog: false);
            KianCommons.UI.TextureUtil.EmbededResources = false;
            HelpersExtensions.VERBOSE = false;
            Loaded = false;

            HarmonyHelper.EnsureHarmonyInstalled();
            LoadingManager.instance.m_simulationDataReady += SimulationDataReady; // load/update data
            if (HelpersExtensions.InGameOrEditor)
            {
                HotReload();
            }
        }
Beispiel #12
0
        public void OnEnabled()
        {
            IsEnabled = true;
            FileStream fs = File.Create("RealCity.txt");

            fs.Close();
            HarmonyHelper.EnsureHarmonyInstalled();
            if (UIView.GetAView() != null)
            {
                OnGameIntroLoaded();
            }
            else
            {
                LoadingManager.instance.m_introLoaded += OnGameIntroLoaded;
            }
        }
Beispiel #13
0
        void Awake()
        {
            try {
                Log.Info("TMPELifecycle.Awake()");
                Instance = this;
#if BENCHMARK
                Benchmark.BenchmarkManager.Setup();
#endif
                TranslationDatabase.LoadAllTranslations();

                VersionUtil.LogEnvironmentDetails();
                Log._Debug("Scene is " + Scene);

                // check for incompatible mods
                if (UIView.GetAView() != null)
                {
                    // when TM:PE is enabled in content manager
                    CompatibilityCheck();
                }
                else
                {
                    // or when game first loads if TM:PE was already enabled
                    LoadingManager.instance.m_introLoaded += CompatibilityCheck;
                }

                HarmonyHelper.EnsureHarmonyInstalled();
                LoadingManager.instance.m_levelPreLoaded += Preload;

                InGameHotReload = InGameOrEditor();
                if (InGameHotReload)
                {
                    Preload();
                    SerializableDataExtension.Load();
                    Load();
                }

#if DEBUG
                const bool installHarmonyASAP = false; // set true for fast testing
                if (installHarmonyASAP)
                {
                    HarmonyHelper.DoOnHarmonyReady(Patcher.Install);
                }
#endif
            } catch (Exception ex) {
                ex.LogException(true);
            }
        }
 public void OnEnabled()
 {
     // check Harmony
     HarmonyHelper.EnsureHarmonyInstalled();
 }
Beispiel #15
0
 public void OnEnabled()
 {
     HarmonyHelper.EnsureHarmonyInstalled();
     HarmonyHelper.DoOnHarmonyReady(() => HarmonyUtil.InstallHarmony(HARMONY_ID));
 }
        //public void OnSettingsUI(UIHelperBase helper)
        //{
        //    //TODO: settings menu
        //}

        public void OnEnabled()
        {
            Log.Info($"SharedStops enabled {ModVersion}");
            HarmonyHelper.EnsureHarmonyInstalled();
        }