mirror of
https://github.com/MoltenMods/Unify.git
synced 2026-10-20 21:36:05 +00:00
Compare commits
24
Commits
3.0.0-pre.1
...
2021
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5cdf781cfa | ||
|
|
3c5dc2566a | ||
|
|
3feb94b45d | ||
|
|
7b4a916d84 | ||
|
|
9c70216a9f | ||
|
|
a16eb79973 | ||
|
|
f0010bf13e | ||
|
|
1e7bc25ba8 | ||
|
|
d5de86c1e8 | ||
|
|
7c1e2533b2 | ||
|
|
1da6af54a9 | ||
|
|
e26fbccdb9 | ||
|
|
6f8a657fd0 | ||
|
|
5a4d501b9e | ||
|
|
ea4be527b7 | ||
|
|
6f266f7f93 | ||
|
|
1f5736c7f8 | ||
|
|
6df20f83c8 | ||
|
|
4c8866a33e | ||
|
|
fd5a11394a | ||
|
|
5b63d7cd0c | ||
|
|
76a25f8107 | ||
|
|
339f4f2c33 | ||
|
|
ec7eda2fa7 |
No files matched your search
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ContentModelUserStore">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
|
||||
@@ -1,19 +1,9 @@
|
||||
> **⚠ WARNING**
|
||||
>
|
||||
> Impostor currently doesn't support the 2021.3.31.3s release of the
|
||||
> game, so custom servers will give an outdated error when you try to
|
||||
> connect. The 3.0.0-pre.1 release of Unify doesn't use Reactor, since
|
||||
> Reactor is currently outdated and Unify will not actually work until
|
||||
> Impostor has been updated to support the 2021.3.31.3s release of the
|
||||
> game. A new stable version of Unify will be released once Reactor is
|
||||
> up-to-date, but it should be functional with or without Reactor once
|
||||
> Impostor is up-to-date.
|
||||
|
||||
# Unify
|
||||
|
||||
An Among Us mod to add extra regions to the regions menu.
|
||||
An Among Us mod to add extra regions to the region menu.
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
# Table of Contents
|
||||
- [Features](#features)
|
||||
@@ -26,6 +16,15 @@ The following regions have been added:
|
||||
- [skeld.net](https://skeld.net/)
|
||||
- localhost *(for playing on a server running on your computer)*
|
||||
- matux.fr
|
||||
- Przebot (may be unreliable or outdated)
|
||||
|
||||
Regions can be connected to directly using an IP address.
|
||||
|
||||
Custom regions can be added as detailed below in the
|
||||
[configuration](#configuration) section.
|
||||
|
||||
Other mods can add regions via the
|
||||
`AddRegion(string name, string ip, ushort port)` API method.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -33,16 +32,16 @@ The following regions have been added:
|
||||
>
|
||||
> This mod only has compiled releases for the steam release of the game.
|
||||
|
||||
> 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.
|
||||
|
||||
> 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.
|
||||
> If you are still using 2021.3.5s and Reactor fails to load, try using the Reactor version located
|
||||
> here: https://github.com/NuclearPowered/Reactor/actions/runs/636023321.
|
||||
|
||||
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.
|
||||
1. Ensure that BepInEx and Reactor (Reactor is not required for pre releases) are installed
|
||||
([installation guide](INSTALLATION.md)).
|
||||
2. Download the latest mod on the [releases](https://github.com/DaemonBeast/Unify/releases) page
|
||||
for the version of Among Us you are using.
|
||||
3. Move the mod to the `(Among Us game files)/BepInEx/plugins` folder.
|
||||
4. Launch the game.
|
||||
|
||||
@@ -56,13 +55,13 @@ The following regions have been added:
|
||||
> file creates itself.
|
||||
|
||||
The configuration file is located at
|
||||
`(Among Us game files)/BepInEx/config/daemon.unify.reactor.cfg`.
|
||||
`(Among Us game files)/BepInEx/config/daemon.unify.cfg`.
|
||||
|
||||
### Custom regions
|
||||
|
||||
Custom regions can be added by modifying the `[Region 1]`,
|
||||
`[Region 2]` ... `[Region 5]` sections of the configuration file.
|
||||
The sections allow you to modify the display name of the region and
|
||||
the IP address of the region.
|
||||
`[Region 2]` ... `[Region 9]` sections of the configuration file.
|
||||
You can modify the display name of the region,
|
||||
the IP address of the region and the port of the region.
|
||||
|
||||
If the IP field is left empty, the region will not show up in game.
|
||||
@@ -0,0 +1,125 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Reactor.Extensions;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace Unify.Controls
|
||||
{
|
||||
public class Button
|
||||
{
|
||||
private static readonly TaskCompletionSource<bool> Initialized = new TaskCompletionSource<bool>();
|
||||
private static GameObject _instance;
|
||||
|
||||
private readonly SpriteRenderer _spriteRenderer;
|
||||
private readonly BoxCollider2D _boxCollider2D;
|
||||
|
||||
public GameObject GameObject { get; }
|
||||
public TextMeshPro Text { get; }
|
||||
public Vector2 Size
|
||||
{
|
||||
get => _spriteRenderer.size;
|
||||
set
|
||||
{
|
||||
Text.rectTransform.sizeDelta = value;
|
||||
_spriteRenderer.size = value;
|
||||
_boxCollider2D.size = value;
|
||||
}
|
||||
}
|
||||
public AspectPosition Position { get; }
|
||||
public UnityEngine.UI.Button.ButtonClickedEvent OnClick { get; }
|
||||
|
||||
private Button(string text)
|
||||
{
|
||||
GameObject = Object.Instantiate(_instance).DontDestroy();
|
||||
|
||||
Text = GameObject.GetComponentInChildren<TextMeshPro>();
|
||||
Position = GameObject.GetComponent<AspectPosition>();
|
||||
OnClick = GameObject.GetComponent<PassiveButton>().OnClick;
|
||||
_spriteRenderer = GameObject.GetComponent<SpriteRenderer>();
|
||||
_boxCollider2D = GameObject.GetComponent<BoxCollider2D>();
|
||||
|
||||
var size = new Vector2(Text.preferredWidth, Text.preferredHeight);
|
||||
|
||||
Text.text = text;
|
||||
Text.rectTransform.sizeDelta = size;
|
||||
Position.DistanceFromEdge =
|
||||
new Vector3(Text.preferredWidth / 2f + 0.1f, Text.preferredHeight / 2f + 0.1f, -100f);
|
||||
_spriteRenderer.size = size;
|
||||
_boxCollider2D.size = size;
|
||||
}
|
||||
|
||||
public static async Task<Button> Create(string text)
|
||||
{
|
||||
await Initialized.Task;
|
||||
|
||||
return new Button(text);
|
||||
}
|
||||
|
||||
public Button SetText(string newText)
|
||||
{
|
||||
Text.text = newText;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Button SetSize(Vector2 newSize)
|
||||
{
|
||||
Size = newSize;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Button SetDistanceFromEdge(Vector2 newPosition)
|
||||
{
|
||||
Position.DistanceFromEdge = new Vector3(newPosition.x, newPosition.y, -100f);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Button SetAlignment(AspectPosition.EdgeAlignments newAlignment)
|
||||
{
|
||||
Position.Alignment = newAlignment;
|
||||
return this;
|
||||
}
|
||||
|
||||
public static void InitializeBaseButton()
|
||||
{
|
||||
BaseButton.Initialize();
|
||||
}
|
||||
|
||||
private static class BaseButton
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
SceneManager.add_sceneLoaded((Action<Scene, LoadSceneMode>) OnSceneLoaded);
|
||||
}
|
||||
|
||||
private static void OnSceneLoaded(Scene scene, LoadSceneMode loadSceneMode)
|
||||
{
|
||||
Instantiate();
|
||||
|
||||
SceneManager.remove_sceneLoaded((Action<Scene, LoadSceneMode>) OnSceneLoaded);
|
||||
}
|
||||
|
||||
private static void Instantiate()
|
||||
{
|
||||
if (Initialized.Task.IsCompleted) return;
|
||||
|
||||
var exitButton = GameObject.Find("ExitGameButton");
|
||||
if (!exitButton) return;
|
||||
|
||||
_instance = Object.Instantiate(exitButton).DontDestroy();
|
||||
_instance.SetActive(false);
|
||||
_instance.name = "Button";
|
||||
|
||||
_instance.GetComponent<PassiveButton>().OnClick = new UnityEngine.UI.Button.ButtonClickedEvent();
|
||||
_instance.GetComponent<SceneChanger>().Destroy();
|
||||
_instance.GetComponent<ConditionalHide>().Destroy();
|
||||
_instance.GetComponentInChildren<TextTranslatorTMP>().Destroy();
|
||||
_instance.GetComponentInChildren<TextMeshPro>().text = "Button";
|
||||
|
||||
Initialized.SetResult(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+236
-92
@@ -1,9 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using BepInEx.Configuration;
|
||||
using HarmonyLib;
|
||||
using Reactor.Extensions;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Button = UnityEngine.UI.Button;
|
||||
using Object = UnityEngine.Object;
|
||||
using String = System.String;
|
||||
|
||||
@@ -11,121 +13,93 @@ namespace Unify.Patches
|
||||
{
|
||||
public static class RegionsPatch
|
||||
{
|
||||
private static IRegionInfo[] _oldRegions = ServerManager.DefaultRegions;
|
||||
|
||||
private static IRegionInfo[] _newRegions = new IRegionInfo[]
|
||||
internal static IRegionInfo[] OldRegions { get; } = ServerManager.DefaultRegions;
|
||||
|
||||
internal static IRegionInfo[] NewRegions { get; } = new IRegionInfo[]
|
||||
{
|
||||
new DnsRegionInfo("192.241.154.115", "skeld.net", StringNames.NoTranslation, "192.241.154.115", 22023)
|
||||
.Cast<IRegionInfo>(),
|
||||
new DnsRegionInfo("localhost", "localhost", StringNames.NoTranslation, "127.0.0.1", 22023)
|
||||
.Cast<IRegionInfo>(),
|
||||
new DnsRegionInfo("152.228.160.91", "matux.fr", StringNames.NoTranslation, "152.228.160.91", 22023)
|
||||
.Cast<IRegionInfo>(),
|
||||
new DnsRegionInfo("77.55.217.159", "Przebot", StringNames.NoTranslation, "77.55.217.159", 22023)
|
||||
.Cast<IRegionInfo>()
|
||||
};
|
||||
|
||||
public static List<IRegionInfo> ModRegions = new List<IRegionInfo>();
|
||||
internal static List<IRegionInfo> ModRegions { get; } = new List<IRegionInfo>();
|
||||
|
||||
public static IRegionInfo DirectRegion;
|
||||
public static IRegionInfo DirectRegion { get; set; }
|
||||
|
||||
private static TextBox directConnect;
|
||||
internal static TextBoxTMP DirectConnect { get; set; }
|
||||
|
||||
public static void Patch()
|
||||
{
|
||||
ServerManager serverManager = DestroyableSingleton<ServerManager>.CMJOLNCMAPD;
|
||||
|
||||
IRegionInfo[] customRegions = UnifyPlugin.MergeRegions(_newRegions, ModRegions.ToArray());
|
||||
customRegions = UnifyPlugin.MergeRegions(customRegions, LoadCustomUserRegions());
|
||||
if (DirectRegion != null) customRegions = customRegions.AddToArray(DirectRegion);
|
||||
IRegionInfo[] patchedRegions = UnifyPlugin.MergeRegions(_oldRegions, customRegions);
|
||||
ServerManager serverManager = ServerManager.Instance;
|
||||
|
||||
IRegionInfo[] patchedRegions = OldRegions
|
||||
.AddRangeToArray(NewRegions)
|
||||
.AddRangeToArray(ModRegions.ToArray())
|
||||
.AddRangeToArray(LoadCustomUserRegions());
|
||||
if (DirectRegion != null) patchedRegions = patchedRegions.AddToArray(DirectRegion);
|
||||
|
||||
ServerManager.DefaultRegions = patchedRegions;
|
||||
serverManager.GDOLGIJJLBL = patchedRegions;
|
||||
serverManager.SaveServers();
|
||||
serverManager.AvailableRegions = patchedRegions;
|
||||
}
|
||||
|
||||
private static IRegionInfo[] LoadCustomUserRegions()
|
||||
{
|
||||
List<IRegionInfo> customRegions = new List<IRegionInfo>();
|
||||
|
||||
for (int x = 0; x < 5; x++)
|
||||
|
||||
for (int x = 0; x < 9; x++)
|
||||
{
|
||||
ConfigEntry<string> regionName = UnifyPlugin.ConfigFile.Bind(
|
||||
$"Region {x + 1}", $"Name", "custom region");
|
||||
ConfigEntry<string> regionIp = UnifyPlugin.ConfigFile.Bind(
|
||||
$"Region {x + 1}", "IP", "");
|
||||
ConfigEntry<ushort> regionPort = UnifyPlugin.ConfigFile.Bind(
|
||||
$"Region {x + 1}", "Port", (ushort) 22023);
|
||||
|
||||
if (String.IsNullOrWhiteSpace(regionIp.Value)) continue;
|
||||
|
||||
IRegionInfo regionInfo = new DnsRegionInfo(
|
||||
regionIp.Value, regionName.Value, StringNames.NoTranslation, regionIp.Value, 22023)
|
||||
regionIp.Value, regionName.Value,
|
||||
StringNames.NoTranslation, regionIp.Value, regionPort.Value)
|
||||
.Cast<IRegionInfo>();
|
||||
|
||||
|
||||
customRegions.Add(regionInfo);
|
||||
}
|
||||
|
||||
return customRegions.ToArray();
|
||||
}
|
||||
|
||||
|
||||
private static void UpdateRegion()
|
||||
{
|
||||
RegionMenu regionMenu = GameObject.Find("RegionMenu").GetComponent<RegionMenu>();
|
||||
|
||||
bool success = UnifyPlugin.SetDirectRegion(directConnect.text, out IRegionInfo newRegion);
|
||||
RegionMenu regionMenu = DestroyableSingleton<RegionMenu>.Instance;
|
||||
|
||||
bool success = UnifyPlugin.SetDirectRegion(DirectConnect.text, out IRegionInfo newRegion);
|
||||
|
||||
if (!success)
|
||||
{
|
||||
directConnect.StartCoroutine(HLPCBNMDEHF.FIJHCJMBGFP(directConnect.transform, 0.75f, 0.25f));
|
||||
DirectConnect.StartCoroutine(Effects.SwayX(DirectConnect.transform, 0.75f, 0.25f));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
regionMenu.ChooseOption(newRegion);
|
||||
regionMenu.Close();
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(RegionMenu), nameof(RegionMenu.Open))]
|
||||
public static class DirectConnectButtonPatch
|
||||
|
||||
[HarmonyPatch(typeof(ServerManager), nameof(ServerManager.LoadServers))]
|
||||
public static class LoadNewRegionsPatch
|
||||
{
|
||||
public static void Postfix()
|
||||
{
|
||||
JoinGameButton joinGameButton = DestroyableSingleton<JoinGameButton>.CMJOLNCMAPD;
|
||||
RegionMenu regionMenu = DestroyableSingleton<RegionMenu>.CMJOLNCMAPD;
|
||||
|
||||
directConnect = Object.Instantiate(joinGameButton.GameIdText, regionMenu.transform);
|
||||
directConnect.gameObject.SetActive(false);
|
||||
directConnect.IpMode = true;
|
||||
directConnect.characterLimit = 15;
|
||||
directConnect.ClearOnFocus = false;
|
||||
|
||||
directConnect.OnEnter = new Button.ButtonClickedEvent();
|
||||
directConnect.OnEnter.AddListener((Action) UpdateRegion);
|
||||
|
||||
int offset = ((ServerManager.DefaultRegions.Length + 1) / 2) + 1;
|
||||
directConnect.transform.localPosition = new Vector3(0, 2f - (offset / 2f), -100f);
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(RegionMenu), nameof(RegionMenu.Open))]
|
||||
public static class RegionMenuLayoutPatch
|
||||
{
|
||||
public static void Postfix(RegionMenu __instance)
|
||||
{
|
||||
directConnect.gameObject.SetActive(true);
|
||||
|
||||
var regionButtons = __instance.ButtonPool.activeChildren.ToArray();
|
||||
int half = regionButtons.Length / 2;
|
||||
|
||||
for (int x = 0; x < regionButtons.Length; x++)
|
||||
{
|
||||
ServerListButton regionButton = regionButtons[x].Cast<ServerListButton>();
|
||||
|
||||
regionButton.transform.localPosition = new Vector3(1.25f * ((x < half)? -1: 1), 2f - 0.5f * (x - ((x < half)? 0 : half)), 0f);
|
||||
}
|
||||
Patch();
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(JoinGameButton), nameof(JoinGameButton.OnClick))]
|
||||
public static class DirectConnectEnterButtonPatch
|
||||
{
|
||||
public static class DirectConnectEnterButtonPatch {
|
||||
public static bool Prefix(JoinGameButton __instance)
|
||||
{
|
||||
GameObject regionMenuGameObject = GameObject.Find("RegionMenu");
|
||||
@@ -137,49 +111,219 @@ namespace Unify.Patches
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(RegionMenu), nameof(RegionMenu.Close))]
|
||||
public static class HideDirectConnectPatch
|
||||
[HarmonyPatch(typeof(RegionMenu))]
|
||||
public static class RegionMenuPatches
|
||||
{
|
||||
public static void Postfix()
|
||||
[HarmonyPatch(nameof(RegionMenu.Open))]
|
||||
[HarmonyPostfix]
|
||||
public static void DirectConnectButtonPatch()
|
||||
{
|
||||
directConnect.gameObject.SetActive(false);
|
||||
RefreshDirectConnectButton();
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(RegionMenu), nameof(RegionMenu.ChooseOption))]
|
||||
public static class HideDirectConnectOnSelectPatch
|
||||
{
|
||||
public static void Postfix()
|
||||
[HarmonyPatch(nameof(RegionMenu.Open))]
|
||||
[HarmonyPostfix]
|
||||
public static void RegionMenuLayoutPatch()
|
||||
{
|
||||
directConnect.gameObject.SetActive(false);
|
||||
RefreshRegionMenu();
|
||||
}
|
||||
|
||||
internal static void RefreshRegionMenu()
|
||||
{
|
||||
if (!GameObject.Find("RegionMenu")) return;
|
||||
|
||||
var regionButtons = DestroyableSingleton<RegionMenu>.Instance.ButtonPool.activeChildren.ToArray();
|
||||
var defaultRegions = ServerManager.DefaultRegions;
|
||||
var showOfficials = UnifyPlugin.ShowOfficialRegions.Value;
|
||||
var showExtras = UnifyPlugin.ShowExtraRegions.Value;
|
||||
|
||||
for (int i = 0; i < regionButtons.Length; i++)
|
||||
{
|
||||
ServerListButton regionButton = regionButtons[i].Cast<ServerListButton>();
|
||||
IRegionInfo region = defaultRegions[i];
|
||||
|
||||
var textTranslatorTemp = regionButton.GetComponentInChildren<TextTranslatorTMP>();
|
||||
if (textTranslatorTemp) textTranslatorTemp.Destroy();
|
||||
|
||||
int extraRegionCount = OldRegions.Length + NewRegions.Length + ModRegions.Count;
|
||||
bool isCustomRegion = i >= OldRegions.Length;
|
||||
bool isCustomUserRegion = i >= extraRegionCount;
|
||||
float x = (!isCustomRegion && !showExtras ? 3f : 0) + (isCustomRegion ? 3f : 0) +
|
||||
(isCustomUserRegion ? 3f : 0) - 4.25f - (!showOfficials || OldRegions.Length == 0 ? 1.5f : 0) -
|
||||
(!showExtras || extraRegionCount == 0 ? 1.5f : 0);
|
||||
float y = i - (isCustomRegion ? OldRegions.Length : 0) -
|
||||
(isCustomUserRegion ? NewRegions.Length + ModRegions.Count : 0);
|
||||
|
||||
var regionButtonPosition = new Vector3(1.25f + x, 2f - 0.5f * y, 0);
|
||||
regionButton.transform.localPosition = regionButtonPosition;
|
||||
|
||||
regionButton.gameObject.SetActive(
|
||||
(showOfficials || i >= OldRegions.Length) &&
|
||||
(showExtras || !isCustomRegion || isCustomUserRegion));
|
||||
|
||||
var buttonRolloverHandler = regionButton.GetComponent<ButtonRolloverHandler>();
|
||||
|
||||
if (RegionsEditor.IsActive)
|
||||
{
|
||||
buttonRolloverHandler.OverColor =
|
||||
ServerManager.Instance.CurrentRegion.Name == region.Name ? Color.white : Color.black;
|
||||
regionButton.Text.color = Color.gray;
|
||||
}
|
||||
else
|
||||
{
|
||||
buttonRolloverHandler.OverColor = Color.green;
|
||||
regionButton.Text.color = Color.white;
|
||||
}
|
||||
|
||||
if (isCustomUserRegion)
|
||||
{
|
||||
regionButton.Text.text =
|
||||
RegionsEditor.IsActive ? $"{region.Name}\n{region.PingServer} {region.Servers[0].Port}" :
|
||||
region.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static void RefreshDirectConnectButton()
|
||||
{
|
||||
if (!GameObject.Find("RegionMenu")) return;
|
||||
|
||||
if (DirectConnect) DirectConnect.gameObject.Destroy();
|
||||
|
||||
RegionMenu regionMenu = DestroyableSingleton<RegionMenu>.Instance;
|
||||
JoinGameButton joinGameButton = DestroyableSingleton<JoinGameButton>.Instance;
|
||||
|
||||
DirectConnect = Object.Instantiate(joinGameButton.GameIdText, regionMenu.transform);
|
||||
DirectConnect.GetComponentInChildren<TextTranslatorTMP>().Destroy();
|
||||
DirectConnect.GetComponent<JoinGameButton>().Destroy();
|
||||
DirectConnect.outputText.text = "Enter IP";
|
||||
DirectConnect.IpMode = true;
|
||||
DirectConnect.characterLimit = 15;
|
||||
DirectConnect.ClearOnFocus = false;
|
||||
|
||||
DirectConnect.OnEnter = new Button.ButtonClickedEvent();
|
||||
DirectConnect.OnEnter.AddListener((Action) UpdateRegion);
|
||||
|
||||
int offset = NewRegions.Length + ModRegions.Count;
|
||||
DirectConnect.transform.localPosition = new Vector3(0, 1f - (offset / 2f), -100f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*[HarmonyPatch(typeof(UdpConnection), nameof(UdpConnection.HandleSend))]
|
||||
public static class DisableModdedHandshakePatch
|
||||
|
||||
internal static class RegionsEditor
|
||||
{
|
||||
[HarmonyBefore(new string[] { "gg.reactor.api" })]
|
||||
public static void Prefix()
|
||||
private static Controls.Button _switchButton;
|
||||
|
||||
private static Controls.Button _toggleOfficialsButton;
|
||||
private static Controls.Button _toggleExtrasButton;
|
||||
|
||||
internal static bool IsActive;
|
||||
|
||||
internal static async void SetUp()
|
||||
{
|
||||
if (UnifyPlugin.HandshakeDisabled) return;
|
||||
if (!UnifyPlugin.NormalHandshake.Contains(ServerManager.Instance.CurrentRegion.Name)) return;
|
||||
|
||||
PluginSingleton<ReactorPlugin>.Instance.ModdedHandshake.Value = false;
|
||||
await SetUpSwitchButton();
|
||||
await SetUpToggleOfficialsButton();
|
||||
await SetUpToggleExtrasButton();
|
||||
}
|
||||
|
||||
public static void Postfix()
|
||||
private static void SetRegionsEditorVisibility(bool visible)
|
||||
{
|
||||
if (UnifyPlugin.HandshakeDisabled) return;
|
||||
IsActive = visible;
|
||||
_toggleOfficialsButton.GameObject.SetActive(visible);
|
||||
_toggleExtrasButton.GameObject.SetActive(visible);
|
||||
|
||||
PluginSingleton<ReactorPlugin>.Instance.ModdedHandshake.Value = true;
|
||||
RegionsPatch.RegionMenuPatches.RefreshRegionMenu();
|
||||
|
||||
if (visible)
|
||||
{
|
||||
_switchButton.Text.text = "Back";
|
||||
RegionsPatch.DirectConnect.gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
_switchButton.Text.text = "Edit";
|
||||
RegionsPatch.RegionMenuPatches.RefreshDirectConnectButton();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
private static async Task SetUpSwitchButton()
|
||||
{
|
||||
_switchButton = await Controls.Button.Create("Edit");
|
||||
_switchButton.SetSize(new Vector2(0.8f, 0.4f)).SetDistanceFromEdge(new Vector2(0.5f, 0.3f));
|
||||
|
||||
_switchButton.OnClick.AddListener((Action) (() =>
|
||||
{
|
||||
SetRegionsEditorVisibility(!IsActive);
|
||||
}));
|
||||
}
|
||||
|
||||
private static async Task SetUpToggleOfficialsButton()
|
||||
{
|
||||
_toggleOfficialsButton = await Controls.Button.Create("Toggle Official Regions");
|
||||
_toggleOfficialsButton.SetSize(new Vector2(2f, 0.4f)).SetDistanceFromEdge(new Vector2(1.1f, 1.3f));
|
||||
|
||||
_toggleOfficialsButton.OnClick.AddListener((Action) (() =>
|
||||
{
|
||||
UnifyPlugin.ShowOfficialRegions.Value = !UnifyPlugin.ShowOfficialRegions.Value;
|
||||
RegionsPatch.RegionMenuPatches.RefreshRegionMenu();
|
||||
}));
|
||||
}
|
||||
|
||||
private static async Task SetUpToggleExtrasButton()
|
||||
{
|
||||
_toggleExtrasButton = await Controls.Button.Create("Toggle Extra Regions");
|
||||
_toggleExtrasButton.SetSize(new Vector2(2f, 0.4f)).SetDistanceFromEdge(new Vector2(1.1f, 1.8f));
|
||||
|
||||
_toggleExtrasButton.OnClick.AddListener((Action) (() =>
|
||||
{
|
||||
UnifyPlugin.ShowExtraRegions.Value = !UnifyPlugin.ShowExtraRegions.Value;
|
||||
RegionsPatch.RegionMenuPatches.RefreshRegionMenu();
|
||||
}));
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(RegionMenu), nameof(RegionMenu.Open))]
|
||||
public static class OpenRegionsEditorPatch
|
||||
{
|
||||
public static void Postfix()
|
||||
{
|
||||
if (!GameObject.Find("RegionMenu")) return;
|
||||
|
||||
_switchButton.GameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(RegionMenu))]
|
||||
public static class HideRegionsEditorPatch
|
||||
{
|
||||
[HarmonyPatch(nameof(RegionMenu.Close))]
|
||||
[HarmonyPostfix]
|
||||
public static void HideOnClosePatch()
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
|
||||
[HarmonyPatch(nameof(RegionMenu.ChooseOption))]
|
||||
[HarmonyPrefix]
|
||||
public static bool DisableRegionButtonsPatch()
|
||||
{
|
||||
if (IsActive) return false;
|
||||
|
||||
Hide();
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void Hide()
|
||||
{
|
||||
if (!RegionsPatch.DirectConnect) return;
|
||||
|
||||
SetRegionsEditorVisibility(false);
|
||||
|
||||
_switchButton.GameObject.SetActive(false);
|
||||
RegionsPatch.DirectConnect.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Change fields to properties
|
||||
Change how custom region is detected
|
||||
|
||||
*/
|
||||
// TODO:
|
||||
// Store custom servers in a JSON file
|
||||
+34
-32
@@ -6,66 +6,54 @@ using BepInEx;
|
||||
using BepInEx.Configuration;
|
||||
using BepInEx.IL2CPP;
|
||||
using HarmonyLib;
|
||||
using Hazel.Udp;
|
||||
using Reactor;
|
||||
using Unify.Controls;
|
||||
using Unify.Patches;
|
||||
|
||||
namespace Unify
|
||||
{
|
||||
[BepInPlugin(Id, Name, Version)]
|
||||
[BepInProcess("Among Us.exe")]
|
||||
[BepInDependency(ReactorPlugin.Id)]
|
||||
[ReactorPluginSide(PluginSide.ClientOnly)]
|
||||
public class UnifyPlugin : BasePlugin
|
||||
{
|
||||
public const string Id = "daemon.unify";
|
||||
private const string Name = "Unify";
|
||||
private const string Version = "3.0.0-pre.1";
|
||||
private const string Version = "5.0.0";
|
||||
|
||||
public static ConfigFile ConfigFile;
|
||||
public static ConfigFile ConfigFile { get; private set; }
|
||||
|
||||
// public static readonly bool HandshakeDisabled = !PluginSingleton<ReactorPlugin>.Instance.ModdedHandshake.Value;
|
||||
|
||||
/*public static readonly string[] NormalHandshake =
|
||||
new string[] {"North America", "Europe", "Asia", "skeld.net"};*/
|
||||
internal static ConfigEntry<bool> ShowOfficialRegions;
|
||||
internal static ConfigEntry<bool> ShowExtraRegions;
|
||||
|
||||
public Harmony Harmony { get; } = new Harmony(Id);
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
// ===== For compatibility reasons =====
|
||||
string oldConfigPath = Path.Combine(Paths.ConfigPath, "daemon.unify.reactor.cfg");
|
||||
string newConfigPath = Path.Combine(Paths.ConfigPath, $"{UnifyPlugin.Id}.cfg");
|
||||
bool oldConfigExists = File.Exists(oldConfigPath);
|
||||
if (oldConfigExists)
|
||||
{
|
||||
File.Copy(oldConfigPath, newConfigPath, true);
|
||||
File.Delete(oldConfigPath);
|
||||
}
|
||||
|
||||
ConfigFile = new ConfigFile(Path.Combine(Paths.ConfigPath, $"{UnifyPlugin.Id}.cfg"), true);
|
||||
// =====================================
|
||||
FixCompatibility();
|
||||
|
||||
RegionsPatch.Patch();
|
||||
ShowOfficialRegions = ConfigFile.Bind("Preferences", "Show Official Regions", true,
|
||||
"If the official regions should be shown when displaying the regions menu");
|
||||
ShowExtraRegions = ConfigFile.Bind("Preferences", "Show Extra Regions", true,
|
||||
"If the extra regions added by default in Unify should be shown when displaying the regions menu");
|
||||
|
||||
Harmony.PatchAll();
|
||||
|
||||
Button.InitializeBaseButton();
|
||||
RegionsEditor.SetUp();
|
||||
}
|
||||
|
||||
public static IRegionInfo[] MergeRegions(IRegionInfo[] oldRegions, IRegionInfo[] newRegions)
|
||||
public static IRegionInfo AddRegion(string name, string ip, ushort port)
|
||||
{
|
||||
IRegionInfo[] patchedRegions = new IRegionInfo[oldRegions.Length + newRegions.Length];
|
||||
Array.Copy(oldRegions, patchedRegions, oldRegions.Length);
|
||||
Array.Copy(newRegions, 0, patchedRegions, oldRegions.Length, newRegions.Length);
|
||||
|
||||
return patchedRegions;
|
||||
}
|
||||
|
||||
public static IRegionInfo AddRegion(string name, string ip)
|
||||
{
|
||||
if (Uri.CheckHostName(ip) != UriHostNameType.IPv4)
|
||||
return DestroyableSingleton<ServerManager>.CMJOLNCMAPD.KIDDJMGEOKK;
|
||||
if (Uri.CheckHostName(ip) != UriHostNameType.IPv4) return ServerManager.Instance.CurrentRegion;
|
||||
|
||||
IRegionInfo existingRegion =
|
||||
ServerManager.DefaultRegions.ToArray().FirstOrDefault(region => region.PingServer == ip);
|
||||
if (existingRegion != null) return existingRegion;
|
||||
|
||||
IRegionInfo newRegion = new DnsRegionInfo(ip, name, StringNames.NoTranslation, ip, 22023)
|
||||
IRegionInfo newRegion = new DnsRegionInfo(ip, name, StringNames.NoTranslation, ip, port)
|
||||
.Cast<IRegionInfo>();
|
||||
|
||||
RegionsPatch.ModRegions.Add(newRegion);
|
||||
@@ -88,5 +76,19 @@ namespace Unify
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void FixCompatibility()
|
||||
{
|
||||
string oldConfigPath = Path.Combine(Paths.ConfigPath, "daemon.unify.reactor.cfg");
|
||||
string newConfigPath = Path.Combine(Paths.ConfigPath, $"{UnifyPlugin.Id}.cfg");
|
||||
bool oldConfigExists = File.Exists(oldConfigPath);
|
||||
if (oldConfigExists)
|
||||
{
|
||||
File.Copy(oldConfigPath, newConfigPath, true);
|
||||
File.Delete(oldConfigPath);
|
||||
}
|
||||
|
||||
ConfigFile = new ConfigFile(Path.Combine(Paths.ConfigPath, $"{UnifyPlugin.Id}.cfg"), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
+26
-217
@@ -1,227 +1,36 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Version>3.0.0-pre.1</Version>
|
||||
<Version>5.0.1</Version>
|
||||
<Mappings>DaemonBeast/Mappings:0.6.0</Mappings>
|
||||
|
||||
<Description>Region mod</Description>
|
||||
<Authors>Daemon</Authors>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(GamePlatform)' == 'Steam'">
|
||||
<GameVersion>2021.5.25s</GameVersion>
|
||||
<DefineConstants>$(DefineConstants);STEAM</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(GamePlatform)' == 'Itch'">
|
||||
<GameVersion>2021.5.25i</GameVersion>
|
||||
<DefineConstants>$(DefineConstants);ITCH</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony, Version=2.4.0.0, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\core\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Apple, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Apple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AppleCore, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\AppleCore.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AppleMacos, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\AppleMacos.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="Assembly-CSharp-firstpass, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Assembly-CSharp-firstpass.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx.Core, Version=6.0.0.353, 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.353, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\core\BepInEx.IL2CPP.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FacebookStore, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\FacebookStore.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Hazel, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Hazel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Il2CppMono.Security, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppMono.Security.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="Il2CppSystem, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Il2CppSystem.Configuration, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Il2CppSystem.Core, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Il2CppSystem.Data, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Il2CppSystem.Net.Http, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.Net.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Il2CppSystem.Numerics, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.Numerics.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Il2CppSystem.Runtime.Serialization, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.Runtime.Serialization.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Il2CppSystem.Xml, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.Xml.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Il2CppSystem.Xml.Linq, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.Xml.Linq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Purchasing.Common, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Purchasing.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="QRCoder, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\QRCoder.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Rewired_Core, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Rewired_Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Rewired_Windows, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Rewired_Windows.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Security, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Security.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Stores, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Stores.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnhollowerBaseLib, Version=0.4.13.0, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\core\UnhollowerBaseLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Addressables, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Unity.Addressables.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Analytics.DataPrivacy, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Unity.Analytics.DataPrivacy.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.ResourceManager, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Unity.ResourceManager.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.TextMeshPro, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Unity.TextMeshPro.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.AIModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.AIModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.AndroidJNIModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.AndroidJNIModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.AnimationModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.AnimationModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.AssetBundleModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.AssetBundleModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.AudioModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.AudioModule.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>
|
||||
<Reference Include="UnityEngine.DirectorModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.DirectorModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.GridModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.GridModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.ImageConversionModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.ImageConversionModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.IMGUIModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.IMGUIModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.InputLegacyModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.InputLegacyModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.InputModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.InputModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.JSONSerializeModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.JSONSerializeModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.ParticleSystemModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.ParticleSystemModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.Physics2DModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.Physics2DModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.PhysicsModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.PhysicsModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.Purchasing, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.Purchasing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.ScreenCaptureModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.ScreenCaptureModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.SharedInternalsModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.SharedInternalsModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.SpriteMaskModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.SpriteMaskModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.SpriteShapeModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.SpriteShapeModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.SubsystemsModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.SubsystemsModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.TerrainModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.TerrainModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.TextCoreModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.TextCoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.TextRenderingModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.TextRenderingModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.TilemapModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.TilemapModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UI, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UIElementsNativeModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UIElementsNativeModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UIModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UIModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UnityAnalyticsModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UnityAnalyticsModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UnityWebRequestAssetBundleModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UnityWebRequestAssetBundleModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UnityWebRequestModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UnityWebRequestModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UnityWebRequestWWWModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UnityWebRequestWWWModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.VFXModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.VFXModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.VideoModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.VideoModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.VRModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.VRModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.XRModule, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.XRModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="winrt, Version=3.7.1.6, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\winrt.dll</HintPath>
|
||||
</Reference>
|
||||
<Deobfuscate Include="$(AmongUs)\BepInEx\plugins\Reactor-$(GameVersion).dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Reactor.OxygenFilter.MSBuild" Version="0.3.0">
|
||||
<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>
|
||||
</Project>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 29 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 268 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 296 KiB |
Reference in new issue
Block a user