mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
43c0a59829
4 files changed
+15
-18
No files matched your search
@@ -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
@@ -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());
|
||||
|
||||
@@ -123,7 +123,7 @@ public static class OptionsMenuBehaviourStartPatch
|
||||
{
|
||||
MainMenuManagerPatch.ShowRightPanelImmediately();
|
||||
|
||||
Harmony.UnpatchAll();
|
||||
Main.Instance.Harmony.UnpatchSelf();
|
||||
Main.Instance.Unload();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ internal static class SwitchGameModePatch
|
||||
}
|
||||
|
||||
Zoom.SetZoomSize(reset: true);
|
||||
Harmony.UnpatchAll();
|
||||
Main.Instance.Harmony.UnpatchSelf();
|
||||
Main.Instance.Unload();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user