diff --git a/Patches/GameOptionsMenuPatch.cs b/Patches/GameOptionsMenuPatch.cs index 0a15f63f4..afbb0acd3 100644 --- a/Patches/GameOptionsMenuPatch.cs +++ b/Patches/GameOptionsMenuPatch.cs @@ -69,7 +69,8 @@ public static class GameOptionsMenuPatch var gameSettings = GameObject.Find("Game Settings"); if (gameSettings == null) return; - gameSettings.transform.FindChild("GameGroup").GetComponent().ScrollWheelSpeed = 1.3f; + if (Main.DarkTheme.Value) gameSettings.transform.FindChild("BackPanel").transform.FindChild("baseColor").GetComponent().color = new(0.25f, 0.25f, 0.25f, 1f); + gameSettings.transform.FindChild("GameGroup").GetComponent().ScrollWheelSpeed = 1.1f; var gameSettingMenu = Object.FindObjectsOfType().FirstOrDefault(); if (gameSettingMenu == null) return; @@ -117,7 +118,9 @@ public static class GameOptionsMenuPatch stringOption.Value = stringOption.oldValue = option.CurrentValue; stringOption.ValueText.text = option.GetString(); stringOption.name = option.Name; - stringOption.transform.FindChild("Background").localScale = new(1.6f, 1f, 1f); + var bg = stringOption.transform.FindChild("Background"); + bg.localScale = new(1.6f, 1f, 1f); + if (Main.DarkTheme.Value) bg.GetComponent().color = new(0f, 0f, 0f, 1f); stringOption.transform.FindChild("Plus_TMP").localPosition += new Vector3(1.4f, yoffset, 0f); stringOption.transform.FindChild("Minus_TMP").localPosition += new Vector3(1.0f, yoffset, 0f); stringOption.transform.FindChild("Value_TMP").localPosition += new Vector3(1.2f, yoffset, 0f); @@ -139,7 +142,6 @@ public static class GameOptionsMenuPatch tohTab.transform.FindChild("Hat Button").FindChild("Icon").GetComponent().sprite = Utils.LoadSprite($"TOHE.Resources.Images.TabIcon_{tab}.png", 100f); tabs.Add(tohTab); var tohTabHighlight = tohTab.transform.FindChild("Hat Button").FindChild("Tab Background").GetComponent(); - tohTabHighlight.color = new(0.1f, 0.1f, 0.1f, 1f); highlights.Add(tohTabHighlight); } @@ -208,29 +210,39 @@ public class GameOptionsMenuUpdatePatch var opt = option.OptionBehaviour.transform.Find("Background").GetComponent(); opt.size = new(5.0f, 0.45f); + while (parent != null && enabled) { enabled = parent.GetBool() && !parent.IsHiddenOn(Options.CurrentGameMode); parent = parent.Parent; - opt.color = new(0f, 1f, 0f); + + opt.color = new(0f, 0f, 1f, 1f); opt.size = new(4.8f, 0.45f); opt.transform.localPosition = new(0.11f, 0f); - option.OptionBehaviour.transform.Find("Title_TMP").transform.localPosition = new(-1.08f, 0f); - option.OptionBehaviour.transform.FindChild("Title_TMP").GetComponent().sizeDelta = new(5.1f, 0.28f); + + var titleTMP = option.OptionBehaviour.transform.Find("Title_TMP"); + var rectTransform = option.OptionBehaviour.transform.FindChild("Title_TMP").GetComponent(); + + titleTMP.transform.localPosition = new(-1.08f, 0f); + rectTransform.sizeDelta = new(5.1f, 0.28f); + if (option.Parent?.Parent != null) { - opt.color = new(0f, 0f, 1f); + opt.color = new(1f, 0f, 0f, 1f); opt.size = new(4.6f, 0.45f); opt.transform.localPosition = new(0.24f, 0f); - option.OptionBehaviour.transform.Find("Title_TMP").transform.localPosition = new(-0.88f, 0f); - option.OptionBehaviour.transform.FindChild("Title_TMP").GetComponent().sizeDelta = new(4.9f, 0.28f); + + titleTMP.transform.localPosition = new(-0.88f, 0f); + rectTransform.sizeDelta = new(4.9f, 0.28f); + if (option.Parent?.Parent?.Parent != null) { - opt.color = new(1f, 0f, 0f); + opt.color = new(0f, 1f, 0f, 1f); opt.size = new(4.4f, 0.45f); opt.transform.localPosition = new(0.37f, 0f); - option.OptionBehaviour.transform.Find("Title_TMP").transform.localPosition = new(-0.68f, 0f); - option.OptionBehaviour.transform.FindChild("Title_TMP").GetComponent().sizeDelta = new(4.7f, 0.28f); + + titleTMP.transform.localPosition = new(-0.68f, 0f); + rectTransform.sizeDelta = new(4.7f, 0.28f); } } } diff --git a/Roles/Crewmate/Monarch.cs b/Roles/Crewmate/Monarch.cs index fd6b16455..1d03296f9 100644 --- a/Roles/Crewmate/Monarch.cs +++ b/Roles/Crewmate/Monarch.cs @@ -60,12 +60,12 @@ public class Monarch : RoleBase killer.ResetKillCooldown(); killer.SetKillCooldown(); - // killer.RpcGuardAndKill(target); + target.RpcGuardAndKill(killer); target.RpcGuardAndKill(target); Logger.Info("SetRole:" + target.Data?.PlayerName + " = " + target.GetCustomRole() + " + " + CustomRoles.Knighted, "Assign " + CustomRoles.Knighted); - return true; + return false; } killer.Notify(Utils.ColorString(Utils.GetRoleColor(CustomRoles.Monarch), GetString("MonarchInvalidTarget"))); diff --git a/TOHE.csproj b/TOHE.csproj index f5d12b02c..52fa932b8 100644 --- a/TOHE.csproj +++ b/TOHE.csproj @@ -7,7 +7,7 @@ TOHE+ Gurge44 preview - D:\Epic Games\AmongUs + E:\Program Files\AmongUs true True $(MSBuildProjectName)+