1
0
mirror of synced 2024-11-27 23:40:48 +01:00

Init Commit

This commit is contained in:
Fluto 2022-01-29 12:09:57 +11:00
commit 9b6593afbe
11 changed files with 159 additions and 0 deletions

35
.gitignore vendored Normal file
View File

@ -0,0 +1,35 @@
# Common IntelliJ Platform excludes
# User specific
**/.idea/**/workspace.xml
**/.idea/**/tasks.xml
**/.idea/shelf/*
**/.idea/dictionaries
**/.idea/httpRequests/
# Sensitive or high-churn files
**/.idea/**/dataSources/
**/.idea/**/dataSources.ids
**/.idea/**/dataSources.xml
**/.idea/**/dataSources.local.xml
**/.idea/**/sqlDataSources.xml
**/.idea/**/dynamic.xml
# Rider
# Rider auto-generates .iml files, and contentModel.xml
**/.idea/**/*.iml
**/.idea/**/contentModel.xml
**/.idea/**/modules.xml
*.suo
*.user
.vs/
[Bb]in/
[Oo]bj/
_UpgradeReport_Files/
[Pp]ackages/
Thumbs.db
Desktop.ini
.DS_Store
ShortcutFolder.lnk

13
.idea/.idea.TaikoMods.dir/.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,13 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/contentModel.xml
/modules.xml
/projectSettingsUpdater.xml
/.idea.TaikoMods.iml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

1
.idea/.idea.TaikoMods.dir/.idea/.name generated Normal file
View File

@ -0,0 +1 @@
TaikoMods

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

6
.idea/.idea.TaikoMods.dir/.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

3
Folder.DotSettings Normal file
View File

@ -0,0 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=Fluto/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Taiko/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

6
NuGet.Config Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="BepInEx" value="https://nuget.bepinex.dev/v3/index.json" />
</packageSources>
</configuration>

19
Plugin.cs Normal file
View File

@ -0,0 +1,19 @@
using BepInEx;
using HarmonyLib;
namespace TaikoMods
{
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
public class Plugin : BaseUnityPlugin
{
private Harmony _harmony;
private void Awake()
{
Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!");
// Patch methods
_harmony = new Harmony(PluginInfo.PLUGIN_GUID);
_harmony.PatchAll();
}
}
}

30
SignInPatch.cs Normal file
View File

@ -0,0 +1,30 @@
using System.Reflection;
using HarmonyLib;
using Microsoft.Xbox;
using UnityEngine;
namespace FlutoTaikoMods;
/// <summary>
/// This patch will address the issue where signing with GDK is done correctly
/// </summary>
[HarmonyPatch(typeof(GdkHelpers))]
[HarmonyPatch("SignIn")]
public static class SignInPatch
{
// ReSharper disable once InconsistentNaming
private static bool Prefix(GdkHelpers __instance)
{
// Only apply this patch if we're on version 1.0.0
if (Application.version != "1.0.0")
return false;
UnityEngine.Debug.Log("Patching sign in to force the user to be prompted to sign in");
var methodInfo = typeof(GdkHelpers).GetMethod("SignInImpl", BindingFlags.NonPublic | BindingFlags.Instance);
if (methodInfo == null)
return false;
methodInfo.Invoke(__instance, new object[] { false});
return true;
}
}

34
TaikoMods.csproj Normal file
View File

@ -0,0 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<AssemblyName>com.fluto.taikomods</AssemblyName>
<Description>Cool Taiko mods</Description>
<Version>0.0.1</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<RootNamespace>TaikoMods</RootNamespace>
<PackageId>com.fluto.taikomods</PackageId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BepInEx.Analyzers" Version="1.*" PrivateAssets="all" />
<PackageReference Include="BepInEx.Core" Version="5.*" />
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.*" />
<PackageReference Include="UnityEngine.Modules" Version="2020.3.19" IncludeAssets="compile" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp, Version=1.0.2.22379, Culture=neutral, PublicKeyToken=null">
<HintPath>D:\XboxGames\T Tablet\Content\Taiko no Tatsujin_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
</ItemGroup>
<Target Name="PostBuildCopy" AfterTargets="PostBuildEvent">
<Copy SourceFiles="$(TargetDir)$(AssemblyName).dll" DestinationFolder="D:\XboxGames\T Tablet\Content\BepInEx\plugins" Condition="Exists('D:\XboxGames\T Tablet\Content\BepInEx\plugins')" SkipUnchangedFiles="true" />
</Target>
</Project>