Skip to content

Commit

Permalink
Updated version number and a few XML Doc Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gurrenm3 committed Apr 19, 2021
1 parent 540a756 commit 58258dd
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
5 changes: 5 additions & 0 deletions BloonsTD6 Mod Helper/Extensions/GameExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ namespace BTD_Mod_Helper.Extensions
{
public static partial class GameExt
{
/// <summary>
/// Get nkGI for the current session. Will be null if not in multiplayer game or lobby
/// </summary>
/// <param name="game"></param>
/// <returns></returns>
public static NKMultiGameInterface GetNkGI(this Game game)
{
return SessionData.nkGI;
Expand Down
47 changes: 46 additions & 1 deletion BloonsTD6 Mod Helper/Extensions/InGameExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ namespace BTD_Mod_Helper.Extensions
{
public static partial class InGameExt
{
/// <summary>
/// Get the game object that owns all InGame UI elements
/// </summary>
/// <param name="inGame"></param>
/// <returns></returns>
public static GameObject GetInGameUI(this InGame inGame)
{
Scene scene = SceneManager.GetSceneByName("InGameUi");
Expand All @@ -31,6 +36,11 @@ public static GameObject GetInGameUI(this InGame inGame)
return ui;
}

/// <summary>
/// Get the save path for the game (I think?)
/// </summary>
/// <param name="inGame"></param>
/// <returns></returns>
public static string GetSavePath(this InGame inGame)
{
return InGame.savePath;
Expand Down Expand Up @@ -175,39 +185,74 @@ public static TowerInventory GetTowerInventory(this InGame inGame)
}



// This has been removed so it can be tested further.
/*public static void GetMapDimensions(this InGame inGame, out Vector2 topLeft, out Vector2 bottomRight)
{
topLeft = new Vector2(-149.9228f, -115.2562f);
bottomRight = new Vector2(150.0713f, 115.4701f);
}*/

/// <summary>
/// Set the current round
/// </summary>
/// <param name="inGame"></param>
/// <param name="round"></param>
public static void SetRound(this InGame inGame, int round)
{
inGame.GetMap().spawner.SetRound(round);
}

/// <summary>
/// Spawn bloons in game
/// </summary>
/// <param name="inGame"></param>
/// <param name="bloonName"></param>
/// <param name="number"></param>
/// <param name="spacing"></param>
public static void SpawnBloons(this InGame inGame, string bloonName, int number, float spacing)
{
Il2CppReferenceArray<BloonEmissionModel> bloonEmissionModels = Game.instance.model.CreateBloonEmissions(bloonName, number, spacing).ToIl2CppReferenceArray();
inGame.SpawnBloons(bloonEmissionModels);
}

/// <summary>
/// Spawn bloons in game
/// </summary>
/// <param name="inGame"></param>
/// <param name="bloonEmissionModels"></param>
public static void SpawnBloons(this InGame inGame, System.Collections.Generic.List<BloonEmissionModel> bloonEmissionModels)
{
inGame.GetUnityToSimulation().SpawnBloons(bloonEmissionModels.ToIl2CppReferenceArray(), inGame.GetUnityToSimulation().GetCurrentRound(), 0);
}


/// <summary>
/// Spawn bloons in game
/// </summary>
/// <param name="inGame"></param>
/// <param name="bloonEmissionModels"></param>
public static void SpawnBloons(this InGame inGame, List<BloonEmissionModel> bloonEmissionModels)
{
inGame.GetUnityToSimulation().SpawnBloons(bloonEmissionModels.ToIl2CppReferenceArray(), inGame.GetUnityToSimulation().GetCurrentRound(), 0);
}


/// <summary>
/// Spawn bloons in game
/// </summary>
/// <param name="inGame"></param>
/// <param name="bloonEmissionModels"></param>
public static void SpawnBloons(this InGame inGame, Il2CppReferenceArray<BloonEmissionModel> bloonEmissionModels)
{
inGame.GetUnityToSimulation().SpawnBloons(bloonEmissionModels, inGame.GetUnityToSimulation().GetCurrentRound(), 0);
}


/// <summary>
/// Spawn bloons in game
/// </summary>
/// <param name="inGame"></param>
/// <param name="round"></param>
public static void SpawnBloons(this InGame inGame, int round)
{
GameModel model = inGame.GetGameModel();
Expand Down
2 changes: 1 addition & 1 deletion BloonsTD6 Mod Helper/MelonMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal class MelonMain : MelonMod

public const string githubReleaseURL = "https://api.github.com/repos/gurrenm3/BloonsTD6-Mod-Helper/releases";
public const string coopMessageCode = "BTD6_ModHelper";
public const string currentVersion = "1.0.0";
public const string currentVersion = "1.0.1";

private bool useModOptionsDEBUG = false;
private ModOptionsMenu modOptionsUI;
Expand Down

0 comments on commit 58258dd

Please sign in to comment.