public static void Patch()
        {
            QuickLogger.Info($"Started patching. Version: {QuickLogger.GetAssemblyVersion(Assembly.GetExecutingAssembly())}");

#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
#endif

            var harmony = HarmonyInstance.Create("com.fcsdemo.fcstudios");
            harmony.PatchAll(Assembly.GetExecutingAssembly());

            Configuration = Mod.LoadConfiguration();

            foreach (ModEntry modEntry in Configuration.Config.Prefabs)
            {
                QuickLogger.Info($"Added Prefab {modEntry.ClassID}");
                modEntry.Prefab = FCSDemoModel.GetPrefabs(modEntry.PrefabName);
                var prefab = new FCSDemoBuidable(modEntry);
                prefab.Patch();
            }

            try
            {
                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
Beispiel #2
0
        public static void Patch()
        {
            QuickLogger.Info($"Started patching. Version: {QuickLogger.GetAssemblyVersion(Assembly.GetExecutingAssembly())}");

#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
#endif
            Configuration = Mod.LoadConfiguration();
            FCSDemoBuidable.PatchHelper();

            try
            {
                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }
        public static void Patch()
        {
            QuickLogger.Info($"Started patching. Version: {QuickLogger.GetAssemblyVersion(Assembly.GetExecutingAssembly())}");

#if DEBUG
            QuickLogger.DebugLogsEnabled = true;
            QuickLogger.Debug("Debug logs enabled");
#endif

            var harmony = HarmonyInstance.Create("com.fcsdemo.fcstudios");
            harmony.PatchAll(Assembly.GetExecutingAssembly());

            Configuration = Mod.LoadConfiguration();
            FCSDemoBuidable.PatchHelper();

            try
            {
                QuickLogger.Info("Finished patching");
            }
            catch (Exception ex)
            {
                QuickLogger.Error(ex);
            }
        }