-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from Derpy-Jacob-903/patch-1
I love null checking!! (Plus 46.X Fixes!)
- Loading branch information
Showing
19 changed files
with
162 additions
and
34 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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,47 @@ | ||
using Il2CppAssets.Scripts.Unity; | ||
|
||
namespace BTD6Rogue | ||
{ | ||
public class BloonValidation | ||
{ | ||
public void ValidateRogueBloon(RogueBloon bloon) | ||
{ | ||
string?[] arr = [bloon.BaseBloonId, null, null, null, null, null, null, null]; // | ||
string[] brr = ["", "Camo", "Fortified", "FortifiedCamo", "Regrow", "RegrowCamo", "RegrowFortified", "RegrowFortifiedCamo"]; //Suffixes | ||
|
||
if (bloon.Camo) { arr[1] = bloon.BaseBloonId + brr[1]; } | ||
if (bloon.Fortified) { arr[2] = bloon.BaseBloonId + brr[2]; } | ||
if (bloon.Camo && bloon.Fortified) { arr[3] = bloon.BaseBloonId + brr[3]; } | ||
if (bloon.Regrow) { arr[4] = bloon.BaseBloonId + brr[4]; } | ||
if (bloon.Regrow && bloon.Camo) { arr[5] = bloon.BaseBloonId + brr[5]; } | ||
if (bloon.Regrow && bloon.Fortified) { arr[6] = bloon.BaseBloonId + brr[6]; } | ||
if (bloon.Regrow && bloon.Fortified && bloon.Camo) { arr[7] = bloon.BaseBloonId + brr[7]; } | ||
|
||
foreach (var j in arr) //Nullable string array | ||
{ | ||
if (j is null) { continue; } | ||
bool found = false; | ||
foreach (var i in Game.instance.model.bloons) // Il2CppReferenceArray<BloonModel> | ||
{ | ||
if (i.id == j) | ||
{ | ||
found = true; | ||
break; // Exit loop when a match is found | ||
} | ||
} | ||
if (!found) | ||
{ | ||
BTD6Rogue.LogMessage($"The {j} Bloon was not found. It may cause a crash ingame.", this, ErrorLevels.Warning); | ||
} | ||
} | ||
} | ||
|
||
public void ValidateAllRogueBloons() | ||
{ | ||
foreach (var rogueBloon in BloonUtil.GetAllBloons()) | ||
{ | ||
ValidateRogueBloon(rogueBloon); | ||
} | ||
} | ||
} | ||
} |
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
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,8 @@ | ||
using Il2CppAssets.Scripts.Models.Towers; | ||
|
||
namespace BTD6Rogue; | ||
|
||
public class ApexPlasmaMaster : RogueParagon { | ||
Check failure on line 5 in Tower/Paragons/VanillaParagons/CrucibleOfSteelAndFlame.cs GitHub Actions / build
|
||
public override string DisplayName => "Apex Plasma Master"; | ||
public override string BaseTowerId => TowerType.DartMonkey; | ||
} |
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