Skip to content

Commit

Permalink
更新至BepInEx-Unity.IL2CPP适用于0.92版
Browse files Browse the repository at this point in the history
  • Loading branch information
Gunly committed Dec 31, 2024
1 parent 9b19c4b commit 17ba97c
Show file tree
Hide file tree
Showing 40 changed files with 1,043 additions and 1,247 deletions.
1 change: 0 additions & 1 deletion LiarsBarEnhance.sln
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Global
{318103A4-CDD7-4B11-A778-F8FEDE387761}.Release|Any CPU.ActiveCfg = Release|Any CPU
{318103A4-CDD7-4B11-A778-F8FEDE387761}.Release|Any CPU.Build.0 = Release|Any CPU
{5E6C1EC1-1F53-4DD4-B173-FBE57868B686}.CheatRelease|Any CPU.ActiveCfg = Release|Any CPU
{5E6C1EC1-1F53-4DD4-B173-FBE57868B686}.CheatRelease|Any CPU.Build.0 = Release|Any CPU
{5E6C1EC1-1F53-4DD4-B173-FBE57868B686}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E6C1EC1-1F53-4DD4-B173-FBE57868B686}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E6C1EC1-1F53-4DD4-B173-FBE57868B686}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
11 changes: 0 additions & 11 deletions LiarsBarEnhance.slnLaunch

This file was deleted.

557 changes: 0 additions & 557 deletions LiarsBarEnhance/Components/FPController.cs

This file was deleted.

57 changes: 0 additions & 57 deletions LiarsBarEnhance/Components/SelectableLevelController.cs

This file was deleted.

29 changes: 14 additions & 15 deletions LiarsBarEnhance/Features/AnimationPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using HarmonyLib;

using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand All @@ -25,12 +24,12 @@ public class AnimationPatch

[HarmonyPatch(typeof(CharController), nameof(CharController.Update))]
[HarmonyPostfix]
public static void UpdatePostfix(CharController __instance, Manager ___manager, PlayerStats ___playerStats)
public static void UpdatePostfix(CharController __instance)
{
if (!__instance.isOwned) return;
if (___manager.PluginControl())
if (__instance.manager.PluginControl())
{
if (!___playerStats.HaveTurn)
if (!__instance.playerStats.HaveTurn)
{
if (Input.GetKeyDown(KeyCode.Space)) __instance.animator.SetBool("Look", true);
if (Input.GetKeyUp(KeyCode.Space)) __instance.animator.SetBool("Look", false);
Expand All @@ -52,9 +51,9 @@ public static void UpdatePostfix(CharController __instance, Manager ___manager,
(Plugin.RouletAnimType.Value == RouletType.Roulet && blorfGame.Networkcurrentrevoler == blorfGame.Networkrevolverbulllet))
{
__instance.animator.SetBool("Dead", true);
blorfGame.StartCoroutine((IEnumerator)AccessTools.Method("BlorfGamePlay:waitforheadopen").Invoke(blorfGame, []));
AccessTools.Method("BlorfGamePlay:CommandBeDead").Invoke(blorfGame, []);
blorfGame.StartCoroutine((IEnumerator)AccessTools.Method("BlorfGamePlay:WaitforRevolverUI").Invoke(blorfGame, []));
blorfGame.StartCoroutine("waitforheadopen");
blorfGame.CommandBeDead();
blorfGame.StartCoroutine("WaitforRevolverUI");
}
#endif
__instance.animator.SetBool("Roulet", false);
Expand All @@ -72,15 +71,15 @@ public static void UpdatePostfix(CharController __instance, Manager ___manager,
if (Plugin.KeyAnimDrink.IsUp())
{
#if CHEATRELEASE
if (Plugin.RouletAnimType.Value == RouletType.Roulet && ___playerStats.NetworkHealth == 2)
if (Plugin.RouletAnimType.Value == RouletType.Roulet && __instance.playerStats.NetworkHealth == 2)
{
___playerStats.NetworkHealth = 1;
__instance.playerStats.NetworkHealth = 1;
}
else if (Plugin.RouletAnimType.Value == RouletType.Suicide ||
(Plugin.RouletAnimType.Value == RouletType.Roulet && ___playerStats.NetworkHealth == 1))
(Plugin.RouletAnimType.Value == RouletType.Roulet && __instance.playerStats.NetworkHealth == 1))
{
___playerStats.NetworkHealth = 0;
___playerStats.NetworkDead = true;
__instance.playerStats.NetworkHealth = 0;
__instance.playerStats.NetworkDead = true;
}
#endif
__instance.animator.SetBool("Drink", false);
Expand All @@ -102,9 +101,9 @@ public static void UpdatePostfix(CharController __instance, Manager ___manager,
(Plugin.RouletAnimType.Value == RouletType.Roulet && chaosGame.Networkcurrentrevoler == chaosGame.Networkrevolverbulllet))
{
__instance.animator.SetBool("Dead", true);
chaosGame.StartCoroutine((IEnumerator)AccessTools.Method("BlorfGamePlay:waitforheadopen").Invoke(chaosGame, []));
AccessTools.Method("BlorfGamePlay:CommandBeDead").Invoke(chaosGame, []);
chaosGame.StartCoroutine((IEnumerator)AccessTools.Method("BlorfGamePlay:WaitforRevolverUI").Invoke(chaosGame, []));
chaosGame.StartCoroutine("waitforheadopen");
chaosGame.CommandBeDead();
chaosGame.StartCoroutine("WaitforRevolverUI");
}
#endif
__instance.animator.SetBool("Roulet", false);
Expand Down
10 changes: 5 additions & 5 deletions LiarsBarEnhance/Features/AutoRotatePatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public static void StartPostfix(CharController __instance)

[HarmonyPatch(typeof(CharController), nameof(CharController.Update))]
[HarmonyPostfix]
public static void UpdatePostfix(CharController __instance, Manager ___manager)
public static void UpdatePostfix(CharController __instance)
{
if (!__instance.isOwned) return;
if (Plugin.KeyRotateAuto.IsDown() && ___manager.PluginControl()) Rotating = !Rotating;
if (Plugin.KeyRotateAuto.IsDown() && __instance.manager.PluginControl()) Rotating = !Rotating;
if (!Rotating) return;
var rotateSpeed = Plugin.FloatAutoRotateSpeed.Value * 6;
if ((Plugin.DirectionRotateState.Value & RotateDirection.Pitch) != RotateDirection.None)
Expand All @@ -31,10 +31,10 @@ public static void UpdatePostfix(CharController __instance, Manager ___manager)
if ((Plugin.DirectionRotateState.Value & RotateDirection.Yaw) != RotateDirection.None)
__instance.transform.Rotate(rotateSpeed * Vector3.up, Space.Self);
if ((Plugin.DirectionRotateState.Value & RotateDirection.HeadYaw) != RotateDirection.None)
__instance.AddYaw(rotateSpeed);
__instance._cinemachineTargetYaw += rotateSpeed;
if ((Plugin.DirectionRotateState.Value & RotateDirection.HeadPitch) != RotateDirection.None)
__instance.AddPitch(rotateSpeed);
__instance._cinemachineTargetPitch += rotateSpeed;
if ((Plugin.DirectionRotateState.Value & RotateDirection.HeadRoll) != RotateDirection.None)
CrazyShakeHeadPatch.CinemachineTargetRoll += rotateSpeed;
RemoveHeadRotationlimitPatch.CinemachineTargetRoll += rotateSpeed;
}
}
1 change: 0 additions & 1 deletion LiarsBarEnhance/Features/BigMouthPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public static void UpdatePostfix(FaceAnimator __instance)
if (mouthOpen > 0f || Plugin.KeyCustomBigMouth.IsPressed())
{
if (mouthOpen > 0f) mouthOpen -= Time.deltaTime;
//var pos = __instance.Mouth.transform.localPosition;
__instance.Mouth.transform.localEulerAngles = new Vector3(0f, 0f, -Plugin.FloatBigMouthAngle.Value);
}
}
Expand Down
120 changes: 0 additions & 120 deletions LiarsBarEnhance/Features/BlorfAntiCheat.cs

This file was deleted.

8 changes: 4 additions & 4 deletions LiarsBarEnhance/Features/BlorfCheatPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public class BlorfCheatPatch
{
private static readonly Dictionary<Card, bool> cardFliped = [];

[HarmonyPatch(typeof(BlorfGamePlay), "UpdateCall")]
[HarmonyPatch(typeof(BlorfGamePlay), nameof(BlorfGamePlay.UpdateCall))]
[HarmonyPostfix]
public static void UpdateCallPostfix(BlorfGamePlay __instance, Manager ___manager)
public static void UpdateCallPostfix(BlorfGamePlay __instance)
{
if (!Plugin.BooleanCheatDeck.Value) return;
if (__instance.isOwned)
Expand All @@ -23,7 +23,7 @@ public static void UpdateCallPostfix(BlorfGamePlay __instance, Manager ___manage
{
var cardObject = __instance.Cards[i];
if (!cardObject.gameObject.activeSelf) continue;
if (Plugin.KeyCheatChangeCardDice[i].IsDown() && ___manager.PluginControl())
if (Plugin.KeyCheatChangeCardDice[i].IsDown() && __instance.manager.PluginControl())
{
var card = cardObject.GetComponent<Card>();
if (card.Devil)
Expand Down Expand Up @@ -73,7 +73,7 @@ public static void UpdateCallPostfix(BlorfGamePlay __instance, Manager ___manage
{
card.GetComponent<MeshRenderer>().material = card.normal;
}
if (___manager.PluginControl())
if (__instance.manager.PluginControl())
{
if (Plugin.KeyCheatBlorfFlip.IsPressed())
{
Expand Down
8 changes: 4 additions & 4 deletions LiarsBarEnhance/Features/ChaosCheatPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public class ChaosCheatPatch
{
private static readonly Dictionary<Card, bool> cardFliped = [];

[HarmonyPatch(typeof(ChaosGamePlay), "UpdateCall")]
[HarmonyPatch(typeof(ChaosGamePlay), nameof(ChaosGamePlay.UpdateCall))]
[HarmonyPostfix]
public static void UpdateCallPostfix(ChaosGamePlay __instance, Manager ___manager)
public static void UpdateCallPostfix(ChaosGamePlay __instance)
{
if (!Plugin.BooleanCheatDeck.Value) return;
if (__instance.isOwned)
Expand All @@ -23,7 +23,7 @@ public static void UpdateCallPostfix(ChaosGamePlay __instance, Manager ___manage
{
var cardObject = __instance.Cards[i];
if (!cardObject.gameObject.activeSelf) continue;
if (Plugin.KeyCheatChangeCardDice[i].IsDown() && ___manager.PluginControl())
if (Plugin.KeyCheatChangeCardDice[i].IsDown() && __instance.manager.PluginControl())
{
var card = cardObject.GetComponent<Card>();
if (card.cardtype == 4)
Expand Down Expand Up @@ -67,7 +67,7 @@ public static void UpdateCallPostfix(ChaosGamePlay __instance, Manager ___manage
{
card.GetComponent<MeshRenderer>().material = card.normal;
}
if (___manager.PluginControl())
if (__instance.manager.PluginControl())
{
if (Plugin.KeyCheatBlorfFlip.IsPressed())
{
Expand Down
Loading

0 comments on commit 17ba97c

Please sign in to comment.