-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
80cc3e3
commit ddb5c4f
Showing
13 changed files
with
285 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using BepInEx; | ||
|
||
namespace CheatTools | ||
{ | ||
public partial class CheatToolsPlugin : BaseUnityPlugin | ||
{ | ||
private void Awake() | ||
{ | ||
CheatToolsWindowInit.InitializeCheats(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using RuntimeUnityEditor.Core.Inspector; | ||
using RuntimeUnityEditor.Core.Inspector.Entries; | ||
using RuntimeUnityEditor.Core.Utils; | ||
using sv08; | ||
using UnityEngine; | ||
|
||
namespace CheatTools | ||
{ | ||
public static class CheatToolsWindowInit | ||
{ | ||
private static KeyValuePair<object, string>[] _openInInspectorButtons; | ||
|
||
public static void InitializeCheats() | ||
{ | ||
CheatToolsWindow.OnShown += _ => | ||
{ | ||
_openInInspectorButtons = new[] | ||
{ | ||
//new KeyValuePair<object, string>(_gameMgr != null && _gameMgr.HeroineList.Count > 0 ? (Func<object>)(() => _gameMgr.HeroineList.Select(x => new ReadonlyCacheEntry(x.ChaName, x))) : null, "Heroine //list"), | ||
//new KeyValuePair<object, string>(_gameMgr, "Manager.Game.Instance"), | ||
//new KeyValuePair<object, string>(_sceneInstance, "Manager.Scene.Instance"), | ||
//new KeyValuePair<object, string>(_communicationInstance, "Manager.Communication.Instance"), | ||
//new KeyValuePair<object, string>(_soundInstance, "Manager.Sound.Instance"), | ||
//new KeyValuePair<object, string>(_hFlag, "HFlag"), | ||
//new KeyValuePair<object, string>(_talkScene, "TalkScene"), | ||
//new KeyValuePair<object, string>(_studioInstance, "Studio.Instance"), | ||
new KeyValuePair<object, string>((Func<object>)(() => Game.Instance) , "Game.Instance"), | ||
new KeyValuePair<object, string>((Func<object>)EditorUtilities.GetRootGoScanner, "Root Objects") | ||
}; | ||
}; | ||
|
||
CheatToolsWindow.Cheats.Add(new CheatEntry(w => Game.Instance?.PlayerStatus != null, DrawPlayerUnlocks, null)); | ||
CheatToolsWindow.Cheats.Add(new CheatEntry(w => Game.Instance?.GameStatus != null, DrawGlobalUnlocks, null)); | ||
|
||
CheatToolsWindow.Cheats.Add(CheatEntry.CreateOpenInInspectorButtons(() => _openInInspectorButtons)); | ||
|
||
} | ||
|
||
private static void DrawPlayerUnlocks(CheatToolsWindow window) | ||
{ | ||
GUILayout.Label("Player unlocks (current playthrough)"); | ||
|
||
var playerStatus = Game.Instance.PlayerStatus; | ||
|
||
GUILayout.BeginHorizontal(); | ||
{ | ||
GUILayout.Label("Sakurako Favor: " + playerStatus.favor_Sakurako, GUILayout.Width(120)); | ||
playerStatus.favor_Sakurako = (int)GUILayout.HorizontalSlider(playerStatus.favor_Sakurako, 0, 100); | ||
} | ||
GUILayout.EndHorizontal(); | ||
|
||
GUILayout.BeginHorizontal(); | ||
{ | ||
GUILayout.Label("Umeko Favor: " + playerStatus.favor_Umeko, GUILayout.Width(120)); | ||
playerStatus.favor_Sakurako = (int)GUILayout.HorizontalSlider(playerStatus.favor_Sakurako, 0, 100); | ||
} | ||
GUILayout.EndHorizontal(); | ||
|
||
if (GUILayout.Button("Open advanced options")) | ||
{ | ||
Inspector.Instance.Push(new InstanceStackEntry(playerStatus, "PlayerStatus"), true); | ||
} | ||
} | ||
|
||
private static void DrawGlobalUnlocks(CheatToolsWindow window) | ||
{ | ||
GUILayout.Label("Global unlocks (might need a game restart, permanent)"); | ||
|
||
var gameStatus = Game.Instance.GameStatus; | ||
|
||
if (GUILayout.Button("Unlock all chapters")) | ||
{ | ||
var chapterClear = gameStatus.Chapter_Clear; | ||
for (int i = 0; i < chapterClear.Length; i++) | ||
chapterClear[i] = true; | ||
} | ||
|
||
if (GUILayout.Button("Unlock all clothes")) | ||
{ | ||
var partsUnlock = gameStatus.Parts_Unlock; | ||
var partsNew = gameStatus.Parts_New; | ||
for (int i = 0; i < partsUnlock.Length; i++) | ||
{ | ||
partsNew[i] = !partsUnlock[i]; | ||
partsUnlock[i] = true; | ||
} | ||
} | ||
if (GUILayout.Button("Mark all endings and games as seen")) | ||
{ | ||
void EnsureNonzeroCount(List<int> list) | ||
{ | ||
for (int i = 0; i < list.Count; i++) | ||
{ | ||
if (list[i] == 0) | ||
list[i] = 1; | ||
} | ||
} | ||
EnsureNonzeroCount(gameStatus.listEndingCount); | ||
EnsureNonzeroCount(gameStatus.listMiniGamePlayCount); | ||
EnsureNonzeroCount(gameStatus.listMiniGameClearCount); | ||
|
||
gameStatus.SetSystemFlag(ID_SFlag.SFlag_End, true); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
<?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>{4E9BC084-8CEB-4531-A4BA-2013B0CEFBA0}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>CheatTools</RootNamespace> | ||
<AssemblyName>KKLB_CheatTools</AssemblyName> | ||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
<NuGetPackageImportStamp> | ||
</NuGetPackageImportStamp> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>embedded</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>..\bin\</OutputPath> | ||
<DefineConstants>TRACE;DEBUG;KKLB</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>embedded</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>..\bin\</OutputPath> | ||
<DefineConstants>TRACE;KKLB</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<DebugSymbols>true</DebugSymbols> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="0Harmony, Version=2.9.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\IllusionLibs.BepInEx.Harmony.2.9.0\lib\net35\0Harmony.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\IllusionLibs.KoiKoiLB.Assembly-CSharp.2023.5.27.1\lib\net45\Assembly-CSharp.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="BepInEx, Version=5.4.20.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\IllusionLibs.BepInEx.5.4.20\lib\net35\BepInEx.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\IllusionLibs.KoiKoiLB.Assembly-CSharp.2023.5.27.1\lib\net45\netstandard.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="RuntimeUnityEditor.Core, Version=4.2.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\RuntimeUnityEditor.Core.4.2.0\lib\net35\RuntimeUnityEditor.Core.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Sirenix.Serialization, Version=2.1.13.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.CoreModule.2019.4.9\lib\net46\Sirenix.Serialization.dll</HintPath> | ||
<Private>False</Private> | ||
</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, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.CoreModule.2019.4.9\lib\net46\UnityEngine.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.CoreModule.2019.4.9\lib\net46\UnityEngine.CoreModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.IMGUIModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.IMGUIModule.2019.4.9\lib\net46\UnityEngine.IMGUIModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.InputLegacyModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.InputLegacyModule.2019.4.9\lib\net46\UnityEngine.InputLegacyModule.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.UI.2019.4.9\lib\net46\UnityEngine.UI.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="CheatToolsPlugin.cs" /> | ||
<Compile Include="CheatToolsWindow.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<ItemGroup /> | ||
<Import Project="..\Shared\Shared.projitems" Label="Shared" /> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<Import Project="..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.CoreModule.2019.4.9\build\IllusionLibs.KoikatsuSunshine.UnityEngine.CoreModule.targets" Condition="Exists('..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.CoreModule.2019.4.9\build\IllusionLibs.KoikatsuSunshine.UnityEngine.CoreModule.targets')" /> | ||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||
<PropertyGroup> | ||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | ||
</PropertyGroup> | ||
<Error Condition="!Exists('..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.CoreModule.2019.4.9\build\IllusionLibs.KoikatsuSunshine.UnityEngine.CoreModule.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.CoreModule.2019.4.9\build\IllusionLibs.KoikatsuSunshine.UnityEngine.CoreModule.targets'))" /> | ||
<Error Condition="!Exists('..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.IMGUIModule.2019.4.9\build\IllusionLibs.KoikatsuSunshine.UnityEngine.IMGUIModule.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.IMGUIModule.2019.4.9\build\IllusionLibs.KoikatsuSunshine.UnityEngine.IMGUIModule.targets'))" /> | ||
<Error Condition="!Exists('..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.InputLegacyModule.2019.4.9\build\IllusionLibs.KoikatsuSunshine.UnityEngine.InputLegacyModule.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.InputLegacyModule.2019.4.9\build\IllusionLibs.KoikatsuSunshine.UnityEngine.InputLegacyModule.targets'))" /> | ||
<Error Condition="!Exists('..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.UI.2019.4.9\build\IllusionLibs.KoikatsuSunshine.UnityEngine.UI.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.UI.2019.4.9\build\IllusionLibs.KoikatsuSunshine.UnityEngine.UI.targets'))" /> | ||
<Error Condition="!Exists('..\packages\IllusionLibs.BepInEx.Harmony.2.9.0\build\IllusionLibs.BepInEx.Harmony.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\IllusionLibs.BepInEx.Harmony.2.9.0\build\IllusionLibs.BepInEx.Harmony.targets'))" /> | ||
<Error Condition="!Exists('..\packages\IllusionLibs.KoiKoiLB.Assembly-CSharp.2023.5.27.1\build\IllusionLibs.KoiKoiLB.Assembly-CSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\IllusionLibs.KoiKoiLB.Assembly-CSharp.2023.5.27.1\build\IllusionLibs.KoiKoiLB.Assembly-CSharp.targets'))" /> | ||
</Target> | ||
<Import Project="..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.IMGUIModule.2019.4.9\build\IllusionLibs.KoikatsuSunshine.UnityEngine.IMGUIModule.targets" Condition="Exists('..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.IMGUIModule.2019.4.9\build\IllusionLibs.KoikatsuSunshine.UnityEngine.IMGUIModule.targets')" /> | ||
<Import Project="..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.InputLegacyModule.2019.4.9\build\IllusionLibs.KoikatsuSunshine.UnityEngine.InputLegacyModule.targets" Condition="Exists('..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.InputLegacyModule.2019.4.9\build\IllusionLibs.KoikatsuSunshine.UnityEngine.InputLegacyModule.targets')" /> | ||
<Import Project="..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.UI.2019.4.9\build\IllusionLibs.KoikatsuSunshine.UnityEngine.UI.targets" Condition="Exists('..\packages\IllusionLibs.KoikatsuSunshine.UnityEngine.UI.2019.4.9\build\IllusionLibs.KoikatsuSunshine.UnityEngine.UI.targets')" /> | ||
<Import Project="..\packages\IllusionLibs.BepInEx.Harmony.2.9.0\build\IllusionLibs.BepInEx.Harmony.targets" Condition="Exists('..\packages\IllusionLibs.BepInEx.Harmony.2.9.0\build\IllusionLibs.BepInEx.Harmony.targets')" /> | ||
<Import Project="..\packages\IllusionLibs.KoiKoiLB.Assembly-CSharp.2023.5.27.1\build\IllusionLibs.KoiKoiLB.Assembly-CSharp.targets" Condition="Exists('..\packages\IllusionLibs.KoiKoiLB.Assembly-CSharp.2023.5.27.1\build\IllusionLibs.KoiKoiLB.Assembly-CSharp.targets')" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
using System.Reflection; | ||
|
||
[assembly: AssemblyTitle("KKLB_CheatTools")] | ||
[assembly: AssemblyProduct("KKLB_CheatTools")] |
Oops, something went wrong.