Skip to content

Commit be070e4

Browse files
committed
Enable BZ build
1 parent af06545 commit be070e4

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

Tobey.SnapBuilder/SnapBuilder.cs

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using BepInEx;
2+
using BepInEx.Bootstrap;
23
using BepInEx.Configuration;
34
using BepInEx.Logging;
45
using HarmonyLib;
@@ -181,4 +182,7 @@ public Quaternion CalculateRotation(ref float additiveRotation, RaycastHit hit,
181182
public Transform GetMetadata() => Builder.ghostModel?.transform.Find("SnapBuilder");
182183

183184
public Quaternion GetDefaultRotation() => GetMetadata()?.localRotation ?? Quaternion.identity;
185+
186+
[Obsolete]
187+
public static void QMMEntryPoint() => Chainloader.ManagerObject.AddComponent<SnapBuilder>();
184188
}

Tobey.SnapBuilder/Tobey.SnapBuilder.csproj

+13-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@
1111
</PropertyGroup>
1212

1313
<Target Name="ZipBuild" AfterTargets="AfterBuild">
14-
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(OutputPath)\zip\plugins" />
14+
<ItemGroup>
15+
<CleanUpFiles Include="$(OutputPath)\zip\**\*" />
16+
</ItemGroup>
17+
<Delete Files="@(CleanUpFiles)"/>
18+
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(OutputPath)\zip\SnapBuilder" />
1519
<ZipDirectory SourceDirectory="$(OutputPath)\zip" DestinationFile="$(OutputPath)\$(Product).zip" Overwrite="true" />
20+
<Copy SourceFiles="$(OutputPath)\mod.json" DestinationFolder="$(OutputPath)\zip\SnapBuilder" />
21+
<ZipDirectory SourceDirectory="$(OutputPath)\zip" DestinationFile="$(OutputPath)\$(Product)_BZ.zip" Overwrite="true" />
1622
</Target>
1723

1824
<ItemGroup>
@@ -37,6 +43,12 @@
3743
</Reference>
3844
</ItemGroup>
3945

46+
<ItemGroup>
47+
<None Update="mod.json">
48+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
49+
</None>
50+
</ItemGroup>
51+
4052
<ItemGroup>
4153
<Reference Update="mscorlib">
4254
<Private>False</Private>

Tobey.SnapBuilder/mod.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"Id": "SnapBuilder",
3+
"DisplayName": "SnapBuilder",
4+
"Author": "Tobey Blaber",
5+
"Version": "2.1.0",
6+
"Enable": true,
7+
"Game": "BelowZero",
8+
"AssemblyName": "Tobey.SnapBuilder.dll",
9+
"NitroxCompat": true,
10+
"EntryMethod": "Tobey.SnapBuilder.SnapBuilder.QMMEntryPoint"
11+
}

0 commit comments

Comments
 (0)