Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/CrowdedMod/CrowdedMod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Version>2.10.0</Version>
<Version>2.11.0</Version>
<Authors>CrowdedMods, andry08</Authors>

<LangVersion>latest</LangVersion>
Expand All @@ -11,15 +11,15 @@
</PropertyGroup>
<PropertyGroup>
<GamePlatform Condition="'$(GamePlatform)' == ''">Steam</GamePlatform>
<GameVersion>2024.9.4</GameVersion>
<GameVersion>2025.9.9</GameVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Reactor" Version="2.3.1" />
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.679" />
<PackageReference Include="Reactor" Version="2.4.0-ci.344" />
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.735" />
<PackageReference Include="AmongUs.GameLibs.$(GamePlatform)" Version="$(GameVersion)" PrivateAssets="all" />

<PackageReference Include="BepInEx.AutoPlugin" Version="1.1.0" PrivateAssets="all" />
<PackageReference Include="BepInEx.IL2CPP.MSBuild" Version="2.0.1" PrivateAssets="all" />
<PackageReference Include="BepInEx.IL2CPP.MSBuild" Version="2.1.0-rc.1" PrivateAssets="all" />
</ItemGroup>

<Target Name="Copy" AfterTargets="Build" Condition="'$(AmongUs)' != ''">
Expand Down
3 changes: 1 addition & 2 deletions src/CrowdedMod/CrowdedModPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ namespace CrowdedMod;
[BepInAutoPlugin("xyz.crowdedmods.crowdedmod")]
[BepInProcess("Among Us.exe")]
[BepInDependency(ReactorPlugin.Id)]
[ReactorModFlags(ModFlags.RequireOnAllClients)]
[BepInDependency("gg.reactor.debugger", BepInDependency.DependencyFlags.SoftDependency)]
public partial class CrowdedModPlugin : BasePlugin
{
public const int MaxPlayers = 254; // allegedly. should stick to 127 tho
public const int MaxPlayers = 255; // allegedly. should stick to 127 tho
public const int MaxImpostors = MaxPlayers / 2;

public static bool ForceDisableFreeColor { get; set; } = false;
Expand Down
188 changes: 0 additions & 188 deletions src/CrowdedMod/Patches/CreateGameOptionsPatches.cs

This file was deleted.

13 changes: 11 additions & 2 deletions src/CrowdedMod/Patches/GenericPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ public static bool Prefix(PlayerTab __instance)

// I did not find a use of this method, but still patching for future updates
// maxExpectedPlayers is unknown, looks like server code tbh
[HarmonyPatch(typeof(GameOptionsData), nameof(GameOptionsData.AreInvalid))]
[HarmonyPatch(typeof(LegacyGameOptions), nameof(LegacyGameOptions.AreInvalid))]
public static class InvalidOptionsPatches
{
public static bool Prefix(GameOptionsData __instance, [HarmonyArgument(0)] int maxExpectedPlayers)
public static bool Prefix(LegacyGameOptions __instance, [HarmonyArgument(0)] int maxExpectedPlayers)
{
return __instance.MaxPlayers > maxExpectedPlayers ||
__instance.NumImpostors < 1 ||
Expand Down Expand Up @@ -112,6 +112,15 @@ public static void Prefix(GameStartManager __instance)
}
}

[HarmonyPostfix]
[HarmonyPatch(typeof(CreateGameOptions), nameof(CreateGameOptions.Show))]
public static void CreateGameOptionsShowPostfix(CreateGameOptions __instance) {
var numberOption = __instance.gameObject.GetComponentInChildren<NumberOption>(true);
if (numberOption != null) {
numberOption.ValidRange.max = CrowdedModPlugin.MaxPlayers;
}
}

public static void Postfix(GameStartManager __instance)
{
if (string.IsNullOrEmpty(fixDummyCounterColor) ||
Expand Down