Skip to content

Commit

Permalink
Fixed for BTD6 v34 / MelonLoader 0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
doombubbles committed Dec 29, 2022
1 parent c7a1e1b commit 07a4a56
Show file tree
Hide file tree
Showing 31 changed files with 81 additions and 85 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
PROJECT_NAME: CardMonkey
MOD_HELPER_BRANCH: master
MELONLOADER_BRANCH: alpha-development

MOD_HELPER_NAME: Btd6ModHelper
BLOONSTD6: ./BloonsTD6
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: build.yml
branch: ${{ env.MELONLOADER_BRANCH }}
name: MelonLoader.x64.CI.Release
name: MelonLoader.Linux.x64.CI.Release
repo: LavaGang/MelonLoader
path: ${{ env.BLOONSTD6 }}

Expand All @@ -59,11 +59,11 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
repository: doombubbles/btd6-ci-dependencies
ref: main
path: ${{ env.BLOONSTD6 }}/MelonLoader/Managed
path: ${{ env.BLOONSTD6 }}/MelonLoader/Il2CppAssemblies


- name: Download Latest Mod Helper
uses: dsaltares/fetch-gh-release-asset@master
uses: robinraju/release-[email protected]
if: env.MOD_HELPER_BRANCH == ''
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -93,15 +93,15 @@ jobs:
if [ "$RUNNER_OS" == "Windows" ]; then
choco install -y wget
fi
wget https://raw.githubusercontent.com/gurrenm3/BTD-Mod-Helper/${{ env.MOD_HELPER_BRANCH }}/BloonsTD6%20Mod%20Helper/btd6.targets
wget https://raw.githubusercontent.com/gurrenm3/BTD-Mod-Helper/master/BloonsTD6%20Mod%20Helper/btd6.targets
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x # net6 can still build older as well


- name: Build
run: dotnet build -c Release -p:BloonsTD6="../${{ env.BLOONSTD6 }}" "${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}.csproj"

Expand All @@ -111,12 +111,12 @@ jobs:
with:
name: ${{ env.PROJECT_NAME }}.dll
path: ${{ env.BLOONSTD6 }}/Mods/${{ env.PROJECT_NAME }}.dll


- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
with:
files: ${{ env.BLOONSTD6 }}/Mods/${{ env.PROJECT_NAME }}.dll
body_path: ${{ env.PROJECT_NAME }}/LATEST.md
fail_on_unmatched_files: true
9 changes: 5 additions & 4 deletions CardMonkey.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System.Collections.Generic;
using System.Linq;
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Models.TowerSets;
using BTD_Mod_Helper;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.TowerSets;
using BTD_Mod_Helper.Api.Enums;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;
Expand All @@ -17,7 +18,7 @@ public class CardMonkey : ModTower
// public override string Portrait => "Don't need to override this, using the default of Name-Portrait";
// public override string Icon => "Don't need to override this, using the default of Name-Icon";

public override string TowerSet => TowerSetType.Primary;
public override TowerSet TowerSet => TowerSet.Primary;

public override string BaseTower => TowerType.DartMonkey;
public override int Cost => 400;
Expand Down Expand Up @@ -58,6 +59,6 @@ public override int GetTowerIndex(List<TowerDetailsModel> towerSet)
/// That mod will handle actually allowing the upgrades to happen in the UI
/// </summary>
public override bool IsValidCrosspath(int[] tiers) =>
HasMod("UltimateCrosspathing") ? true : base.IsValidCrosspath(tiers);
ModHelper.HasMod("UltimateCrosspathing") ? true : base.IsValidCrosspath(tiers);
}
}
12 changes: 2 additions & 10 deletions CardMonkey.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>CardMonkey</RootNamespace>
<Configurations>Debug;Release</Configurations>
<Nullable>enable</Nullable>
<AssemblyName>CardMonkey</AssemblyName>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<Optimize>False</Optimize>
<DebugType>embedded</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<Optimize>True</Optimize>
<DebugType>none</DebugType>
</PropertyGroup>


<Import Project="..\btd6.targets" />
</Project>
4 changes: 2 additions & 2 deletions Displays/CardMonkeyBaseDisplay.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Linq;
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Unity.Display;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Unity.Display;
using BTD_Mod_Helper.Api.Display;
using BTD_Mod_Helper.Extensions;
using UnityEngine;
Expand Down
4 changes: 2 additions & 2 deletions Displays/CardMonkeyMultiDisplay.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Unity.Display;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Unity.Display;
using BTD_Mod_Helper.Api;
using BTD_Mod_Helper.Api.Display;
using BTD_Mod_Helper.Extensions;
Expand Down
8 changes: 4 additions & 4 deletions Displays/CardMonkeyParagonDisplay.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Collections.Generic;
using Assets.Scripts.Models.GenericBehaviors;
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Unity;
using Assets.Scripts.Unity.Display;
using Il2CppAssets.Scripts.Models.GenericBehaviors;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Unity;
using Il2CppAssets.Scripts.Unity.Display;
using BTD_Mod_Helper.Api;
using BTD_Mod_Helper.Api.Display;
using BTD_Mod_Helper.Extensions;
Expand Down
4 changes: 2 additions & 2 deletions Displays/Projectiles/CardDisplays.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Assets.Scripts.Simulation.SMath;
using Assets.Scripts.Unity.Display;
using Il2CppAssets.Scripts.Simulation.SMath;
using Il2CppAssets.Scripts.Unity.Display;
using BTD_Mod_Helper.Api.Display;

namespace CardMonkey.Displays.Projectiles
Expand Down
4 changes: 2 additions & 2 deletions Displays/Tier5/AceOfSpadesDisplay.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Unity.Display;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Unity.Display;
using BTD_Mod_Helper.Api.Display;
using BTD_Mod_Helper.Extensions;
using UnityEngine;
Expand Down
4 changes: 2 additions & 2 deletions Displays/Tier5/RoyalFlushDisplay.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Unity.Display;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Unity.Display;
using BTD_Mod_Helper.Api.Display;
using BTD_Mod_Helper.Extensions;
using UnityEngine;
Expand Down
4 changes: 2 additions & 2 deletions Displays/Tier5/TFDisplay.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Unity.Display;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Unity.Display;
using BTD_Mod_Helper.Api.Display;
using BTD_Mod_Helper.Extensions;
using UnityEngine;
Expand Down
Binary file modified Displays/Tier5/TFDisplay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Displays/Tier5/TFDisplay_32.png
Binary file not shown.
Binary file added Displays/Tier5/TFDisplay_33.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion LATEST.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- Fixed displays for v33
- Fixed for BTD6 v34 / MelonLoader 0.6.0
3 changes: 2 additions & 1 deletion ModHelperData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
{
public static class ModHelperData
{
public const string Version = "1.2.4";
public const string WorksOnVersion = "34.3";
public const string Version = "1.2.5";
public const string Name = "Card Monkey";
public const string Description =
"Adds in a new custom tower themed around playing cards.";
Expand Down
2 changes: 1 addition & 1 deletion Upgrades/BottomPath/CardCounting.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Assets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;

Expand Down
2 changes: 1 addition & 1 deletion Upgrades/BottomPath/MarkedCards.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Assets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;

Expand Down
4 changes: 2 additions & 2 deletions Upgrades/BottomPath/SleightOfHand.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Models.Towers.Filters;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers.Filters;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;

Expand Down
6 changes: 3 additions & 3 deletions Upgrades/BottomPath/StackedDeck.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Models.Towers.Behaviors;
using Assets.Scripts.Unity;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers.Behaviors;
using Il2CppAssets.Scripts.Unity;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;

Expand Down
12 changes: 6 additions & 6 deletions Upgrades/BottomPath/TwistOfFate.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Models.Towers.Filters;
using Assets.Scripts.Models.Towers.Projectiles.Behaviors;
using Assets.Scripts.Unity;
using Assets.Scripts.Utils;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers.Filters;
using Il2CppAssets.Scripts.Models.Towers.Projectiles.Behaviors;
using Il2CppAssets.Scripts.Unity;
using Il2CppAssets.Scripts.Utils;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;
using CardMonkey.Displays.Projectiles;
Expand Down Expand Up @@ -75,7 +75,7 @@ public override void ApplyUpgrade(TowerModel tower)

var behavior = new CreateProjectileOnExhaustFractionModel(
"CreateProjectileOnExhaustFractionModel_",
pb.projectile, pb.emission, 1f, 1f, true);
pb.projectile, pb.emission, 1f, 1f, true, false);
redCard.projectile.AddBehavior(behavior);

var soundBehavior = new CreateSoundOnProjectileExhaustModel(
Expand Down
2 changes: 1 addition & 1 deletion Upgrades/GodKingOfSpades.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Assets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers;
using BTD_Mod_Helper.Api.Towers;

namespace CardMonkey.Upgrades
Expand Down
21 changes: 11 additions & 10 deletions Upgrades/MiddlePath/AceInTheHole.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
using Assets.Scripts.Models;
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Models.Towers.Behaviors.Abilities;
using Assets.Scripts.Models.Towers.Behaviors.Abilities.Behaviors;
using Assets.Scripts.Models.Towers.Behaviors.Attack;
using Assets.Scripts.Models.Towers.Behaviors.Attack.Behaviors;
using Assets.Scripts.Models.Towers.Behaviors.Emissions.Behaviors;
using Assets.Scripts.Models.Towers.Projectiles.Behaviors;
using Assets.Scripts.Unity;
using Il2CppAssets.Scripts.Models;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Abilities.Behaviors;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Attack.Behaviors;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions.Behaviors;
using Il2CppAssets.Scripts.Models.Towers.Projectiles.Behaviors;
using Il2CppAssets.Scripts.Unity;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;
using CardMonkey.Displays.Projectiles;
using UnhollowerBaseLib;
using Il2Cpp;
using Il2CppInterop.Runtime.InteropTypes.Arrays;

namespace CardMonkey.Upgrades.MiddlePath
{
Expand Down
6 changes: 3 additions & 3 deletions Upgrades/MiddlePath/AceOfSpades.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Linq;
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Models.Towers.Projectiles;
using Assets.Scripts.Models.Towers.Projectiles.Behaviors;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers.Projectiles;
using Il2CppAssets.Scripts.Models.Towers.Projectiles.Behaviors;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;
using CardMonkey.Displays.Projectiles;
Expand Down
4 changes: 2 additions & 2 deletions Upgrades/MiddlePath/AcesWild.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Linq;
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Models.Towers.Projectiles.Behaviors;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers.Projectiles.Behaviors;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;
using CardMonkey.Displays.Projectiles;
Expand Down
4 changes: 2 additions & 2 deletions Upgrades/MiddlePath/CutTheDeck.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Simulation.Towers;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Simulation.Towers;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;

Expand Down
3 changes: 2 additions & 1 deletion Upgrades/MiddlePath/WildCards.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using Assets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;
using CardMonkey.Displays.Projectiles;
using Il2Cpp;

namespace CardMonkey.Upgrades.MiddlePath
{
Expand Down
4 changes: 2 additions & 2 deletions Upgrades/TopPath/FourOfAKind.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Models.Towers.Behaviors.Emissions;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;

Expand Down
6 changes: 3 additions & 3 deletions Upgrades/TopPath/Pair.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Models.Towers.Behaviors.Emissions;
using Assets.Scripts.Simulation.Towers;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions;
using Il2CppAssets.Scripts.Simulation.Towers;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;

Expand Down
2 changes: 1 addition & 1 deletion Upgrades/TopPath/RoyalFlush.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Assets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;

Expand Down
6 changes: 3 additions & 3 deletions Upgrades/TopPath/StraightFlush.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Models.Towers.Behaviors.Emissions;
using Assets.Scripts.Models.Towers.Weapons.Behaviors;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions;
using Il2CppAssets.Scripts.Models.Towers.Weapons.Behaviors;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;

Expand Down
4 changes: 2 additions & 2 deletions Upgrades/TopPath/ThreeOfAKind.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Assets.Scripts.Models.Towers;
using Assets.Scripts.Models.Towers.Behaviors.Emissions;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions;
using BTD_Mod_Helper.Api.Towers;
using BTD_Mod_Helper.Extensions;

Expand Down

0 comments on commit 07a4a56

Please sign in to comment.