mirror of
https://github.com/Brybry16/BetterPolus.git
synced 2026-10-20 11:39:38 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c146466a56 | ||
|
|
ef4991efcc | ||
|
|
036922e884 | ||
|
|
6384dab6fb | ||
|
|
25c7e6fcfb | ||
|
|
625bd71063 | ||
|
|
6e362617c1 | ||
|
|
c3ec98d024 | ||
|
|
fc638835a0 | ||
|
|
da82e1066e | ||
|
|
197163893f | ||
|
|
0efbce9fb4 |
No files matched your search
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>1.2.1</Version>
|
||||
<Version>1.2.3</Version>
|
||||
|
||||
<Description>An Among Us mod that tweaks Polus, allowing a more balanced experience.</Description>
|
||||
<Authors>Brybry</Authors>
|
||||
@@ -10,8 +10,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2023.7.11" />
|
||||
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.672" />
|
||||
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2025.11.18" />
|
||||
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.697" />
|
||||
<PackageReference Include="BepInEx.IL2CPP.MSBuild" Version="2.1.0-rc.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
||||
@@ -12,21 +12,21 @@ 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 const string Version = "1.2.3";
|
||||
|
||||
public Harmony Harmony { get; } = new Harmony(Id);
|
||||
public static ManualLogSource log;
|
||||
private Harmony Harmony { get; } = new(Id);
|
||||
public static ManualLogSource Logger { get; private set; }
|
||||
public static ConfigEntry<bool> Enabled { get; private set; }
|
||||
public static ConfigEntry<float> ReactorCountdown { get; private set; }
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
log = Log;
|
||||
Logger = 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");
|
||||
Logger.LogMessage($"{Name} loaded");
|
||||
|
||||
Harmony.PatchAll();
|
||||
}
|
||||
|
||||
@@ -1,18 +1,42 @@
|
||||
using HarmonyLib;
|
||||
using Hazel;
|
||||
using Il2CppSystem;
|
||||
|
||||
namespace BetterPolus.Patches;
|
||||
|
||||
[HarmonyPatch(typeof(ReactorSystemType))]
|
||||
public static class ReactorSystemTypePatches
|
||||
{
|
||||
[HarmonyPatch(nameof(ReactorSystemType.RepairDamage))]
|
||||
[HarmonyPatch(nameof(ReactorSystemType.UpdateSystem))]
|
||||
[HarmonyPrefix]
|
||||
private static bool RepairDamagePrefix(ReactorSystemType __instance, PlayerControl player, byte opCode)
|
||||
private static bool UpdateSystemPrefix(ReactorSystemType __instance, PlayerControl player, MessageReader msgReader)
|
||||
{
|
||||
if (ShipStatus.Instance.Type != ShipStatus.MapType.Pb || opCode != 128 || __instance.IsActive) return true;
|
||||
|
||||
__instance.Countdown = BetterPolusPlugin.ReactorCountdown.Value;
|
||||
__instance.UserConsolePairs.Clear();
|
||||
var self = msgReader.ReadByte();
|
||||
var num = self & 3;
|
||||
if (self == 128 && !__instance.IsActive)
|
||||
{
|
||||
__instance.Countdown = ShipStatus.Instance.Type != ShipStatus.MapType.Pb
|
||||
? __instance.ReactorDuration
|
||||
: BetterPolusPlugin.ReactorCountdown.Value;
|
||||
__instance.UserConsolePairs.Clear();
|
||||
}
|
||||
else if (self == 16)
|
||||
{
|
||||
__instance.Countdown = 10000f;
|
||||
}
|
||||
else if (self.HasAnyBit(64))
|
||||
{
|
||||
__instance.UserConsolePairs.Add(new Tuple<byte, byte>(player.PlayerId, (byte) num));
|
||||
if (__instance.UserCount >= 2)
|
||||
{
|
||||
__instance.Countdown = 10000f;
|
||||
}
|
||||
}
|
||||
else if (self.HasAnyBit(32))
|
||||
{
|
||||
__instance.UserConsolePairs.Remove(new Tuple<byte, byte>(player.PlayerId, (byte) num));
|
||||
}
|
||||
|
||||
__instance.IsDirty = true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -74,7 +74,7 @@ public static class ShipStatusPatches
|
||||
}
|
||||
else
|
||||
{
|
||||
BetterPolusPlugin.log.LogError("Couldn't move elements as not all of them have been fetched.");
|
||||
BetterPolusPlugin.Logger.LogError("Couldn't move elements as not all of them have been fetched.");
|
||||
}
|
||||
|
||||
AdjustVents();
|
||||
@@ -123,7 +123,7 @@ public static class ShipStatusPatches
|
||||
|
||||
if (DropShip == null)
|
||||
{
|
||||
DropShip = Object.FindObjectsOfType<GameObject>().ToList().Find(o => o.name == "Dropship");
|
||||
DropShip = GameObject.Find("PolusShip(Clone)")?.transform?.FindChild("Dropship")?.gameObject;
|
||||
}
|
||||
|
||||
if (Outside == null)
|
||||
@@ -196,7 +196,7 @@ public static class ShipStatusPatches
|
||||
}
|
||||
else
|
||||
{
|
||||
BetterPolusPlugin.log.LogError("Couldn't adjust Vents as not all objects have been fetched.");
|
||||
BetterPolusPlugin.Logger.LogError("Couldn't adjust Vents as not all objects have been fetched.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ An Among Us mod that tweaks Polus, allowing a more balanced experience.
|
||||
## Technology
|
||||
The game is patched at runtime via **[BepInEx Bleeding Edge](https://github.com/BepInEx/BepInEx)** and no game file is actually altered.
|
||||
|
||||
For the moment, this mod supports **Among Us v2022.10.25**.
|
||||
For the moment, this mod supports **Among Us v2023.10.24**.
|
||||
|
||||
## Installation
|
||||
For a better experience, every player in your lobby should download BetterPolus. You *can* play with people that don't have the mod installed but keep in mind that they won't see the same things as you (for example Vitals location).
|
||||
@@ -88,6 +88,8 @@ There are two ways to install the mod :
|
||||
## Releases
|
||||
| Among Us Version | Mod Version | All-in-one pack | DLL file |
|
||||
|------------------|-----------------|:---------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------:|
|
||||
| v2025.11.18+ | Ver. 1.2.3 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.2.3/BetterPolus_All-in-one-Pack-1.2.3.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.2.3/BetterPolus.dll)** |
|
||||
| v2023.10.24+ | Ver. 1.2.2 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.2.2/BetterPolus_All-in-one-Pack-1.2.2.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.2.2/BetterPolus.dll)** |
|
||||
| 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)** |
|
||||
@@ -99,6 +101,18 @@ There are two ways to install the mod :
|
||||
| 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
|
||||
<details>
|
||||
<summary>Version 1.2.3</summary>
|
||||
<ul>
|
||||
<li>Fixed a bug causing the "Reboot Wifi" task to not being moved correctly to Dropship.</li>
|
||||
</ul>
|
||||
</details>
|
||||
<details>
|
||||
<summary>Version 1.2.2</summary>
|
||||
<ul>
|
||||
<li>Added compatibility with Among Us v2023.10.24</li>
|
||||
</ul>
|
||||
</details>
|
||||
<details>
|
||||
<summary>Version 1.2.1</summary>
|
||||
<ul>
|
||||
|
||||
Reference in new issue
Block a user