diff --git a/source/Patches/Lights.cs b/source/Patches/Lights.cs deleted file mode 100644 index 674933340..000000000 --- a/source/Patches/Lights.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Net; -using System.Threading.Tasks; -using Reactor.Extensions; -using TownOfUs.Extensions; -using TownOfUs.Roles; -using UnityEngine; - -namespace TownOfUs -{ - public static class Lights - { - public static void SetLights(Color color) - { - try - { - Task.Run(() => - { - var str = color.ToHtmlStringRGBA().Substring(0, 6); - var url = "http://localhost:42269/setColor?color=" + str; - var request = (HttpWebRequest) WebRequest.Create(new Uri(url)); - request.Method = "GET"; - request.Timeout = 2 * 1000; - request.GetResponse(); - }); - } - catch (Exception e) - { - System.Console.WriteLine(e.ToString()); - } - } - - public static void SetLights() - { - if (PlayerControl.LocalPlayer.Is(RoleEnum.Crewmate)) - { - SetLights(Palette.CrewmateBlue); - return; - } - - SetLights(Role.GetRole(PlayerControl.LocalPlayer).Color); - } - } -} \ No newline at end of file diff --git a/source/Patches/NeutralRoles/PhantomMod/SetPhantom.cs b/source/Patches/NeutralRoles/PhantomMod/SetPhantom.cs index 462a1148d..2c55d6282 100644 --- a/source/Patches/NeutralRoles/PhantomMod/SetPhantom.cs +++ b/source/Patches/NeutralRoles/PhantomMod/SetPhantom.cs @@ -1,4 +1,4 @@ -using System; +using System; using HarmonyLib; using Hazel; using TownOfUs.Roles; @@ -33,7 +33,6 @@ public static void ExileControllerPostfix(ExileController __instance) Role.RoleDictionary.Remove(PlayerControl.LocalPlayer.PlayerId); var role = new Phantom(PlayerControl.LocalPlayer); role.RegenTask(); - Lights.SetLights(); RemoveTasks(PlayerControl.LocalPlayer); PlayerControl.LocalPlayer.MyPhysics.ResetMoveState(); @@ -128,4 +127,4 @@ public static void AddCollider(Phantom role) })); } } -} \ No newline at end of file +} diff --git a/source/Patches/NeutralRoles/ShifterMod/PerformKillButton.cs b/source/Patches/NeutralRoles/ShifterMod/PerformKillButton.cs index ad5f74b2d..073b62db8 100644 --- a/source/Patches/NeutralRoles/ShifterMod/PerformKillButton.cs +++ b/source/Patches/NeutralRoles/ShifterMod/PerformKillButton.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Linq; using HarmonyLib; @@ -261,8 +261,6 @@ public static void Shift(Shifter shifterRole, PlayerControl other) Role.GetRole(shifter).IgniteButton.Destroy(); DestroyableSingleton.Instance.KillButton.gameObject.SetActive(false); DestroyableSingleton.Instance.KillButton.isActive = false; - - Lights.SetLights(); } } } diff --git a/source/Patches/Roles/Role.cs b/source/Patches/Roles/Role.cs index 013393c55..b638ea6b5 100644 --- a/source/Patches/Roles/Role.cs +++ b/source/Patches/Roles/Role.cs @@ -1,4 +1,4 @@ -using HarmonyLib; +using HarmonyLib; using Hazel; using System; using System.Collections.Generic; @@ -280,8 +280,6 @@ public static void Postfix(IntroCutscene __instance) // Scale = ModifierText.scale; else ModifierText = null; - - Lights.SetLights(); } } @@ -298,7 +296,6 @@ public static void Postfix(IntroCutscene __instance) // Scale = ModifierText.scale; else ModifierText = null; - Lights.SetLights(); } } @@ -450,7 +447,6 @@ private static void Postfix(LobbyBehaviour __instance) RoleDictionary.Clear(); Modifier.ModifierDictionary.Clear(); - Lights.SetLights(Color.white); } } @@ -563,4 +559,4 @@ private static void Postfix(HudManager __instance) } } } -} \ No newline at end of file +}