Skip to content

Commit

Permalink
Update to using .NET 8.0 SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
doombubbles committed Apr 14, 2024
1 parent 73abbd4 commit 0737e86
Show file tree
Hide file tree
Showing 49 changed files with 1,384 additions and 1,355 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x # net6 can still build older as well
dotnet-version: 8.0.x


- name: Build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static void SendMessageEx<T>(this NKMultiGameInterface nkGI, T objectToSe
public static void SendMessage(this NKMultiGameInterface nkGI, String objectToSend, byte? peerId = null,
string code = "")
{
var message = MessageUtils.CreateMessage(objectToSend, code);
var message = MessageUtils.CreateMessageEx(objectToSend, code);
if (peerId.HasValue)
nkGI.SendToPeer(peerId.Value, message);
else
Expand Down
3 changes: 3 additions & 0 deletions BloonsTD6 Mod Helper/ILRepack.targets
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<Message Text="Copying Nuget Assemblies to UserLibs folder..." Importance="high"/>
<Copy SourceFiles="@(NugetAssemblies)" DestinationFolder="$(BloonsTD6)\UserLibs"/>
</Target>



<!--When in Release mode, pack the libraries into the dll-->
<Target Name="ILRepacker" AfterTargets="Build" BeforeTargets="MoveDllToMods" DependsOnTargets="Definitons" Condition="'$(Configuration)' != 'Debug'">
Expand All @@ -31,6 +33,7 @@
<LibraryPaths Include="$(NetCoreRoot)packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0"/>
</ItemGroup>

<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
<ILRepack
Parallel="true"
InputAssemblies="@(InputAssemblies)"
Expand Down
26 changes: 26 additions & 0 deletions BloonsTD6 Mod Helper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# BloonsTD6 Mod Helper

This is the C# project for BTD Mod Helper.

## Requirements

Requires .NET SDK 8.0 or higher to build the project (however the built library itself will still only be targeting .NET
6.0)

## Build Configurations

### Release

This configuration is used for the actual released .dll

This configuration will utilize ILRepack to bundle the Nuget dependencies into the released dll.

Running this configuration also triggers the generation of the docs using DefaultDocumentation

### Debug

This configuration will not use ILRepack for the dependencies, as that messes up .NET's debugging of the process.
It will instead manually copy their dlls into the BloonsTD6 UserAssemblies folder, which will also work.

This configuration will also include some additional options and buttons in the Mod Settings page for Mod Helper,
like the ones for generating Vanilla Sprites
192 changes: 96 additions & 96 deletions Documentation/BTD_Mod_Helper.Api.Components.Info.md

Large diffs are not rendered by default.

342 changes: 171 additions & 171 deletions Documentation/BTD_Mod_Helper.Api.Components.ModHelperComponent.md

Large diffs are not rendered by default.

84 changes: 42 additions & 42 deletions Documentation/BTD_Mod_Helper.Api.Display.ModDisplay.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,29 +364,6 @@ The UnityDisplayNode

The name of the texture, without .png

<a name='BTD_Mod_Helper.Api.Display.ModDisplay.SetMeshOutlineColor(UnityDisplayNode,Color)'></a>

## ModDisplay.SetMeshOutlineColor(UnityDisplayNode, Color) Method

Sets the outline color for the first mesh renderer in the given node

```csharp
protected void SetMeshOutlineColor(UnityDisplayNode node, Color color);
```
#### Parameters

<a name='BTD_Mod_Helper.Api.Display.ModDisplay.SetMeshOutlineColor(UnityDisplayNode,Color).node'></a>

`node` [Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode 'Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode')

The UnityDisplayNode

<a name='BTD_Mod_Helper.Api.Display.ModDisplay.SetMeshOutlineColor(UnityDisplayNode,Color).color'></a>

`color` [UnityEngine.Color](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Color 'UnityEngine.Color')

The color for it to be outlined (when not highlighted)

<a name='BTD_Mod_Helper.Api.Display.ModDisplay.SetMeshOutlineColor(UnityDisplayNode,Color,int)'></a>

## ModDisplay.SetMeshOutlineColor(UnityDisplayNode, Color, int) Method
Expand Down Expand Up @@ -416,28 +393,28 @@ The color for it to be outlined (when not highlighted)

What index of mesh renderer to use

<a name='BTD_Mod_Helper.Api.Display.ModDisplay.SetMeshTexture(UnityDisplayNode,string)'></a>
<a name='BTD_Mod_Helper.Api.Display.ModDisplay.SetMeshOutlineColor(UnityDisplayNode,Color)'></a>

## ModDisplay.SetMeshTexture(UnityDisplayNode, string) Method
## ModDisplay.SetMeshOutlineColor(UnityDisplayNode, Color) Method

Sets the mesh texture to that of a named png
Sets the outline color for the first mesh renderer in the given node

```csharp
protected void SetMeshTexture(UnityDisplayNode node, string textureName);
protected void SetMeshOutlineColor(UnityDisplayNode node, Color color);
```
#### Parameters

<a name='BTD_Mod_Helper.Api.Display.ModDisplay.SetMeshTexture(UnityDisplayNode,string).node'></a>
<a name='BTD_Mod_Helper.Api.Display.ModDisplay.SetMeshOutlineColor(UnityDisplayNode,Color).node'></a>

`node` [Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode 'Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode')

The UnityDisplayNode

<a name='BTD_Mod_Helper.Api.Display.ModDisplay.SetMeshTexture(UnityDisplayNode,string).textureName'></a>
<a name='BTD_Mod_Helper.Api.Display.ModDisplay.SetMeshOutlineColor(UnityDisplayNode,Color).color'></a>

`textureName` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')
`color` [UnityEngine.Color](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.Color 'UnityEngine.Color')

The name of the texture, without .png
The color for it to be outlined (when not highlighted)

<a name='BTD_Mod_Helper.Api.Display.ModDisplay.SetMeshTexture(UnityDisplayNode,string,int)'></a>

Expand Down Expand Up @@ -468,28 +445,28 @@ The name of the texture, without .png

The index to set at

<a name='BTD_Mod_Helper.Api.Display.ModDisplay.UseNode(string,System.Action_UnityDisplayNode_)'></a>
<a name='BTD_Mod_Helper.Api.Display.ModDisplay.SetMeshTexture(UnityDisplayNode,string)'></a>

## ModDisplay.UseNode(string, Action<UnityDisplayNode>) Method
## ModDisplay.SetMeshTexture(UnityDisplayNode, string) Method

Gets a UnityDisplayNode for a different guid
Sets the mesh texture to that of a named png

```csharp
protected void UseNode(string guid, System.Action<UnityDisplayNode> action);
protected void SetMeshTexture(UnityDisplayNode node, string textureName);
```
#### Parameters

<a name='BTD_Mod_Helper.Api.Display.ModDisplay.UseNode(string,System.Action_UnityDisplayNode_).guid'></a>
<a name='BTD_Mod_Helper.Api.Display.ModDisplay.SetMeshTexture(UnityDisplayNode,string).node'></a>

`guid` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')
`node` [Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode 'Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode')

The asset reference guid to get the node from
The UnityDisplayNode

<a name='BTD_Mod_Helper.Api.Display.ModDisplay.UseNode(string,System.Action_UnityDisplayNode_).action'></a>
<a name='BTD_Mod_Helper.Api.Display.ModDisplay.SetMeshTexture(UnityDisplayNode,string).textureName'></a>

`action` [System.Action&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode 'Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')
`textureName` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')

What to do with the node
The name of the texture, without .png

<a name='BTD_Mod_Helper.Api.Display.ModDisplay.UseNode(string,System.Action_UnityDisplayNode_,DisplayCategory)'></a>

Expand All @@ -516,4 +493,27 @@ What to do with the node

<a name='BTD_Mod_Helper.Api.Display.ModDisplay.UseNode(string,System.Action_UnityDisplayNode_,DisplayCategory).displayCategory'></a>

`displayCategory` [Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayCategory](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayCategory 'Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayCategory')
`displayCategory` [Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayCategory](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayCategory 'Il2CppAssets.Scripts.Models.GenericBehaviors.DisplayCategory')

<a name='BTD_Mod_Helper.Api.Display.ModDisplay.UseNode(string,System.Action_UnityDisplayNode_)'></a>

## ModDisplay.UseNode(string, Action<UnityDisplayNode>) Method

Gets a UnityDisplayNode for a different guid

```csharp
protected void UseNode(string guid, System.Action<UnityDisplayNode> action);
```
#### Parameters

<a name='BTD_Mod_Helper.Api.Display.ModDisplay.UseNode(string,System.Action_UnityDisplayNode_).guid'></a>

`guid` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')

The asset reference guid to get the node from

<a name='BTD_Mod_Helper.Api.Display.ModDisplay.UseNode(string,System.Action_UnityDisplayNode_).action'></a>

`action` [System.Action&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')[Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode 'Il2CppAssets.Scripts.Unity.Display.UnityDisplayNode')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Action-1 'System.Action`1')

What to do with the node
32 changes: 16 additions & 16 deletions Documentation/BTD_Mod_Helper.Api.Helpers.MapHelper.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,51 +56,51 @@ public static PathModel CreatePathModel(string pathName, System.Collections.Gene
#### Returns
[Il2CppAssets.Scripts.Models.Map.PathModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Map.PathModel 'Il2CppAssets.Scripts.Models.Map.PathModel')
<a name='BTD_Mod_Helper.Api.Helpers.MapHelper.CreatePointInfo(float,float)'></a>
<a name='BTD_Mod_Helper.Api.Helpers.MapHelper.CreatePointInfo(float,float,float)'></a>

## MapHelper.CreatePointInfo(float, float) Method
## MapHelper.CreatePointInfo(float, float, float) Method

Create a [Il2CppAssets.Scripts.Models.Map.PointInfo](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Map.PointInfo 'Il2CppAssets.Scripts.Models.Map.PointInfo') out of an X and Y coord.
Create a [Il2CppAssets.Scripts.Models.Map.PointInfo](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Map.PointInfo 'Il2CppAssets.Scripts.Models.Map.PointInfo') out of X, Y, Z coords.
```csharp
public static PointInfo CreatePointInfo(float x, float y);
public static PointInfo CreatePointInfo(float x, float y, float z);
```
#### Parameters

<a name='BTD_Mod_Helper.Api.Helpers.MapHelper.CreatePointInfo(float,float).x'></a>
<a name='BTD_Mod_Helper.Api.Helpers.MapHelper.CreatePointInfo(float,float,float).x'></a>

`x` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single')
<a name='BTD_Mod_Helper.Api.Helpers.MapHelper.CreatePointInfo(float,float).y'></a>
<a name='BTD_Mod_Helper.Api.Helpers.MapHelper.CreatePointInfo(float,float,float).y'></a>

`y` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single')
<a name='BTD_Mod_Helper.Api.Helpers.MapHelper.CreatePointInfo(float,float,float).z'></a>

`z` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single')
#### Returns
[Il2CppAssets.Scripts.Models.Map.PointInfo](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Map.PointInfo 'Il2CppAssets.Scripts.Models.Map.PointInfo')
<a name='BTD_Mod_Helper.Api.Helpers.MapHelper.CreatePointInfo(float,float,float)'></a>
<a name='BTD_Mod_Helper.Api.Helpers.MapHelper.CreatePointInfo(float,float)'></a>

## MapHelper.CreatePointInfo(float, float, float) Method
## MapHelper.CreatePointInfo(float, float) Method

Create a [Il2CppAssets.Scripts.Models.Map.PointInfo](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Map.PointInfo 'Il2CppAssets.Scripts.Models.Map.PointInfo') out of X, Y, Z coords.
Create a [Il2CppAssets.Scripts.Models.Map.PointInfo](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Map.PointInfo 'Il2CppAssets.Scripts.Models.Map.PointInfo') out of an X and Y coord.
```csharp
public static PointInfo CreatePointInfo(float x, float y, float z);
public static PointInfo CreatePointInfo(float x, float y);
```
#### Parameters

<a name='BTD_Mod_Helper.Api.Helpers.MapHelper.CreatePointInfo(float,float,float).x'></a>
<a name='BTD_Mod_Helper.Api.Helpers.MapHelper.CreatePointInfo(float,float).x'></a>

`x` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single')
<a name='BTD_Mod_Helper.Api.Helpers.MapHelper.CreatePointInfo(float,float,float).y'></a>
<a name='BTD_Mod_Helper.Api.Helpers.MapHelper.CreatePointInfo(float,float).y'></a>

`y` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single')
<a name='BTD_Mod_Helper.Api.Helpers.MapHelper.CreatePointInfo(float,float,float).z'></a>

`z` [System.Single](https://docs.microsoft.com/en-us/dotnet/api/System.Single 'System.Single')
#### Returns
[Il2CppAssets.Scripts.Models.Map.PointInfo](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.Map.PointInfo 'Il2CppAssets.Scripts.Models.Map.PointInfo')
Expand Down
28 changes: 14 additions & 14 deletions Documentation/BTD_Mod_Helper.Api.ModContent.md
Original file line number Diff line number Diff line change
Expand Up @@ -1274,43 +1274,43 @@ public static TowerSet GetTowerSet<T>()
#### Returns
[Il2CppAssets.Scripts.Models.TowerSets.TowerSet](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.TowerSets.TowerSet 'Il2CppAssets.Scripts.Models.TowerSets.TowerSet')
<a name='BTD_Mod_Helper.Api.ModContent.HasMod(string)'></a>
<a name='BTD_Mod_Helper.Api.ModContent.HasMod(string,BTD_Mod_Helper.BloonsMod)'></a>

## ModContent.HasMod(string) Method
## ModContent.HasMod(string, BloonsMod) Method

Returns whether a mod with the given name is installed
Returns whether a mod with the given name is installed, and pass it to the out param if it is

```csharp
public static bool HasMod(string name);
public static bool HasMod(string name, out BTD_Mod_Helper.BloonsMod bloonsMod);
```
#### Parameters

<a name='BTD_Mod_Helper.Api.ModContent.HasMod(string).name'></a>
<a name='BTD_Mod_Helper.Api.ModContent.HasMod(string,BTD_Mod_Helper.BloonsMod).name'></a>

`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')
<a name='BTD_Mod_Helper.Api.ModContent.HasMod(string,BTD_Mod_Helper.BloonsMod).bloonsMod'></a>

`bloonsMod` [BloonsMod](BTD_Mod_Helper.BloonsMod.md 'BTD_Mod_Helper.BloonsMod')

#### Returns
[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')
<a name='BTD_Mod_Helper.Api.ModContent.HasMod(string,BTD_Mod_Helper.BloonsMod)'></a>
<a name='BTD_Mod_Helper.Api.ModContent.HasMod(string)'></a>

## ModContent.HasMod(string, BloonsMod) Method
## ModContent.HasMod(string) Method

Returns whether a mod with the given name is installed, and pass it to the out param if it is
Returns whether a mod with the given name is installed

```csharp
public static bool HasMod(string name, out BTD_Mod_Helper.BloonsMod bloonsMod);
public static bool HasMod(string name);
```
#### Parameters

<a name='BTD_Mod_Helper.Api.ModContent.HasMod(string,BTD_Mod_Helper.BloonsMod).name'></a>
<a name='BTD_Mod_Helper.Api.ModContent.HasMod(string).name'></a>

`name` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')
<a name='BTD_Mod_Helper.Api.ModContent.HasMod(string,BTD_Mod_Helper.BloonsMod).bloonsMod'></a>

`bloonsMod` [BloonsMod](BTD_Mod_Helper.BloonsMod.md 'BTD_Mod_Helper.BloonsMod')

#### Returns
[System.Boolean](https://docs.microsoft.com/en-us/dotnet/api/System.Boolean 'System.Boolean')
Expand Down
24 changes: 12 additions & 12 deletions Documentation/BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,40 +24,40 @@ Derived
&#8627; [ModVanillaUpgrade](BTD_Mod_Helper.Api.Towers.ModVanillaUpgrade.md 'BTD_Mod_Helper.Api.Towers.ModVanillaUpgrade')
### Methods

<a name='BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.Apply(T)'></a>
<a name='BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.Apply(T,GameModel)'></a>

## ModVanillaContent<T>.Apply(T) Method
## ModVanillaContent<T>.Apply(T, GameModel) Method

Applies the modifications to the vanilla content

```csharp
public virtual void Apply(T model);
public virtual void Apply(T model, GameModel gameModel);
```
#### Parameters

<a name='BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.Apply(T).model'></a>
<a name='BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.Apply(T,GameModel).model'></a>

`model` [T](BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.md#BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.T 'BTD_Mod_Helper.Api.Towers.ModVanillaContent<T>.T')

<a name='BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.Apply(T,GameModel)'></a>
<a name='BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.Apply(T,GameModel).gameModel'></a>

## ModVanillaContent<T>.Apply(T, GameModel) Method
`gameModel` [Il2CppAssets.Scripts.Models.GameModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.GameModel 'Il2CppAssets.Scripts.Models.GameModel')

<a name='BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.Apply(T)'></a>

## ModVanillaContent<T>.Apply(T) Method

Applies the modifications to the vanilla content

```csharp
public virtual void Apply(T model, GameModel gameModel);
public virtual void Apply(T model);
```
#### Parameters

<a name='BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.Apply(T,GameModel).model'></a>
<a name='BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.Apply(T).model'></a>

`model` [T](BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.md#BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.T 'BTD_Mod_Helper.Api.Towers.ModVanillaContent<T>.T')

<a name='BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.Apply(T,GameModel).gameModel'></a>

`gameModel` [Il2CppAssets.Scripts.Models.GameModel](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Models.GameModel 'Il2CppAssets.Scripts.Models.GameModel')

<a name='BTD_Mod_Helper.Api.Towers.ModVanillaContent_T_.GetAffected(GameModel)'></a>

## ModVanillaContent<T>.GetAffected(GameModel) Method
Expand Down
Loading

0 comments on commit 0737e86

Please sign in to comment.