-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New message popups and bugfix for btdapi mods
Added more BTDApi Injector messages. Fixed bug with enable/disable btdapi mods. New message telling player to restart btd6 if they try enabling/disabling mods while game is open
- Loading branch information
Showing
5 changed files
with
63 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System.Diagnostics; | ||
using System.IO; | ||
using System.Windows; | ||
|
||
namespace BTD6_Mod_Manager.Lib | ||
{ | ||
public class BtdApi_Handler | ||
{ | ||
public static bool DoesInjectorExist(string modsDir) | ||
{ | ||
const string disabledKey = ".disabled"; | ||
bool injectorExists = File.Exists($"{modsDir}\\BtdAPI_Injector.dll"); | ||
bool disabledInjectorExists = File.Exists($"{modsDir}\\BtdAPI_Injector.dll{disabledKey}"); | ||
|
||
return (injectorExists || disabledInjectorExists); | ||
} | ||
|
||
public static void AskDownloadInjector() | ||
{ | ||
var result = MessageBox.Show("The Injector for BTD6 API mods was not found. It is required in order to use BTD6 API mods." + | ||
" Do you want to download it?", "Download BTD6 API Injector?", MessageBoxButton.YesNo); | ||
|
||
if (result == MessageBoxResult.Yes) | ||
{ | ||
Process.Start("https://www.nexusmods.com/bloonstd6/mods/41?tab=description"); | ||
} | ||
else | ||
{ | ||
Logger.Log("You chose not to download the injector. You're BTD6 API mods won't work until you get it" + | ||
". However, all other BTD6 mods will continue to work.", OutputType.Both); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters