Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
xAstroBoy committed Feb 21, 2022
2 parents e025534 + f3b45cc commit 57e422d
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,19 @@ jobs:
body_path: Release.md
files: |
Output/Release/ActionMenuApi.dll
Output/Release/ActionMenuApi.dll.mdb
Output/Release/ActionMenuApi.xml
Output/Release/ActionMenuTestMod.dll
Output/Release/ActionMenuTestMod.mdb
Output/Release/ActionMenuUtils.dll
Output/Release/ActionMenuUtils.dll.mdb
Output/Release/StandaloneThirdPerson.dll
Output/Release/StandaloneThirdPerson.dll.mdb
Output/Release/UpdateChecker.dll
Output/Release/UpdateChecker.dll.mdb
Output/Release/WorldPredownload.dll
Output/Release/WorldPredownload.dll.mdb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
4 changes: 3 additions & 1 deletion StandaloneThirdPerson/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ private static void FreeformCameraUpdate()
if (Input.GetKey(KeyCode.J)) movement -= thirdPersonCamera.transform.right;
if (Input.GetKey(KeyCode.I)) movement += thirdPersonCamera.transform.forward;
if (Input.GetKey(KeyCode.K)) movement -= thirdPersonCamera.transform.forward;

if (Input.GetKey(KeyCode.RightShift)) movement *= 2;

thirdPersonCamera.transform.position += movement * Time.deltaTime * 2;
}
Expand Down Expand Up @@ -212,4 +214,4 @@ private static void Prefix()
}
}
}
}
}
14 changes: 14 additions & 0 deletions Tools/MDBGenerator/MDBGenerator.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net472</TargetFramework>
<LangVersion>9</LangVersion>
<NoModReferences>true</NoModReferences>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Mono.Cecil" Version="0.11.4" />
</ItemGroup>

</Project>
31 changes: 31 additions & 0 deletions Tools/MDBGenerator/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System.IO;
using Mono.Cecil;
using Mono.Cecil.Mdb;
using Mono.Cecil.Pdb;

namespace MDBGenerator
{
internal static class Program
{
static int Main(string[] args)
{
var assemblyToProcess = args[0];

var assemblyResolver = new DefaultAssemblyResolver();
assemblyResolver.AddSearchDirectory(Path.GetDirectoryName(assemblyToProcess));

var readerParams = new ReaderParameters {
AssemblyResolver = assemblyResolver,
ReadSymbols = true,
ReadWrite = true,
SymbolReaderProvider = new PdbReaderProvider(),
};

using var assembly = AssemblyDefinition.ReadAssembly(new FileStream(args[0], FileMode.Open, FileAccess.ReadWrite), readerParams);

assembly.Write(new WriterParameters {SymbolWriterProvider = new MdbWriterProvider(), WriteSymbols = true, });

return 0;
}
}
}

0 comments on commit 57e422d

Please sign in to comment.