mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
[ScriptingSpoofer] Update for Exp2
This commit is contained in:
parent
ee7d7f2bee
commit
0845027b56
4 changed files with 52 additions and 23 deletions
|
@ -76,6 +76,14 @@
|
|||
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Cohtml.Runtime.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="com.dogu.gamium.engine.unity.runtime">
|
||||
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\com.dogu.gamium.engine.unity.runtime.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="com.dogu.gamium.engine.unity.runtime.protocol">
|
||||
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\com.dogu.gamium.engine.unity.runtime.protocol.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Crc32.NET">
|
||||
<HintPath>$(MsBuildThisFileDirectory)\.ManagedLibs\Crc32.NET.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
|
|
|
@ -11,14 +11,14 @@ namespace NAK.ScriptingSpoofer;
|
|||
|
||||
public class ScriptingSpoofer : MelonMod
|
||||
{
|
||||
public static readonly MelonPreferences_Category Category =
|
||||
private static readonly MelonPreferences_Category Category =
|
||||
MelonPreferences.CreateCategory(nameof(ScriptingSpoofer));
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
|
||||
Category.CreateEntry("Enabled", true, description: "Toggle scripting spoofer.");
|
||||
private static readonly MelonPreferences_Entry<bool> EntryEnabled =
|
||||
Category.CreateEntry("mod_enabled", true, "Enabled", description: "Toggle scripting spoofer.");
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryCensorUsername =
|
||||
Category.CreateEntry("Censor Username", true, description: "Censor username. Toggle to randomize username instead.");
|
||||
private static readonly MelonPreferences_Entry<bool> EntryCensorUsername =
|
||||
Category.CreateEntry("censor_username", true, "Censor Username", description: "Censor username. Toggle to randomize username instead.");
|
||||
|
||||
private static string spoofedUsername;
|
||||
private static string spoofedUserId;
|
||||
|
@ -83,9 +83,9 @@ 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(LocalPlayerAPI), nameof(LocalPlayerAPI.Username), MethodType.Getter)]
|
||||
[HarmonyPatch(typeof(PlayerAPIBase), nameof(PlayerAPIBase.Username), MethodType.Getter)]
|
||||
private static bool GetSpoofedUsername(ref PlayerAPIBase __instance, ref string __result)
|
||||
{
|
||||
if (__instance.IsRemote) return true;
|
||||
if (!EntryEnabled.Value) return true;
|
||||
|
@ -95,9 +95,9 @@ 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(LocalPlayerAPI), nameof(LocalPlayerAPI.UserID), MethodType.Getter)]
|
||||
[HarmonyPatch(typeof(PlayerAPIBase), nameof(PlayerAPIBase.UserID), MethodType.Getter)]
|
||||
private static bool GetSpoofedUserId(ref PlayerAPIBase __instance, ref string __result)
|
||||
{
|
||||
if (__instance.IsRemote) return true;
|
||||
if (!EntryEnabled.Value) return true;
|
||||
|
|
21
ScriptingSpoofer/README.md
Normal file
21
ScriptingSpoofer/README.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# ScriptingSpoofer
|
||||
|
||||
Prevents **local** scripts from accessing your Username or UserID by spoofing them with random values each session.
|
||||
|
||||
This mod is made to prevent malicious scripts executing on your local client from accessing your Username or UserID to target you with. **This mod can not prevent scripts executing on remote clients from accessing your Username or UserID.**
|
||||
|
||||
Example: Prevents a **blacklist** script from targeting you. **Whitelist** scripts are not affected by this mod, only **blacklists**, as the spoofed info is not exposed for customization.
|
||||
|
||||
## Mod Settings
|
||||
- **Censor Username**: Censors existing username by replacing and appending random characters to it. Disable to generate a completely random username.
|
||||
|
||||
---
|
||||
|
||||
Here is the block of text where I tell you this mod is not affiliated with or endorsed by ABI.
|
||||
https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games
|
||||
|
||||
> This mod is an independent creation not affiliated with, supported by, or approved by Alpha Blend Interactive.
|
||||
|
||||
> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use.
|
||||
|
||||
> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive.
|
|
@ -1,23 +1,23 @@
|
|||
{
|
||||
"_id": 147,
|
||||
"name": "PropUndoButton",
|
||||
"modversion": "1.0.2",
|
||||
"gameversion": "2024r175",
|
||||
"_id": -1,
|
||||
"name": "ScriptingSpoofer",
|
||||
"modversion": "1.0.0",
|
||||
"gameversion": "2024r176",
|
||||
"loaderversion": "0.6.1",
|
||||
"modtype": "Mod",
|
||||
"author": "NotAKidoS",
|
||||
"description": "**CTRL+Z** to undo latest spawned prop. **CTRL+SHIFT+Z** to redo deleted prop.\nIncludes optional SFX for prop spawn, undo, redo, warn, and deny, which can be disabled in settings.\n\nYou can replace the sfx in 'ChilloutVR\\ChilloutVR_Data\\StreamingAssets\\Cohtml\\UIResources\\GameUI\\mods\\PropUndo\\audio'.",
|
||||
"description": "Prevents **local** scripts from accessing your Username or UserID by spoofing them with random values each session.",
|
||||
"searchtags": [
|
||||
"prop",
|
||||
"undo",
|
||||
"bind",
|
||||
"button"
|
||||
"spoof",
|
||||
"username",
|
||||
"whitelist",
|
||||
"blacklist"
|
||||
],
|
||||
"requirements": [
|
||||
"None"
|
||||
],
|
||||
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r25/PropUndoButton.dll",
|
||||
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/PropUndoButton/",
|
||||
"changelog": "- Recompiled for 2024r175",
|
||||
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r25/ScriptingSpoofer.dll",
|
||||
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/ScriptingSpoofer/",
|
||||
"changelog": "- Initial Release",
|
||||
"embedcolor": "#00FFFF"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue