Skip to content

Commit

Permalink
Fixed an error
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkTerraYT committed Apr 8, 2024
1 parent 0218fb8 commit 2b22e88
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions CustomBloon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,6 @@ public class CustomBloon : BloonsTD6Mod

static string ConfigFile = Path.Combine(ModHelper.ModHelperDirectory, "Mod Settings", "CustomBloon.json");

public override void OnApplicationStart()
{
CreatedExportedDataFolder = false;

if (!Directory.Exists(DataPath))
{
Directory.CreateDirectory(DataPath);
}
if (!Directory.Exists(ExportedDataPath))
{
Directory.CreateDirectory(ExportedDataPath);
CreatedExportedDataFolder = true;
}
}

public override void OnMainMenu()
{
if (PopupScreen.instance != null)
Expand Down Expand Up @@ -511,6 +496,18 @@ public override void OnApplicationStart()
bool flag5 = iiiii.Contains("Gold");
bool flag6 = iiiiii.Contains("Gold");

CreatedExportedDataFolder = false;

if (!Directory.Exists(DataPath))
{
Directory.CreateDirectory(DataPath);
}
if (!Directory.Exists(ExportedDataPath))
{
Directory.CreateDirectory(ExportedDataPath);
CreatedExportedDataFolder = true;
}

if (flag)
{
ModHelper.Error<CustomBloon>("Illegal BloonType Was Used! BloonType Attemped Was: " + BaseBloonType);
Expand Down

0 comments on commit 2b22e88

Please sign in to comment.