Merge remote-tracking branch 'origin/main'

This commit is contained in:
Gurge44 committed 2026-02-02 09:20:35 +01:00
commit 43c0a59829
4 files changed
+15 -18

No files matched your search

+1 -1
View File
@@ -177,7 +177,7 @@ public class Main : BasePlugin
private static HashAuth DebugKeyAuth { get; set; }
private static ConfigEntry<string> DebugKeyInput { get; set; }
private Harmony Harmony { get; } = new(PluginGuid);
public Harmony Harmony { get; } = new(PluginGuid);
public static NormalGameOptionsV10 NormalOptions => GameOptionsManager.Instance != null ? GameOptionsManager.Instance.currentNormalGameOptions : null;
+12 -15
View File
@@ -17,6 +17,9 @@ namespace EHR.Modules;
public enum CustomRPC
{
// Vanilla RpcCalls currently (2025.11.18) uses 65
// It is better to leave the remaining RPC numbers as a reserve in case AU adds new RpcCalls
VersionCheck = 102,
RequestRetryVersionCheck,
SyncCustomSettings,
@@ -26,20 +29,19 @@ public enum CustomRPC
SetCustomRole,
SetNameColorData,
SetRealKiller,
ShowChat,
SyncLobbyTimer,
AntiBlackout,
PlayCustomSound = 114,
PlayCustomSound,
SetKillTimer = 114,
/* RED SUS Ranzion 64 RPC = 115 */
SetKillTimer = 116,
SyncAllPlayerNames,
SyncAllPlayerNames = 116,
SyncAllClientRealNames,
SyncNameNotify,
KnCheat = 119,
ShowPopUp,
KillFlash,
SyncAbilityUseLimit,
@@ -181,6 +183,9 @@ public enum CustomRPC
TMGSync,
BedWarsSync,
DeathraceSync
// The total number of RPCs must not exceed 255
// Because HandleRpc accepts Rpc in byte (max 255) system and it will be impossible to use int
}
public enum Sounds
@@ -983,14 +988,6 @@ internal static class RPCHandlerPatch
RPC.SetRealKiller(targetId, killerId);
break;
}
case CustomRPC.ShowChat:
{
uint clientId = reader.ReadPackedUInt32();
bool show = reader.ReadBoolean();
if (AmongUsClient.Instance.ClientId == clientId) HudManager.Instance.Chat.SetVisible(show);
break;
}
case CustomRPC.SyncLobbyTimer:
{
GameStartManagerPatch.TimerStartTS = long.Parse(reader.ReadString());
+1 -1
View File
@@ -123,7 +123,7 @@ public static class OptionsMenuBehaviourStartPatch
{
MainMenuManagerPatch.ShowRightPanelImmediately();
Harmony.UnpatchAll();
Main.Instance.Harmony.UnpatchSelf();
Main.Instance.Unload();
}
}
+1 -1
View File
@@ -33,7 +33,7 @@ internal static class SwitchGameModePatch
}
Zoom.SetZoomSize(reset: true);
Harmony.UnpatchAll();
Main.Instance.Harmony.UnpatchSelf();
Main.Instance.Unload();
}
}