From 137db3e1a15724d7dce120d63b834c67e1248885 Mon Sep 17 00:00:00 2001 From: Eno9991 Date: Fri, 25 Aug 2023 18:23:16 +0200 Subject: [PATCH] v2023.7.12+ support + config file entry + tasks room adjustment --- BetterPolus/BetterPolus.csproj | 13 +- BetterPolus/BetterPolusPlugin.cs | 58 ++-- BetterPolus/Patches/AmongUsClientPatches.cs | 14 + .../Patches/NormalPlayerTaskPatches.cs | 66 ++++ .../Patches/ReactorSystemTypePatches.cs | 20 ++ BetterPolus/Patches/ShipStatusPatches.cs | 283 +++++++++++++++++ BetterPolus/Patches/VersionShowerPatches.cs | 14 + BetterPolus/ReactorSystemTypePatch.cs | 24 -- BetterPolus/ShipStatusPatch.cs | 298 ------------------ README.md | 32 +- 10 files changed, 448 insertions(+), 374 deletions(-) create mode 100644 BetterPolus/Patches/AmongUsClientPatches.cs create mode 100644 BetterPolus/Patches/NormalPlayerTaskPatches.cs create mode 100644 BetterPolus/Patches/ReactorSystemTypePatches.cs create mode 100644 BetterPolus/Patches/ShipStatusPatches.cs create mode 100644 BetterPolus/Patches/VersionShowerPatches.cs delete mode 100644 BetterPolus/ReactorSystemTypePatch.cs delete mode 100644 BetterPolus/ShipStatusPatch.cs diff --git a/BetterPolus/BetterPolus.csproj b/BetterPolus/BetterPolus.csproj index c4448f0..24ad338 100644 --- a/BetterPolus/BetterPolus.csproj +++ b/BetterPolus/BetterPolus.csproj @@ -1,7 +1,7 @@ net6.0 - 1.2.0 + 1.2.1 An Among Us mod that tweaks Polus, allowing a more balanced experience. Brybry @@ -10,12 +10,15 @@ - - - - + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/BetterPolus/BetterPolusPlugin.cs b/BetterPolus/BetterPolusPlugin.cs index 3391384..10b134e 100644 --- a/BetterPolus/BetterPolusPlugin.cs +++ b/BetterPolus/BetterPolusPlugin.cs @@ -1,47 +1,33 @@ using BepInEx; +using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using BepInEx.Unity.IL2CPP; -namespace BetterPolus +namespace BetterPolus; + +[BepInPlugin(Id, Name, Version)] +[BepInProcess("Among Us.exe")] +public class BetterPolusPlugin : BasePlugin { - [BepInPlugin(Id, Name, Version)] - [BepInProcess("Among Us.exe")] - public class BetterPolusPlugin : BasePlugin + private const string Id = "ch.brybry.betterpolus"; + private const string Name = "BetterPolus Mod"; + public const string Version = "1.2.1"; + + public Harmony Harmony { get; } = new Harmony(Id); + public static ManualLogSource log; + public static ConfigEntry Enabled { get; private set; } + public static ConfigEntry ReactorCountdown { get; private set; } + + public override void Load() { - public const string Id = "ch.brybry.betterpolus"; - public const string Name = "BetterPolus Mod"; - public const string Version = "1.2.0"; + log = Log; - public Harmony Harmony { get; } = new Harmony(Id); - public static ManualLogSource log; - - public override void Load() - { - log = Log; + Enabled = Config.Bind("Polus", "Enable Better Polus", true, "Enable Polus map modifications"); + ReactorCountdown = Config.Bind("Polus", "Reactor Countdown", 40f, "Reactor sabotage countdown in Polus map"); - log.LogMessage($"{Name} loaded"); + log.LogMessage($"{Name} loaded"); - Harmony.PatchAll(); - } - - [HarmonyPatch(typeof(VersionShower), nameof(VersionShower.Start))] - public static class VersionShowerPatch - { - public static void Postfix(VersionShower __instance) - { - __instance.text.text += $" + BetterPolus v{Version} by Brybry"; - } - } - - [HarmonyPatch(typeof(AmongUsClient), nameof(AmongUsClient.Awake))] - public static class ModStampPatch - { - [HarmonyPrefix] - public static void Prefix() - { - DestroyableSingleton.Instance.ShowModStamp(); - } - } + Harmony.PatchAll(); } -} +} \ No newline at end of file diff --git a/BetterPolus/Patches/AmongUsClientPatches.cs b/BetterPolus/Patches/AmongUsClientPatches.cs new file mode 100644 index 0000000..f00ed52 --- /dev/null +++ b/BetterPolus/Patches/AmongUsClientPatches.cs @@ -0,0 +1,14 @@ +using HarmonyLib; + +namespace BetterPolus.Patches; + +[HarmonyPatch(typeof(AmongUsClient))] +public static class AmongUsClientPatches +{ + [HarmonyPatch(nameof(AmongUsClient.Awake))] + [HarmonyPrefix] + private static void AwakePrefix() + { + DestroyableSingleton.Instance.ShowModStamp(); + } +} \ No newline at end of file diff --git a/BetterPolus/Patches/NormalPlayerTaskPatches.cs b/BetterPolus/Patches/NormalPlayerTaskPatches.cs new file mode 100644 index 0000000..e1d65df --- /dev/null +++ b/BetterPolus/Patches/NormalPlayerTaskPatches.cs @@ -0,0 +1,66 @@ +using System.Collections.Generic; +using HarmonyLib; +using Il2CppSystem.Text; + +namespace BetterPolus.Patches; + +[HarmonyPatch(typeof(NormalPlayerTask))] +public static class NormalPlayerTaskPatches +{ + private static readonly List TaskTypesToPatch = new() + { TaskTypes.RebootWifi, TaskTypes.RecordTemperature, TaskTypes.ChartCourse }; + + [HarmonyPatch(nameof(NormalPlayerTask.AppendTaskText))] + [HarmonyPrefix] + private static bool AppendTaskTextPrefix(NormalPlayerTask __instance, StringBuilder sb) + { + if (!BetterPolusPlugin.Enabled.Value || !ShipStatus.Instance || ShipStatus.Instance.Type != ShipStatus.MapType.Pb) return true; + if (!TaskTypesToPatch.Contains(__instance.TaskType)) return true; + var flag = __instance.ShouldYellowText(); + if (flag) + { + sb.Append(__instance.IsComplete ? "" : ""); + } + + var room = GetUpdatedRoom(__instance); + + sb.Append(DestroyableSingleton.Instance.GetString(room)); + sb.Append(": "); + sb.Append(DestroyableSingleton.Instance.GetString(__instance.TaskType)); + if (__instance is { ShowTaskTimer: true, TimerStarted: NormalPlayerTask.TimerState.Started }) + { + sb.Append(" ("); + sb.Append(DestroyableSingleton.Instance.GetString(StringNames.SecondsAbbv, + (int)__instance.TaskTimer)); + sb.Append(")"); + } + else if (__instance.ShowTaskStep) + { + sb.Append(" ("); + sb.Append(__instance.taskStep); + sb.Append("/"); + sb.Append(__instance.MaxStep); + sb.Append(")"); + } + + if (flag) + { + sb.Append(""); + } + + sb.AppendLine(); + + return false; + } + + private static SystemTypes GetUpdatedRoom(NormalPlayerTask task) + { + return task.TaskType switch + { + TaskTypes.RecordTemperature => SystemTypes.Outside, + TaskTypes.RebootWifi => SystemTypes.Dropship, + TaskTypes.ChartCourse => SystemTypes.Comms, + _ => task.StartAt + }; + } +} \ No newline at end of file diff --git a/BetterPolus/Patches/ReactorSystemTypePatches.cs b/BetterPolus/Patches/ReactorSystemTypePatches.cs new file mode 100644 index 0000000..eb79446 --- /dev/null +++ b/BetterPolus/Patches/ReactorSystemTypePatches.cs @@ -0,0 +1,20 @@ +using HarmonyLib; + +namespace BetterPolus.Patches; + +[HarmonyPatch(typeof(ReactorSystemType))] +public static class ReactorSystemTypePatches +{ + [HarmonyPatch(nameof(ReactorSystemType.RepairDamage))] + [HarmonyPrefix] + private static bool RepairDamagePrefix(ReactorSystemType __instance, PlayerControl player, byte opCode) + { + if (ShipStatus.Instance.Type != ShipStatus.MapType.Pb || opCode != 128 || __instance.IsActive) return true; + + __instance.Countdown = BetterPolusPlugin.ReactorCountdown.Value; + __instance.UserConsolePairs.Clear(); + __instance.IsDirty = true; + + return false; + } +} \ No newline at end of file diff --git a/BetterPolus/Patches/ShipStatusPatches.cs b/BetterPolus/Patches/ShipStatusPatches.cs new file mode 100644 index 0000000..d2cc5c7 --- /dev/null +++ b/BetterPolus/Patches/ShipStatusPatches.cs @@ -0,0 +1,283 @@ +using System.Linq; +using HarmonyLib; +using UnityEngine; + +namespace BetterPolus.Patches; + +[HarmonyPatch(typeof(ShipStatus))] +public static class ShipStatusPatches +{ + // Positions + public static readonly Vector3 DvdScreenNewPos = new Vector3(26.635f, -15.92f, 1f); + public static readonly Vector3 VitalsNewPos = new Vector3(31.275f, -6.45f, 1f); + + public static readonly Vector3 WifiNewPos = new Vector3(15.975f, 0.084f, 1f); + public static readonly Vector3 NavNewPos = new Vector3(11.07f, -15.298f, -0.015f); + + public static readonly Vector3 TempColdNewPos = new Vector3(7.772f, -17.103f, -0.017f); + + // Scales + public const float DvdScreenNewScale = 0.75f; + + // Checks + public static bool IsAdjustmentsDone; + public static bool IsObjectsFetched; + public static bool IsRoomsFetched; + public static bool IsVentsFetched; + + // Tasks Tweak + public static Console WifiConsole; + public static Console NavConsole; + + // Vitals Tweak + public static SystemConsole Vitals; + public static GameObject DvdScreenOffice; + + // Vents Tweak + public static Vent ElectricBuildingVent; + public static Vent ElectricalVent; + public static Vent ScienceBuildingVent; + public static Vent StorageVent; + + // TempCold Tweak + public static Console TempCold; + + // Rooms + public static GameObject Comms; + public static GameObject DropShip; + public static GameObject Outside; + public static GameObject Science; + + private static void ApplyChanges(ShipStatus instance) + { + if (instance.Type == ShipStatus.MapType.Pb) + { + FindPolusObjects(); + AdjustPolus(); + } + } + + public static void FindPolusObjects() + { + FindVents(); + FindRooms(); + FindObjects(); + } + + public static void AdjustPolus() + { + if (IsObjectsFetched && IsRoomsFetched) + { + MoveVitals(); + SwitchNavWifi(); + MoveTempCold(); + } + else + { + BetterPolusPlugin.log.LogError("Couldn't move elements as not all of them have been fetched."); + } + + AdjustVents(); + + IsAdjustmentsDone = true; + } + + // -------------------- + // - Objects Fetching - + // -------------------- + + public static void FindVents() + { + var ventsList = Object.FindObjectsOfType().ToList(); + + if (ElectricBuildingVent == null) + { + ElectricBuildingVent = ventsList.Find(vent => vent.gameObject.name == "ElectricBuildingVent"); + } + + if (ElectricalVent == null) + { + ElectricalVent = ventsList.Find(vent => vent.gameObject.name == "ElectricalVent"); + } + + if (ScienceBuildingVent == null) + { + ScienceBuildingVent = ventsList.Find(vent => vent.gameObject.name == "ScienceBuildingVent"); + } + + if (StorageVent == null) + { + StorageVent = ventsList.Find(vent => vent.gameObject.name == "StorageVent"); + } + + IsVentsFetched = ElectricBuildingVent != null && ElectricalVent != null && ScienceBuildingVent != null && + StorageVent != null; + } + + public static void FindRooms() + { + if (Comms == null) + { + Comms = Object.FindObjectsOfType().ToList().Find(o => o.name == "Comms"); + } + + if (DropShip == null) + { + DropShip = Object.FindObjectsOfType().ToList().Find(o => o.name == "Dropship"); + } + + if (Outside == null) + { + Outside = Object.FindObjectsOfType().ToList().Find(o => o.name == "Outside"); + } + + if (Science == null) + { + Science = Object.FindObjectsOfType().ToList().Find(o => o.name == "Science"); + } + + IsRoomsFetched = Comms != null && DropShip != null && Outside != null && Science != null; + } + + public static void FindObjects() + { + if (WifiConsole == null) + { + WifiConsole = Object.FindObjectsOfType().ToList() + .Find(console => console.name == "panel_wifi"); + } + + if (NavConsole == null) + { + NavConsole = Object.FindObjectsOfType().ToList() + .Find(console => console.name == "panel_nav"); + } + + if (Vitals == null) + { + Vitals = Object.FindObjectsOfType().ToList() + .Find(console => console.name == "panel_vitals"); + } + + if (DvdScreenOffice == null) + { + GameObject DvdScreenAdmin = Object.FindObjectsOfType().ToList() + .Find(o => o.name == "dvdscreen"); + + if (DvdScreenAdmin != null) + { + DvdScreenOffice = Object.Instantiate(DvdScreenAdmin); + } + } + + if (TempCold == null) + { + TempCold = Object.FindObjectsOfType().ToList() + .Find(console => console.name == "panel_tempcold"); + } + + IsObjectsFetched = WifiConsole != null && NavConsole != null && Vitals != null && + DvdScreenOffice != null && TempCold != null; + } + + // ------------------- + // - Map Adjustments - + // ------------------- + + public static void AdjustVents() + { + if (IsVentsFetched) + { + ElectricBuildingVent.Left = ElectricalVent; + ElectricalVent.Center = ElectricBuildingVent; + + ScienceBuildingVent.Left = StorageVent; + StorageVent.Center = ScienceBuildingVent; + } + else + { + BetterPolusPlugin.log.LogError("Couldn't adjust Vents as not all objects have been fetched."); + } + } + + public static void MoveTempCold() + { + if (TempCold.transform.position != TempColdNewPos) + { + Transform tempColdTransform = TempCold.transform; + tempColdTransform.parent = Outside.transform; + tempColdTransform.position = TempColdNewPos; + + // Fixes collider being too high + BoxCollider2D collider = TempCold.GetComponent(); + collider.isTrigger = false; + collider.size += new Vector2(0f, -0.3f); + } + } + + public static void SwitchNavWifi() + { + if (WifiConsole.transform.position != WifiNewPos) + { + Transform wifiTransform = WifiConsole.transform; + wifiTransform.parent = DropShip.transform; + wifiTransform.position = WifiNewPos; + } + + if (NavConsole.transform.position != NavNewPos) + { + Transform navTransform = NavConsole.transform; + navTransform.parent = Comms.transform; + navTransform.position = NavNewPos; + + // Prevents crewmate being able to do the task from outside + NavConsole.checkWalls = true; + } + } + + public static void MoveVitals() + { + if (Vitals.transform.position != VitalsNewPos) + { + // Vitals + Transform vitalsTransform = Vitals.gameObject.transform; + vitalsTransform.parent = Science.transform; + vitalsTransform.position = VitalsNewPos; + } + + if (DvdScreenOffice.transform.position != DvdScreenNewPos) + { + // DvdScreen + Transform dvdScreenTransform = DvdScreenOffice.transform; + dvdScreenTransform.position = DvdScreenNewPos; + + var localScale = dvdScreenTransform.localScale; + localScale = + new Vector3(DvdScreenNewScale, localScale.y, + localScale.z); + dvdScreenTransform.localScale = localScale; + } + } + + [HarmonyPatch(nameof(ShipStatus.Begin))] + [HarmonyPrefix] + private static void BeginPrefix(ShipStatus __instance) + { + ApplyChanges(__instance); + } + + [HarmonyPatch(nameof(ShipStatus.Awake))] + [HarmonyPrefix] + private static void AwakePrefix(ShipStatus __instance) + { + ApplyChanges(__instance); + } + + [HarmonyPatch(nameof(ShipStatus.FixedUpdate))] + [HarmonyPrefix] + private static void FixedUpdate(ShipStatus __instance) + { + if (IsObjectsFetched && IsAdjustmentsDone) return; + ApplyChanges(__instance); + } +} \ No newline at end of file diff --git a/BetterPolus/Patches/VersionShowerPatches.cs b/BetterPolus/Patches/VersionShowerPatches.cs new file mode 100644 index 0000000..e56ad81 --- /dev/null +++ b/BetterPolus/Patches/VersionShowerPatches.cs @@ -0,0 +1,14 @@ +using HarmonyLib; + +namespace BetterPolus.Patches; + +[HarmonyPatch(typeof(VersionShower))] +public static class VersionShowerPatches +{ + [HarmonyPatch(nameof(VersionShower.Start))] + [HarmonyPostfix] + private static void StartPostfix(VersionShower __instance) + { + __instance.text.text += $" + BetterPolus v{BetterPolusPlugin.Version} by Brybry"; + } +} \ No newline at end of file diff --git a/BetterPolus/ReactorSystemTypePatch.cs b/BetterPolus/ReactorSystemTypePatch.cs deleted file mode 100644 index 78443dd..0000000 --- a/BetterPolus/ReactorSystemTypePatch.cs +++ /dev/null @@ -1,24 +0,0 @@ -//* -using HarmonyLib; - -namespace BetterPolus -{ - [HarmonyPatch(typeof(ReactorSystemType), nameof(ReactorSystemType.RepairDamage))] - public static class ReactorSystemType_RepairDamagePatch - { - public static bool Prefix(ReactorSystemType __instance, PlayerControl player, byte opCode) - { - if (ShipStatus.Instance.Type == ShipStatus.MapType.Pb && opCode == 128 && !__instance.IsActive) - { - __instance.Countdown = 40f; - __instance.UserConsolePairs.Clear(); - __instance.IsDirty = true; - - return false; - } - - return true; - } - } -} -//*/ \ No newline at end of file diff --git a/BetterPolus/ShipStatusPatch.cs b/BetterPolus/ShipStatusPatch.cs deleted file mode 100644 index a569490..0000000 --- a/BetterPolus/ShipStatusPatch.cs +++ /dev/null @@ -1,298 +0,0 @@ -using System.Linq; -using HarmonyLib; -using UnityEngine; - -namespace BetterPolus -{ - [HarmonyPatch(typeof(ShipStatus))] - public static class ShipStatusPatch - { - // Positions - public static readonly Vector3 DvdScreenNewPos = new Vector3(26.635f, -15.92f, 1f); - public static readonly Vector3 VitalsNewPos = new Vector3(31.275f, -6.45f, 1f); - - public static readonly Vector3 WifiNewPos = new Vector3(15.975f, 0.084f, 1f); - public static readonly Vector3 NavNewPos = new Vector3(11.07f, -15.298f, -0.015f); - - public static readonly Vector3 TempColdNewPos = new Vector3(7.772f, -17.103f, -0.017f); - - // Scales - public const float DvdScreenNewScale = 0.75f; - - // Checks - public static bool IsAdjustmentsDone; - public static bool IsObjectsFetched; - public static bool IsRoomsFetched; - public static bool IsVentsFetched; - - // Tasks Tweak - public static Console WifiConsole; - public static Console NavConsole; - - // Vitals Tweak - public static SystemConsole Vitals; - public static GameObject DvdScreenOffice; - - // Vents Tweak - public static Vent ElectricBuildingVent; - public static Vent ElectricalVent; - public static Vent ScienceBuildingVent; - public static Vent StorageVent; - - // TempCold Tweak - public static Console TempCold; - - // Rooms - public static GameObject Comms; - public static GameObject DropShip; - public static GameObject Outside; - public static GameObject Science; - - [HarmonyPatch(typeof(ShipStatus), nameof(ShipStatus.Begin))] - public static class ShipStatusBeginPatch - { - [HarmonyPrefix] - [HarmonyPatch] - public static void Prefix(ShipStatus __instance) - { - ApplyChanges(__instance); - } - } - - [HarmonyPatch(typeof(ShipStatus), nameof(ShipStatus.Awake))] - public static class ShipStatusAwakePatch - { - [HarmonyPrefix] - [HarmonyPatch] - public static void Prefix(ShipStatus __instance) - { - ApplyChanges(__instance); - } - } - - [HarmonyPatch(typeof(ShipStatus), nameof(ShipStatus.FixedUpdate))] - public static class ShipStatusFixedUpdatePatch - { - [HarmonyPrefix] - [HarmonyPatch] - public static void Prefix(ShipStatus __instance) - { - if (!IsObjectsFetched || !IsAdjustmentsDone) - { - ApplyChanges(__instance); - } - } - } - - private static void ApplyChanges(ShipStatus instance) - { - if (instance.Type == ShipStatus.MapType.Pb) - { - FindPolusObjects(); - AdjustPolus(); - } - } - - public static void FindPolusObjects() - { - FindVents(); - FindRooms(); - FindObjects(); - } - - public static void AdjustPolus() - { - if (IsObjectsFetched && IsRoomsFetched) - { - MoveVitals(); - SwitchNavWifi(); - MoveTempCold(); - } - else - { - BetterPolusPlugin.log.LogError("Couldn't move elements as not all of them have been fetched."); - } - - AdjustVents(); - - IsAdjustmentsDone = true; - } - - // -------------------- - // - Objects Fetching - - // -------------------- - - public static void FindVents() - { - var ventsList = Object.FindObjectsOfType().ToList(); - - if (ElectricBuildingVent == null) - { - ElectricBuildingVent = ventsList.Find(vent => vent.gameObject.name == "ElectricBuildingVent"); - } - - if (ElectricalVent == null) - { - ElectricalVent = ventsList.Find(vent => vent.gameObject.name == "ElectricalVent"); - } - - if (ScienceBuildingVent == null) - { - ScienceBuildingVent = ventsList.Find(vent => vent.gameObject.name == "ScienceBuildingVent"); - } - - if (StorageVent == null) - { - StorageVent = ventsList.Find(vent => vent.gameObject.name == "StorageVent"); - } - - IsVentsFetched = ElectricBuildingVent != null && ElectricalVent != null && ScienceBuildingVent != null && - StorageVent != null; - } - - public static void FindRooms() - { - if (Comms == null) - { - Comms = Object.FindObjectsOfType().ToList().Find(o => o.name == "Comms"); - } - - if (DropShip == null) - { - DropShip = Object.FindObjectsOfType().ToList().Find(o => o.name == "Dropship"); - } - - if (Outside == null) - { - Outside = Object.FindObjectsOfType().ToList().Find(o => o.name == "Outside"); - } - - if (Science == null) - { - Science = Object.FindObjectsOfType().ToList().Find(o => o.name == "Science"); - } - - IsRoomsFetched = Comms != null && DropShip != null && Outside != null && Science != null; - } - - public static void FindObjects() - { - if (WifiConsole == null) - { - WifiConsole = Object.FindObjectsOfType().ToList() - .Find(console => console.name == "panel_wifi"); - } - - if (NavConsole == null) - { - NavConsole = Object.FindObjectsOfType().ToList() - .Find(console => console.name == "panel_nav"); - } - - if (Vitals == null) - { - Vitals = Object.FindObjectsOfType().ToList() - .Find(console => console.name == "panel_vitals"); - } - - if (DvdScreenOffice == null) - { - GameObject DvdScreenAdmin = Object.FindObjectsOfType().ToList() - .Find(o => o.name == "dvdscreen"); - - if (DvdScreenAdmin != null) - { - DvdScreenOffice = Object.Instantiate(DvdScreenAdmin); - } - } - - if (TempCold == null) - { - TempCold = Object.FindObjectsOfType().ToList() - .Find(console => console.name == "panel_tempcold"); - } - - IsObjectsFetched = WifiConsole != null && NavConsole != null && Vitals != null && - DvdScreenOffice != null && TempCold != null; - } - - // ------------------- - // - Map Adjustments - - // ------------------- - - public static void AdjustVents() - { - if (IsVentsFetched) - { - ElectricBuildingVent.Left = ElectricalVent; - ElectricalVent.Center = ElectricBuildingVent; - - ScienceBuildingVent.Left = StorageVent; - StorageVent.Center = ScienceBuildingVent; - } - else - { - BetterPolusPlugin.log.LogError("Couldn't adjust Vents as not all objects have been fetched."); - } - } - - public static void MoveTempCold() - { - if (TempCold.transform.position != TempColdNewPos) - { - Transform tempColdTransform = TempCold.transform; - tempColdTransform.parent = Outside.transform; - tempColdTransform.position = TempColdNewPos; - - // Fixes collider being too high - BoxCollider2D collider = TempCold.GetComponent(); - collider.isTrigger = false; - collider.size += new Vector2(0f, -0.3f); - } - } - - public static void SwitchNavWifi() - { - if (WifiConsole.transform.position != WifiNewPos) - { - Transform wifiTransform = WifiConsole.transform; - wifiTransform.parent = DropShip.transform; - wifiTransform.position = WifiNewPos; - } - - if (NavConsole.transform.position != NavNewPos) - { - Transform navTransform = NavConsole.transform; - navTransform.parent = Comms.transform; - navTransform.position = NavNewPos; - - // Prevents crewmate being able to do the task from outside - NavConsole.checkWalls = true; - } - } - - public static void MoveVitals() - { - if (Vitals.transform.position != VitalsNewPos) - { - // Vitals - Transform vitalsTransform = Vitals.gameObject.transform; - vitalsTransform.parent = Science.transform; - vitalsTransform.position = VitalsNewPos; - } - - if (DvdScreenOffice.transform.position != DvdScreenNewPos) - { - // DvdScreen - Transform dvdScreenTransform = DvdScreenOffice.transform; - dvdScreenTransform.position = DvdScreenNewPos; - - var localScale = dvdScreenTransform.localScale; - localScale = - new Vector3(DvdScreenNewScale, localScale.y, - localScale.z); - dvdScreenTransform.localScale = localScale; - } - } - } -} \ No newline at end of file diff --git a/README.md b/README.md index 5761d81..b26e441 100644 --- a/README.md +++ b/README.md @@ -86,18 +86,28 @@ There are two ways to install the mod : 5. Run the game. The mod should be installed and it should work. ## Releases - | Among Us Version | Mod Version | All-in-one pack | DLL file | - |-------------| ----------- | :-------------: | :------: | - | v2023.6.13+ | Ver. 1.2.0be670 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.2.0/BetterPolus_All-in-one-Pack-1.2.0be670.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.2.0/BetterPolus.dll)** | - | v2022.10.25+ | Ver. 1.2.0 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.2.0/BetterPolus_All-in-one-Pack-1.2.0.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.2.0/BetterPolus.dll)** | - | v2021.11.9.5+ | Ver. 1.1.4 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1.4/BetterPolus_All-in-one-Pack-1.1.4.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1.4/BetterPolus-1.1.4.dll)** | - | v2021.6.30 | Ver. 1.1.3 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1.3/BetterPolus_All-in-one-Pack-1.1.3.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1.3/BetterPolus-1.1.3.dll)** | - | v2021.3.31.3 | Ver. 1.1.2 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1.2/BetterPolus_All-in-one-Pack-1.1.2.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1.2/BetterPolus-2021.3.31.3s.dll)** | - | v2021.3.5s | Ver. 1.1.1 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1.1/BetterPolus_All-in-one-Pack-1.1.1.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1.1/BetterPolus-2021.3.5s.dll)** | - | v2020.12.9s | Ver. 1.1 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1/BetterPolus_All-in-one-Pack-1.1.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1/BetterPolus-2020.12.9s.dll)** | - | v2020.12.9s | Ver. 1.0 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.0.0/BetterPolus_All-in-one-Pack.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.0.0/BetterPolus-2020.12.9s.dll)** | + | Among Us Version | Mod Version | All-in-one pack | DLL file | + |------------------|-----------------|:---------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------:| + | v2023.7.12+ | Ver. 1.2.1 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.2.1/BetterPolus_All-in-one-Pack-1.2.1.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.2.1/BetterPolus.dll)** | + | v2023.6.13+ | Ver. 1.2.0be670 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.2.0/BetterPolus_All-in-one-Pack-1.2.0be670.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.2.0/BetterPolus.dll)** | + | v2022.10.25+ | Ver. 1.2.0 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.2.0/BetterPolus_All-in-one-Pack-1.2.0.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.2.0/BetterPolus.dll)** | + | v2021.11.9.5+ | Ver. 1.1.4 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1.4/BetterPolus_All-in-one-Pack-1.1.4.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1.4/BetterPolus-1.1.4.dll)** | + | v2021.6.30 | Ver. 1.1.3 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1.3/BetterPolus_All-in-one-Pack-1.1.3.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1.3/BetterPolus-1.1.3.dll)** | + | v2021.3.31.3 | Ver. 1.1.2 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1.2/BetterPolus_All-in-one-Pack-1.1.2.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1.2/BetterPolus-2021.3.31.3s.dll)** | + | v2021.3.5s | Ver. 1.1.1 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1.1/BetterPolus_All-in-one-Pack-1.1.1.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1.1/BetterPolus-2021.3.5s.dll)** | + | v2020.12.9s | Ver. 1.1 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1/BetterPolus_All-in-one-Pack-1.1.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1/BetterPolus-2020.12.9s.dll)** | + | v2020.12.9s | Ver. 1.0 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.0.0/BetterPolus_All-in-one-Pack.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.0.0/BetterPolus-2020.12.9s.dll)** | ### Changelog +
+ Version 1.2.1 +
    +
  • Added compatibility with Among Us v2023.7.12s
  • +
  • Seismic Stabilizers Sabotage duration is customizable in config file (40s by default)
  • +
  • Polus map modifications can be disabled in config file (enabled by default)
  • +
  • The names of tasks room that have been moved appear correctly
  • +
+
Version 1.2.0
    @@ -175,7 +185,7 @@ There are two ways to install the mod : ## Q&A **How do I know if BetterPolus is correctly installed?**
    -Just check that there is a line saying that BetterPolus has been loaded in the top left of the main menu. +Just check that there is a line saying that BetterPolus has been loaded in the bottom left of the main menu. **Does this works with (Better-)CrewLink (Proximity Chat)?**
    Of course!