Skip to content

Commit

Permalink
Enable BZ build
Browse files Browse the repository at this point in the history
  • Loading branch information
toebeann committed Jan 14, 2023
1 parent af06545 commit be070e4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Tobey.SnapBuilder/SnapBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
Expand Down Expand Up @@ -181,4 +182,7 @@ public Quaternion CalculateRotation(ref float additiveRotation, RaycastHit hit,
public Transform GetMetadata() => Builder.ghostModel?.transform.Find("SnapBuilder");

public Quaternion GetDefaultRotation() => GetMetadata()?.localRotation ?? Quaternion.identity;

[Obsolete]
public static void QMMEntryPoint() => Chainloader.ManagerObject.AddComponent<SnapBuilder>();
}
14 changes: 13 additions & 1 deletion Tobey.SnapBuilder/Tobey.SnapBuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@
</PropertyGroup>

<Target Name="ZipBuild" AfterTargets="AfterBuild">
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(OutputPath)\zip\plugins" />
<ItemGroup>
<CleanUpFiles Include="$(OutputPath)\zip\**\*" />
</ItemGroup>
<Delete Files="@(CleanUpFiles)"/>
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(OutputPath)\zip\SnapBuilder" />
<ZipDirectory SourceDirectory="$(OutputPath)\zip" DestinationFile="$(OutputPath)\$(Product).zip" Overwrite="true" />
<Copy SourceFiles="$(OutputPath)\mod.json" DestinationFolder="$(OutputPath)\zip\SnapBuilder" />
<ZipDirectory SourceDirectory="$(OutputPath)\zip" DestinationFile="$(OutputPath)\$(Product)_BZ.zip" Overwrite="true" />
</Target>

<ItemGroup>
Expand All @@ -37,6 +43,12 @@
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="mod.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup>
<Reference Update="mscorlib">
<Private>False</Private>
Expand Down
11 changes: 11 additions & 0 deletions Tobey.SnapBuilder/mod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"Id": "SnapBuilder",
"DisplayName": "SnapBuilder",
"Author": "Tobey Blaber",
"Version": "2.1.0",
"Enable": true,
"Game": "BelowZero",
"AssemblyName": "Tobey.SnapBuilder.dll",
"NitroxCompat": true,
"EntryMethod": "Tobey.SnapBuilder.SnapBuilder.QMMEntryPoint"
}

0 comments on commit be070e4

Please sign in to comment.