Merge remote-tracking branch 'origin/main'

This commit is contained in:
Gurge44 committed 2026-04-27 19:51:04 +02:00
commit a5697f8692
12 files changed
+469 -567

No files matched your search

+11
View File
@@ -23,6 +23,16 @@ public class ClientControlGUI : MonoBehaviour
/// </summary>
public bool IsOpen;
/// <summary>
/// The screen rect of the open panel or if the panel is closed
/// </summary>
public static Rect PanelRect => Instance != null && Instance.IsOpen ? Instance._windowRect : Rect.zero;
/// <summary>
/// The screen rect of the toggle button
/// </summary>
public static Rect ToggleRect { get; private set; }
/// <summary>
/// Current scroll position inside the panel
/// </summary>
@@ -308,6 +318,7 @@ public class ClientControlGUI : MonoBehaviour
y = Screen.height - size - 10f * Scale;
}
ToggleRect = new Rect(x, y, size, size);
// 90% transparent when in game and panel is closed, full opacity otherwise
bool fadeOut = !IsOpen && (GameStates.IsInGame || GameSettingMenu.Instance);
Color prev = GUI.color;
+2 -2
View File
@@ -32,7 +32,6 @@ internal static class CustomRolesHelper
CustomRoles.NoteKiller,
CustomRoles.Weatherman,
CustomRoles.Amogus,
CustomRoles.Wiper,
CustomRoles.PortalMaker,
CustomRoles.Gardener,
CustomRoles.Farmer,
@@ -153,7 +152,7 @@ internal static class CustomRolesHelper
CustomRoles.DoubleAgent => CustomRoles.Crewmate,
CustomRoles.Inhibitor => CustomRoles.Impostor,
CustomRoles.Occultist => CustomRoles.Impostor,
CustomRoles.Wiper => CustomRoles.Impostor,
CustomRoles.Wiper => UsePets ? CustomRoles.Impostor : CustomRoles.Shapeshifter,
CustomRoles.Forger => CustomRoles.Impostor,
CustomRoles.ClockBlocker => CustomRoles.Impostor,
CustomRoles.Psychopath => CustomRoles.Impostor,
@@ -1112,6 +1111,7 @@ internal static class CustomRolesHelper
or CustomRoles.Hypnotist
or CustomRoles.Librarian
or CustomRoles.Miner
or CustomRoles.Wiper
or CustomRoles.RiftMaker
or CustomRoles.Ninja
or CustomRoles.QuickShooter
+6 -6
View File
@@ -267,7 +267,7 @@ public static class Options
public static OptionItem DisableTaskWin;
public static OptionItem KillFlashDuration;
public static OptionItem EnableKillerLeftCommand;
public static OptionItem EnableGameStateCommand;
public static OptionItem SeeEjectedRolesInMeeting;
public static OptionItem EveryoneSeesDeathReasons;
@@ -789,7 +789,7 @@ public static class Options
public static OptionItem AutoKickStopWords;
public static OptionItem AutoKickStopWordsAsBan;
public static OptionItem AutoKickStopWordsTimes;
public static OptionItem KickAndroidPlayer;
public static OptionItem KickMobilePlayer;
public static OptionItem ApplyDenyNameList;
public static OptionItem KickPlayerFriendCodeNotExist;
public static OptionItem KickLowLevelPlayer;
@@ -1619,7 +1619,7 @@ public static class Options
.SetValueFormat(OptionFormat.Level)
.SetHeader(true);
KickAndroidPlayer = new BooleanOptionItem(19301, "KickAndroidPlayer", false, TabGroup.SystemSettings);
KickMobilePlayer = new BooleanOptionItem(19301, "KickMobilePlayer", false, TabGroup.SystemSettings);
KickPlayerFriendCodeNotExist = new BooleanOptionItem(19302, "KickPlayerFriendCodeNotExist", false, TabGroup.SystemSettings, true);
ApplyDenyNameList = new BooleanOptionItem(19303, "ApplyDenyNameList", true, TabGroup.SystemSettings, true);
ApplyBanList = new BooleanOptionItem(19304, "ApplyBanList", true, TabGroup.SystemSettings, true);
@@ -2891,7 +2891,7 @@ public static class Options
.SetParent(AllAliveMeeting)
.SetValueFormat(OptionFormat.Seconds);
EnableKillerLeftCommand = new BooleanOptionItem(44428, "EnableKillerLeftCommand", true, TabGroup.GameSettings)
EnableGameStateCommand = new BooleanOptionItem(44428, "EnableGameStateCommand", true, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.Standard)
.SetColor(new Color32(147, 241, 240, byte.MaxValue));
@@ -2901,14 +2901,14 @@ public static class Options
{
GameStateSettings[s] = new BooleanOptionItem(44429 + i, $"GameStateCommand.Show{s}", true, TabGroup.GameSettings)
.SetGameMode(CustomGameMode.Standard)
.SetParent(EnableKillerLeftCommand)
.SetParent(EnableGameStateCommand)
.SetColor(new Color32(147, 241, 240, byte.MaxValue));
i++;
}
MinPlayersForGameStateCommand = new IntegerOptionItem(44442, "MinPlayersForGameStateCommand", new(1, 15, 1), 1, TabGroup.GameSettings)
.SetParent(EnableKillerLeftCommand)
.SetParent(EnableGameStateCommand)
.SetGameMode(CustomGameMode.Standard)
.SetValueFormat(OptionFormat.Players)
.SetColor(new Color32(147, 241, 240, byte.MaxValue));
+1 -1
View File
@@ -2552,7 +2552,7 @@ internal static class ChatCommands
private static void KCountCommand(PlayerControl player, string text, string[] args)
{
if (GameStates.IsLobby || !Options.EnableKillerLeftCommand.GetBool() || Main.AllAlivePlayerControls.Count < Options.MinPlayersForGameStateCommand.GetInt())
if (GameStates.IsLobby || !Options.EnableGameStateCommand.GetBool() || Main.AllAlivePlayerControls.Count < Options.MinPlayersForGameStateCommand.GetInt())
{
Utils.SendMessage(GetString("Message.CommandUnavailable"), player.PlayerId, importance: MessageImportance.Low);
return;
+1 -1
View File
@@ -92,7 +92,7 @@ internal static class RunLoginPatch
if (!Main.AckdPrivacyPolicy.Value)
{
ModUpdater.ShowPopupWithTwoButtons(GetString("PP"), GetString("Yes"), GetString("MainMenu.ExitGameButton"), () => Main.AckdPrivacyPolicy.Value = true, SplashLogoAnimatorPatch.SceneChanger.ExitGame);
ModUpdater.ShowPopupWithTwoButtons(GetString("PrivacyPolicy"), GetString("Yes"), GetString("MainMenu.ExitGameButton"), () => Main.AckdPrivacyPolicy.Value = true, SplashLogoAnimatorPatch.SceneChanger.ExitGame);
return;
}
+1 -1
View File
@@ -142,7 +142,7 @@ internal static class ExileControllerWrapUpPatch
if (!AmongUsClient.Instance.AmHost || GameStates.IsEnded) return;
bool showRemainingKillers = Options.EnableKillerLeftCommand.GetBool() && Options.ShowImpRemainOnEject.GetBool();
bool showRemainingKillers = Options.EnableGameStateCommand.GetBool() && Options.ShowImpRemainOnEject.GetBool();
bool ejectionNotify = CheckForEndVotingPatch.EjectionText != string.Empty;
Logger.Msg($"Ejection Text: {CheckForEndVotingPatch.EjectionText}", "ExilePatch");
+6
View File
@@ -640,6 +640,12 @@ public static class HudSpritePatch
else newAbilityButton = CustomButton.Get("Mine");
break;
}
case CustomRoles.Wiper:
{
if (Options.UsePets.GetBool() && !Options.UsePhantomBasis.GetBool()) newPetButton = DefaultIcons[0];
else newAbilityButton = DefaultIcons[0];
break;
}
case CustomRoles.Analyst:
case CustomRoles.Witness:
{
+37
View File
@@ -0,0 +1,37 @@
using System;
using HarmonyLib;
using UnityEngine;
namespace EHR.Patches;
[HarmonyPatch]
public static class JoystickBlockPatch
{
private static bool ShouldBlockJoystickInput()
{
if (!OperatingSystem.IsAndroid()) return false;
if (!ClientControlGUI.Instance || !ClientControlGUI.Instance.IsOpen) return false;
foreach (Touch touch in Input.touches)
{
Vector2 guiPos = new(touch.position.x, Screen.height - touch.position.y);
if (ClientControlGUI.PanelRect.Contains(guiPos) || ClientControlGUI.ToggleRect.Contains(guiPos))
return true;
}
return false;
}
[HarmonyPatch(typeof(VirtualJoystickController), nameof(VirtualJoystickController.CheckDrag))]
[HarmonyPrefix]
public static bool VirtualJoystickCheckDrag(ref DragState __result)
{
if (!ShouldBlockJoystickInput()) return true;
__result = DragState.NoTouch;
return false;
}
[HarmonyPatch(typeof(ScreenJoystick), "FixedUpdate")]
[HarmonyPrefix]
public static bool ScreenJoystickFixedUpdate() => !ShouldBlockJoystickInput();
}
+1 -1
View File
@@ -506,7 +506,7 @@ internal static class OnPlayerJoinedPatch
Logger.Info($"TempBanned a player {client.PlayerName} without a friend code", "Temp Ban");
}
if (AmongUsClient.Instance.AmHost && client.PlatformData.Platform is Platforms.Android or Platforms.IPhone && Options.KickAndroidPlayer.GetBool())
if (AmongUsClient.Instance.AmHost && client.PlatformData.Platform is Platforms.Android or Platforms.IPhone && Options.KickMobilePlayer.GetBool())
{
AmongUsClient.Instance.KickPlayer(client.Id, false);
string msg = string.Format(GetString("KickMobilePlayer"), client.PlayerName);
+3
View File
@@ -108,6 +108,8 @@ softiechic#0187 | 55291d4ae | Spatiallap | n word |
effecttiny#2849 | c7b7aaa4f | yuka | Threatening my familiar host; accusing them, while being the actual culprit | Possibly she'll try to reach us and try to prove she's innocent, telling long stories, explaining and doing other nonsense. Don't trust her words
beadslate#0697 | 9a5dc8267 | Veganworld | antisemitic comments and alts |
gafflower#7502 | 0e6b31ae3 | TINCE | antisemitism |
labelduple#2771 | ae50507b1 | Hsudgiq | Noclip cheats | In Sarha's lobby
newbetters#6642 | 5d2323572 | Ben | Cheating | Cheating in Sarha's lobby
## Griefers, Toxic, Harrasing, Racist
setmolar#4374 | | 藏族顶针 | Toxic |
@@ -147,6 +149,7 @@ jocundblur#4007 | 8d87eca3d | apk4u | Racist | Alluding to racial slurs in Sarha
freesnack#4985 | 9c1f2cdc2 | Iamkira | Racist | N word
yearlydue#3076 | fa3a2c03a | Shadow | Racist | N word in Sarah's lobby
westtext#4391 | 3af6925aa | RG2014 | Racist | n word in Sarha's lobby
ebbpleased#3115 | 5a86f21a0 | CarlosB131 | Racist | N word in Sarha's lobby
## Other
tenthrope#3476 | | Oldishwire | Other |
+384 -554
View File
File diff suppressed because it is too large. Load diff
+16 -1
View File
@@ -50,6 +50,21 @@ public class Wiper : RoleBase
{
if (Options.UsePhantomBasis.GetBool())
AURoleOptions.PhantomCooldown = AbilityCooldown.GetInt();
else
{
if (Options.UsePets.GetBool()) return;
AURoleOptions.ShapeshifterCooldown = AbilityCooldown.GetFloat();
AURoleOptions.ShapeshifterDuration = 1f;
}
}
public override void SetButtonTexts(HudManager hud, byte id)
{
if (Options.UsePets.GetBool() && !Options.UsePhantomBasis.GetBool())
hud.PetButton?.OverrideText(Translator.GetString("KillButtonText"));
else
hud.AbilityButton?.OverrideText(Translator.GetString("KillButtonText"));
}
public override void OnPet(PlayerControl pc)
@@ -143,4 +158,4 @@ public class Wiper : RoleBase
if (IsInvalidRoom(room)) return Utils.ColorString(Color.red, Translator.GetString("Wiper.MustBeInRoomToUseAbility"));
return string.Format(Translator.GetString("Wiper.CurrentRoom"), Translator.GetString($"{room.RoomId}"));
}
}
}