Skip to content

Commit

Permalink
Add Flags + Add Toggle Names Mod
Browse files Browse the repository at this point in the history
  • Loading branch information
Mercer01 committed May 7, 2020
1 parent 8df1321 commit 38fdd25
Show file tree
Hide file tree
Showing 11 changed files with 329 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
<Reference Include="Bouncyrock.BouncePackage.Runtime">
<HintPath>E:\Steam 2\steamapps\common\TaleSpire\TaleSpire_Data\Managed\Bouncyrock.BouncePackage.Runtime.dll</HintPath>
</Reference>
<Reference Include="Bouncyrock.TaleSpire.BounceTools.Runtime, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="Bouncyrock.TaleSpire.BounceTools.Runtime">
<HintPath>E:\Steam 2\steamapps\common\TaleSpire\TaleSpire_Data\Managed\Bouncyrock.TaleSpire.BounceTools.Runtime.dll</HintPath>
</Reference>
<Reference Include="Bouncyrock.TaleSpire.Runtime">
<HintPath>..\Libs\Bouncyrock.TaleSpire.Runtime.dll</HintPath>
<Reference Include="Bouncyrock.TaleSpire.Runtime, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>E:\Steam 2\steamapps\common\TaleSpire\TaleSpire_Data\Managed\Bouncyrock.TaleSpire.Runtime.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -59,6 +59,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="SetInjectionFlag.cs" />
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Expand Down
9 changes: 5 additions & 4 deletions Mods/CameraToolsPlugin/CameraToolsPlugin/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ private void toggleOrthographicCamera()
{

var cam = CameraController.Instance;
cam.GetType().GetField("_minTilt", flags)?.SetValue(cam, 0.0f);
cam.GetType().GetField("_maxTilt", flags)?.SetValue(cam, 120.0f);
cam.GetType().GetField("_minTilt", flags)?.SetValue(cam, 90.0f);
cam.GetType().GetField("_maxTilt", flags)?.SetValue(cam, 90.0f);
//cam.GetType().GetField("_maxFov", flags).SetValue(cam, 120.0f);
this._orthEnabled = true;
}
Expand Down Expand Up @@ -145,16 +145,17 @@ void Update()
{
toggleOrthographicCamera();
}
if(Input.GetKeyUp(KeyCode.Tab))

if(_orthEnabled)
{
if (Input.GetAxis("Mouse ScrollWheel") > 0)
{
Camera.main.orthographicSize -= .25f;
Camera.main.orthographicSize -= 1f;
}
else if (Input.GetAxis("Mouse ScrollWheel") < 0)
{
Camera.main.orthographicSize += .25f;
Camera.main.orthographicSize += 1f;

}
}
Expand Down
16 changes: 16 additions & 0 deletions Mods/CameraToolsPlugin/CameraToolsPlugin/SetInjectionFlag.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using BepInEx;
using UnityEngine;

namespace CameraToolsPlugin
{
[BepInPlugin("org.generic.plugins.setInjectionFlag", "Set Injection Flag Plugin", "1.0.0.0")]
[BepInProcess("TaleSpire.exe")]
class SetInjectionFlag : BaseUnityPlugin
{
void Awake()
{
UnityEngine.Debug.Log("SetInjectionFlag Plug-in loaded");
AppStateManager.UsingCodeInjection = true;
}
}
}
64 changes: 64 additions & 0 deletions Mods/DontAnnoyBaggers/DontAnnoyBaggers.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F786C502-ADC7-4C7E-A0FF-059C798C454D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DontAnnoyBaggers</RootNamespace>
<AssemblyName>DontAnnoyBaggers</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="BepInEx">
<HintPath>..\..\Libs\BepInEx.dll</HintPath>
</Reference>
<Reference Include="Bouncyrock.TaleSpire.Runtime">
<HintPath>E:\Steam 2\steamapps\common\TaleSpire\TaleSpire_Data\Managed\Bouncyrock.TaleSpire.Runtime.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>..\..\Libs\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>E:\Steam 2\steamapps\common\TaleSpire\TaleSpire_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.InputLegacyModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>E:\Steam 2\steamapps\common\TaleSpire\TaleSpire_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
16 changes: 16 additions & 0 deletions Mods/DontAnnoyBaggers/Plugin.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using BepInEx;
using UnityEngine;

namespace DontAnnoyBaggers
{
[BepInPlugin("org.generic.plugins.setInjectionFlag", "Set Injection Flag Plugin", "1.0.0.0")]
[BepInProcess("TaleSpire.exe")]
class SetInjectionFlag : BaseUnityPlugin
{
void Awake()
{
UnityEngine.Debug.Log("SetInjectionFlag Plug-in loaded");
AppStateManager.UsingCodeInjection = true;
}
}
}
36 changes: 36 additions & 0 deletions Mods/DontAnnoyBaggers/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DontAnnoyBaggers")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DontAnnoyBaggers")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f786c502-adc7-4c7e-a0ff-059c798c454d")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
30 changes: 30 additions & 0 deletions Mods/ToggleCharacterNames/Plugin.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using BepInEx;
using UnityEngine;

namespace ToggleCharacterNames
{
[BepInPlugin("org.mercer.plugins.ToggleCharacterNames", "Toggle Character Names", "1.0.0")]
[BepInProcess("TaleSpire.exe")]
public class Plugin : BaseUnityPlugin
{
private bool _enabled = false;
void Awake()
{
Debug.Log("Starting Toggle Characters Plugin");
}

private void ToggleTextLayer()
{
ToolIndicatorUI.TextLayerEnabled = !_enabled;
this._enabled = !_enabled;
}

void Update()
{
if (Input.GetKeyUp(KeyCode.F7))
{
ToggleTextLayer();
}
}
}
}
36 changes: 36 additions & 0 deletions Mods/ToggleCharacterNames/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ToggleCharacterNames")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ToggleCharacterNames")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0fa94683-146e-4eac-95a3-ccaf9933065d")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
16 changes: 16 additions & 0 deletions Mods/ToggleCharacterNames/SetInjectionFlag.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using BepInEx;
using UnityEngine;

namespace CameraToolsPlugin
{
[BepInPlugin("org.generic.plugins.setInjectionFlag", "Set Injection Flag Plugin", "1.0.0.0")]
[BepInProcess("TaleSpire.exe")]
class SetInjectionFlag : BaseUnityPlugin
{
void Awake()
{
UnityEngine.Debug.Log("SetInjectionFlag Plug-in loaded");
AppStateManager.UsingCodeInjection = true;
}
}
}
68 changes: 68 additions & 0 deletions Mods/ToggleCharacterNames/ToggleCharacterNames.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0FA94683-146E-4EAC-95A3-CCAF9933065D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ToggleCharacterNames</RootNamespace>
<AssemblyName>ToggleCharacterNames</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="BepInEx">
<HintPath>..\..\Libs\BepInEx.dll</HintPath>
</Reference>
<Reference Include="Bouncyrock.BouncePackage.Runtime">
<HintPath>E:\Steam 2\steamapps\common\TaleSpire\TaleSpire_Data\Managed\Bouncyrock.BouncePackage.Runtime.dll</HintPath>
</Reference>
<Reference Include="Bouncyrock.TaleSpire.BounceTools.Runtime">
<HintPath>E:\Steam 2\steamapps\common\TaleSpire\TaleSpire_Data\Managed\Bouncyrock.TaleSpire.BounceTools.Runtime.dll</HintPath>
</Reference>
<Reference Include="Bouncyrock.TaleSpire.Runtime">
<HintPath>E:\Steam 2\steamapps\common\TaleSpire\TaleSpire_Data\Managed\Bouncyrock.TaleSpire.Runtime.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Reference Include="UnityEngine.CoreModule">
<HintPath>E:\Steam 2\steamapps\common\TaleSpire\TaleSpire_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.InputLegacyModule">
<HintPath>E:\Steam 2\steamapps\common\TaleSpire\TaleSpire_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SetInjectionFlag.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
37 changes: 37 additions & 0 deletions TalespireModding.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29411.108
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CameraToolsPlugin", "Mods\CameraToolsPlugin\CameraToolsPlugin\CameraToolsPlugin.csproj", "{461CF153-4423-4BC2-B10D-0DB24D5B6E1D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DontAnnoyBaggers", "Mods\DontAnnoyBaggers\DontAnnoyBaggers.csproj", "{F786C502-ADC7-4C7E-A0FF-059C798C454D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToggleCharacterNames", "Mods\ToggleCharacterNames\ToggleCharacterNames.csproj", "{0FA94683-146E-4EAC-95A3-CCAF9933065D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{461CF153-4423-4BC2-B10D-0DB24D5B6E1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{461CF153-4423-4BC2-B10D-0DB24D5B6E1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{461CF153-4423-4BC2-B10D-0DB24D5B6E1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{461CF153-4423-4BC2-B10D-0DB24D5B6E1D}.Release|Any CPU.Build.0 = Release|Any CPU
{F786C502-ADC7-4C7E-A0FF-059C798C454D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F786C502-ADC7-4C7E-A0FF-059C798C454D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F786C502-ADC7-4C7E-A0FF-059C798C454D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F786C502-ADC7-4C7E-A0FF-059C798C454D}.Release|Any CPU.Build.0 = Release|Any CPU
{0FA94683-146E-4EAC-95A3-CCAF9933065D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0FA94683-146E-4EAC-95A3-CCAF9933065D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0FA94683-146E-4EAC-95A3-CCAF9933065D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0FA94683-146E-4EAC-95A3-CCAF9933065D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A3AB9696-650E-45D3-9F7D-50426F74D917}
EndGlobalSection
EndGlobal

0 comments on commit 38fdd25

Please sign in to comment.