public static void DAATQS_BZ_InitializationMethod() { Logger.Log(Logger.Level.Debug, "DAATQS_BZ Initialization"); //new Problem. If player update this mod he would override his custom list by accident by me. So i need to check if the file already exist. string AllowlistPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "AllowList.json"); if (File.Exists(AllowlistPath)) { //Installation already exist, do nothing } else { //first install create AllowList. string defaultText = "{" + Environment.NewLine + @" ""TechType"": [""builder"", ""Knife"", ""Seaglide"", ""LaserCutter"",""HeatBlade"", ""RepulsionCannon"", ""airbladder"", ""flashlight"", ""welder"", ""scanner"" ]" + Environment.NewLine + "}"; File.WriteAllText(AllowlistPath, defaultText); } Harmony harmony = new Harmony("DAATQS_BZ"); harmony.PatchAll(Assembly.GetExecutingAssembly()); //Add the Ingame Config for User Config = OptionsPanelHandler.Main.RegisterModOptions <IngameConfigMenu>(); Logger.Log(Logger.Level.Info, "DAATQS_BZ Patched"); // QModServices.Main.AddCriticalMessage("Warning the DAATQS Mod is in BETA Status !"); }
public static void InitializationMethod() { Config = OptionsPanelHandler.Main.RegisterModOptions <IngameConfigMenu>(); Logger.Log(Logger.Level.Debug, "MorePathfinderNodes_BZ Initialization"); Harmony harmony = new Harmony("MorePathfinderNodes_BZ"); harmony.PatchAll(Assembly.GetExecutingAssembly()); Logger.Log(Logger.Level.Info, "MorePathfinderNodes_BZ Patched"); //QModServices.Main.AddCriticalMessage("Warning the MorePathfinderNodes_BZ Mod is in BETA Status !"); }