mirror of
https://github.com/MoltenMods/Unify.git
synced 2026-10-19 17:56:57 +00:00
Revert "Modified mod to remove Reactor as a dependency"
This commit is contained in:
1 parent
5668255792
commit
6d18d01eb9
6 files changed
+67
-59
No files matched your search
+18
-3
@@ -3,6 +3,7 @@
|
|||||||
# Table of Contents
|
# Table of Contents
|
||||||
- [Locating the Among Us game files directory](#locating-the-among-us-game-files-directory)
|
- [Locating the Among Us game files directory](#locating-the-among-us-game-files-directory)
|
||||||
- [Installing BepInEx](#installing-bepinex)
|
- [Installing BepInEx](#installing-bepinex)
|
||||||
|
- [Installing Reactor](#installing-reactor)
|
||||||
|
|
||||||
## Locating the Among Us game files directory
|
## Locating the Among Us game files directory
|
||||||
|
|
||||||
@@ -34,9 +35,9 @@ library then selecting `Manage > Browse local files`.
|
|||||||
└── winhttp.dll
|
└── winhttp.dll
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Launch the game so that BepInEx can generate the necessary files
|
3. Launch the game so that BepInEx can generate the necessary files,
|
||||||
(this may take a while), then close the game after. The Among Us game
|
then close the game after. The Among Us game files should now look
|
||||||
files should now look something like this:
|
something like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
.
|
.
|
||||||
@@ -60,3 +61,17 @@ library then selecting `Manage > Browse local files`.
|
|||||||
├── UnityPlayer.dll
|
├── UnityPlayer.dll
|
||||||
└── winhttp.dll
|
└── winhttp.dll
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Installing Reactor
|
||||||
|
|
||||||
|
1. Go to the
|
||||||
|
[Reactor CI](https://github.com/NuclearPowered/Reactor/actions)
|
||||||
|
page.
|
||||||
|
2. Click on the top workflow run.
|
||||||
|
3. Download the `Reactor.dll` artifact.
|
||||||
|
4. Move the `Reactor.dll` file to the
|
||||||
|
`(Among Us game files)/BepInEx/plugins` folder.
|
||||||
|
5. Launch the game. The top left of the game menu should look
|
||||||
|
something like this:
|
||||||
|
|
||||||
|

|
||||||
@@ -22,11 +22,17 @@ The following regions have been added:
|
|||||||
|
|
||||||
> **⚠ WARNING**
|
> **⚠ WARNING**
|
||||||
>
|
>
|
||||||
> This mod only has compiled releases for the steam release of the game.
|
> This mod is only compatible with the steam release of the game.
|
||||||
|
|
||||||
> This mod requires you to have BepInEx installed. You can install BepInEx by following [this guide](INSTALLATION.md).
|
> This mod requires you to have BepInEx and Reactor installed. You can install BepInEx and Reactor by following [this guide](INSTALLATION.md) or by following the steps on the
|
||||||
|
> following two pages: https://docs.reactor.gg/docs/basic/install_bepinex and https://docs.reactor.gg/docs/basic/install_reactor.
|
||||||
|
|
||||||
1. Ensure that BepInEx is installed (more information above).
|
> If you are still using 2020.12.9s and Reactor fails to load, try using the Reactor version located
|
||||||
|
> here: https://github.com/NuclearPowered/Reactor/actions/runs/593649307.
|
||||||
|
|
||||||
|
> If you are using 2021.3.5s and Reactor fails to load, ensure you have the latest version of Reactor installed.
|
||||||
|
|
||||||
|
1. Ensure that BepInEx and Reactor are installed (more information above).
|
||||||
2. Download the latest mod on the [releases](https://github.com/DaemonBeast/Unify/releases) page.
|
2. Download the latest mod on the [releases](https://github.com/DaemonBeast/Unify/releases) page.
|
||||||
3. Move the mod to the `(Among Us game files)/BepInEx/plugins` folder.
|
3. Move the mod to the `(Among Us game files)/BepInEx/plugins` folder.
|
||||||
4. Launch the game.
|
4. Launch the game.
|
||||||
|
|||||||
+11
-19
@@ -1,7 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using BepInEx.Configuration;
|
using BepInEx.Configuration;
|
||||||
using HarmonyLib;
|
|
||||||
using UnityEngine;
|
|
||||||
using Array = System.Array;
|
using Array = System.Array;
|
||||||
using String = System.String;
|
using String = System.String;
|
||||||
|
|
||||||
@@ -9,15 +7,23 @@ namespace Unify.Patches
|
|||||||
{
|
{
|
||||||
public static class RegionsPatch
|
public static class RegionsPatch
|
||||||
{
|
{
|
||||||
private static readonly IRegionInfo[] NewRegions = new IRegionInfo[]
|
private static IRegionInfo[] _newRegions = new IRegionInfo[]
|
||||||
{
|
{
|
||||||
new DnsRegionInfo("192.241.154.115", "skeld.net", StringNames.NoTranslation, "192.241.154.115")
|
new DnsRegionInfo("192.241.154.115", "skeld.net", StringNames.NoTranslation, "192.241.154.115")
|
||||||
.Duplicate(),
|
.Duplicate(),
|
||||||
new DnsRegionInfo("localhost", "localhost", StringNames.NoTranslation, "127.0.0.1")
|
new DnsRegionInfo("localhost", "localhost", StringNames.NoTranslation, "127.0.0.1")
|
||||||
.Duplicate()
|
.Duplicate()
|
||||||
};
|
};
|
||||||
private static readonly IRegionInfo[] CustomRegions = MergeRegions(NewRegions, LoadCustomUserRegions());
|
private static IRegionInfo[] _customRegions = MergeRegions(_newRegions, LoadCustomUserRegions());
|
||||||
private static readonly IRegionInfo[] PatchedRegions = MergeRegions(ServerManager.DefaultRegions, CustomRegions);
|
|
||||||
|
public static void Patch()
|
||||||
|
{
|
||||||
|
IRegionInfo[] patchedRegions = MergeRegions(ServerManager.DefaultRegions, _customRegions);
|
||||||
|
|
||||||
|
ServerManager.DefaultRegions = patchedRegions;
|
||||||
|
ServerManager.Instance.AvailableRegions = patchedRegions;
|
||||||
|
ServerManager.Instance.SaveServers();
|
||||||
|
}
|
||||||
|
|
||||||
private static IRegionInfo[] MergeRegions(IRegionInfo[] oldRegions, IRegionInfo[] newRegions)
|
private static IRegionInfo[] MergeRegions(IRegionInfo[] oldRegions, IRegionInfo[] newRegions)
|
||||||
{
|
{
|
||||||
@@ -50,19 +56,5 @@ namespace Unify.Patches
|
|||||||
|
|
||||||
return customRegions.ToArray();
|
return customRegions.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPatch(typeof(ServerManager), nameof(ServerManager.Awake))]
|
|
||||||
public static class AddRegionsPatch
|
|
||||||
{
|
|
||||||
public static void Prefix(ServerManager __instance)
|
|
||||||
{
|
|
||||||
ServerManager.DefaultRegions = PatchedRegions;
|
|
||||||
|
|
||||||
// ServerManager.AvailableRegions
|
|
||||||
__instance.JIJNOHCGPHM = PatchedRegions;
|
|
||||||
|
|
||||||
__instance.SaveServers();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+5
-1
@@ -3,17 +3,19 @@ using BepInEx;
|
|||||||
using BepInEx.Configuration;
|
using BepInEx.Configuration;
|
||||||
using BepInEx.IL2CPP;
|
using BepInEx.IL2CPP;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
|
using Reactor;
|
||||||
using Unify.Patches;
|
using Unify.Patches;
|
||||||
|
|
||||||
namespace Unify
|
namespace Unify
|
||||||
{
|
{
|
||||||
[BepInPlugin(Id, Name, Version)]
|
[BepInPlugin(Id, Name, Version)]
|
||||||
[BepInProcess("Among Us.exe")]
|
[BepInProcess("Among Us.exe")]
|
||||||
|
[BepInDependency(ReactorPlugin.Id)]
|
||||||
public class UnifyPlugin : BasePlugin
|
public class UnifyPlugin : BasePlugin
|
||||||
{
|
{
|
||||||
public const string Id = "daemon.unify.reactor";
|
public const string Id = "daemon.unify.reactor";
|
||||||
private const string Name = "Unify";
|
private const string Name = "Unify";
|
||||||
private const string Version = "2.0.2";
|
private const string Version = "2.0.1";
|
||||||
|
|
||||||
public static readonly ConfigFile ConfigFile =
|
public static readonly ConfigFile ConfigFile =
|
||||||
new ConfigFile(Path.Combine(Paths.ConfigPath, $"{UnifyPlugin.Id}.cfg"), true);
|
new ConfigFile(Path.Combine(Paths.ConfigPath, $"{UnifyPlugin.Id}.cfg"), true);
|
||||||
@@ -22,6 +24,8 @@ namespace Unify
|
|||||||
|
|
||||||
public override void Load()
|
public override void Load()
|
||||||
{
|
{
|
||||||
|
RegionsPatch.Patch();
|
||||||
|
|
||||||
Harmony.PatchAll();
|
Harmony.PatchAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+24
-33
@@ -1,45 +1,36 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.1</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<Version>2.0.2</Version>
|
<Version>2.0.1</Version>
|
||||||
<GameVersion>2021.3.5s</GameVersion>
|
<Mappings>NuclearPowered/Mappings:0.2.0</Mappings>
|
||||||
|
|
||||||
<Description>Region mod</Description>
|
<Description>Region mod for Reactor</Description>
|
||||||
<Authors>Daemon</Authors>
|
<Authors>Daemon</Authors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup Condition="'$(GamePlatform)' == 'Steam'">
|
||||||
<TargetName>$(AssemblyName)-$(GameVersion)</TargetName>
|
<GameVersion>2021.3.5s</GameVersion>
|
||||||
|
<DefineConstants>$(DefineConstants);STEAM</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(GamePlatform)' == 'Itch'">
|
||||||
|
<GameVersion>2021.11.17i</GameVersion>
|
||||||
|
<DefineConstants>$(DefineConstants);ITCH</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="0Harmony, Version=2.3.1.0, Culture=neutral, PublicKeyToken=null">
|
<Deobfuscate Include="$(AmongUs)\BepInEx\plugins\Reactor-$(GameVersion).dll" />
|
||||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\core\0Harmony.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Assembly-CSharp, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
|
||||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Assembly-CSharp.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="BepInEx.Core, Version=6.0.0.16, Culture=neutral, PublicKeyToken=null">
|
|
||||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\core\BepInEx.Core.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="BepInEx.IL2CPP, Version=6.0.0.16, Culture=neutral, PublicKeyToken=null">
|
|
||||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\core\BepInEx.IL2CPP.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Il2Cppmscorlib, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
|
||||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2Cppmscorlib.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="UnhollowerBaseLib, Version=0.4.14.0, Culture=neutral, PublicKeyToken=null">
|
|
||||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\core\UnhollowerBaseLib.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
|
|
||||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unity-libs\UnityEngine.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="UnityEngine.CoreModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
|
||||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.CoreModule.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="Copy" AfterTargets="AfterBuild">
|
<ItemGroup>
|
||||||
<Copy SourceFiles="$(OutputPath)/$(TargetName).dll" DestinationFolder="../build" />
|
<PackageReference Include="Reactor.OxygenFilter.MSBuild" Version="0.2.9">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Target Name="Copy" AfterTargets="Reobfuscate">
|
||||||
|
<Copy SourceFiles="$(OutputPath)reobfuscated/$(AssemblyName)-$(GameVersion).dll" DestinationFolder="$(AmongUs)/BepInEx/plugins/" />
|
||||||
|
<Copy SourceFiles="$(OutputPath)reobfuscated/$(AssemblyName)-$(GameVersion).dll" DestinationFolder="../build/" />
|
||||||
</Target>
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
Binary file not shown.
Reference in new issue
Block a user