mirror of
https://github.com/Brybry16/BetterPolus.git
synced 2026-10-19 15:51:40 +00:00
Fix Reactor sabotage buffed (60s -> 40s); Updated the mod to be compatible with the latest versions of BepInEx BE and .net6.0 (this breaks backwards compatibility)
This commit is contained in:
1 parent
47e7dec597
commit
ba8edb7ef6
3 files changed
+48
-24
No files matched your search
@@ -1,25 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Version>1.1.4</Version>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>1.1.6</Version>
|
||||
|
||||
<Description>An Among Us mod that tweaks Polus, allowing a more balanced experience.</Description>
|
||||
<Authors>Brybry</Authors>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="$(AmongUs)\BepInEx\core\*.dll">
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
|
||||
<Reference Include="$(AmongUs)\BepInEx\unhollowed\*.dll">
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
|
||||
<Reference Remove="$(AmongUs)\BepInEx\unhollowed\netstandard.dll;$(AmongUs)\BepInEx\unhollowed\Newtonsoft.Json.dll" />
|
||||
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2022.10.25" />
|
||||
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.662" />
|
||||
<PackageReference Include="BepInEx.IL2CPP.MSBuild" Version="2.0.1" />
|
||||
<PackageReference Include="Reactor" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Copy" AfterTargets="Build">
|
||||
<Copy SourceFiles="$(OutputPath)$(AssemblyName).dll" DestinationFiles="$(AmongUs)/BepInEx/plugins/$(AssemblyName)-$(Version).dll" />
|
||||
<Copy SourceFiles="$(OutputPath)$(AssemblyName).dll" DestinationFiles="$(AmongUs)/BepInEx/plugins/$(AssemblyName).dll" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -1,9 +1,7 @@
|
||||
using BepInEx;
|
||||
using BepInEx.IL2CPP;
|
||||
using BepInEx.Logging;
|
||||
using HarmonyLib;
|
||||
using System;
|
||||
using UnityEngine.SceneManagement;
|
||||
using BepInEx.Unity.IL2CPP;
|
||||
|
||||
namespace BetterPolus
|
||||
{
|
||||
@@ -13,7 +11,7 @@ namespace BetterPolus
|
||||
{
|
||||
public const string Id = "ch.brybry.betterpolus";
|
||||
public const string Name = "BetterPolus Mod";
|
||||
public const string Version = "1.1.4";
|
||||
public const string Version = "1.1.6";
|
||||
|
||||
public Harmony Harmony { get; } = new Harmony(Id);
|
||||
public static ManualLogSource log;
|
||||
@@ -22,12 +20,7 @@ namespace BetterPolus
|
||||
{
|
||||
log = Log;
|
||||
|
||||
log.LogMessage("BetterPolus Mod loaded");
|
||||
|
||||
SceneManager.add_sceneLoaded((Action<Scene, LoadSceneMode>) ((scene, loadSceneMode) =>
|
||||
{
|
||||
ModManager.Instance.ShowModStamp();
|
||||
}));
|
||||
log.LogMessage($"{Name} loaded");
|
||||
|
||||
Harmony.PatchAll();
|
||||
}
|
||||
@@ -37,7 +30,17 @@ namespace BetterPolus
|
||||
{
|
||||
public static void Postfix(VersionShower __instance)
|
||||
{
|
||||
__instance.text.text += " + <color=#5E4CA6FF>BetterPolus v1.1.4</color> by Brybry";
|
||||
__instance.text.text += $" + <color=#5E4CA6FF>BetterPolus v{Version}</color> by Brybry";
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(AmongUsClient), nameof(AmongUsClient.Awake))]
|
||||
public static class ModStampPatch
|
||||
{
|
||||
[HarmonyPrefix]
|
||||
public static void Prefix()
|
||||
{
|
||||
DestroyableSingleton<ModManager>.Instance.ShowModStamp();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
//*
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
//*/
|
||||
Reference in new issue
Block a user