mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
ScriptingSpoofer: fixes for latest scripting builds
This commit is contained in:
parent
6ebc55ee16
commit
d409bf1743
3 changed files with 10 additions and 10 deletions
|
@ -83,9 +83,8 @@ public class ScriptingSpoofer : MelonMod
|
|||
private static class PlayerApiPatches
|
||||
{
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(LocalPlayerAPI), nameof(LocalPlayerAPI.Username), MethodType.Getter)]
|
||||
[HarmonyPatch(typeof(PlayerAPIBase), nameof(PlayerAPIBase.Username), MethodType.Getter)]
|
||||
private static bool GetSpoofedUsername(ref PlayerAPIBase __instance, ref string __result)
|
||||
[HarmonyPatch(typeof(Player), nameof(Player.Username), MethodType.Getter)]
|
||||
private static bool GetSpoofedUsername(ref Player __instance, ref string __result)
|
||||
{
|
||||
if (__instance.IsRemote) return true;
|
||||
if (!EntryEnabled.Value) return true;
|
||||
|
@ -95,9 +94,8 @@ public class ScriptingSpoofer : MelonMod
|
|||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(LocalPlayerAPI), nameof(LocalPlayerAPI.UserID), MethodType.Getter)]
|
||||
[HarmonyPatch(typeof(PlayerAPIBase), nameof(PlayerAPIBase.UserID), MethodType.Getter)]
|
||||
private static bool GetSpoofedUserId(ref PlayerAPIBase __instance, ref string __result)
|
||||
[HarmonyPatch(typeof(Player), nameof(Player.UserID), MethodType.Getter)]
|
||||
private static bool GetSpoofedUserId(ref Player __instance, ref string __result)
|
||||
{
|
||||
if (__instance.IsRemote) return true;
|
||||
if (!EntryEnabled.Value) return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue