18 Commits
Author SHA1 Message Date
Daemon be49899a27 Added matux.fr to regions menu 2021-03-18 21:49:51 +00:00
Daemon 071b49f85d Added matux.fr to regions menu 2021-03-18 21:45:39 +00:00
Daemon fbc1751172 Removed outdated notice 2021-03-18 09:29:37 +00:00
Daemon 25ccc7124c Merge branch 'dev' 2021-03-14 15:49:43 +00:00
Daemon cd5093407a Merge branch '2021' of https://github.com/DaemonBeast/Unify into 2021 2021-03-14 15:46:45 +00:00
Daemon 489d1c85a7 Merge branch 'dev' into 2021 2021-03-14 15:45:08 +00:00
DaemonBeast c0d8638a27 Merge branch 'dev' into 2021 2021-03-14 15:25:55 +00:00
DaemonBeast 50c678901f Fixed modded handshake issue 2021-03-14 15:15:14 +00:00
DaemonBeast 3dbf2befc1 Revert "Modified mod to remove Reactor as a dependency"
This reverts commit af6e7f4b4c.
2021-03-14 12:40:21 +00:00
Daemon 3b9db051c9 Revert "Modified mod to remove Reactor as a dependency" 2021-03-14 12:29:00 +00:00
Daemon 6d18d01eb9 Revert "Modified mod to remove Reactor as a dependency" 2021-03-14 12:28:46 +00:00
Daemon e91ea01777 Revert "Modified mod to remove Reactor as a dependency" 2021-03-14 12:28:18 +00:00
Daemon bb69bbddfd Revert "Modified mod to remove Reactor as a dependency" 2021-03-14 12:27:47 +00:00
Daemon 8560fb6a55 Modified mod to remove Reactor as a dependency 2021-03-14 12:11:48 +00:00
Daemon 5668255792 Modified mod to remove Reactor as a dependency 2021-03-14 12:10:51 +00:00
DaemonBeast af6e7f4b4c Modified mod to remove Reactor as a dependency 2021-03-14 12:08:22 +00:00
DaemonBeast f35196d68c Improved wording in README 2021-03-13 22:02:02 +00:00
Daemon 7fc26d8b92 Fixed custom regions
Merged stable dev branch with 2021 branch
2021-03-13 15:22:53 +00:00
5 changed files with 30 additions and 6 deletions

No files matched your search

-3
View File
@@ -1,6 +1,3 @@
> The 2021.3.5s release of this mod requires you to compile an in-development version of Impostor
> [here](https://github.com/Impostor/Impostor/tree/2021.3.5) if you want to host a local server.
# Unify
An Among Us mod to add extra regions to the regions menu.
+23
View File
@@ -1,5 +1,9 @@
using System.Collections.Generic;
using System.Linq;
using BepInEx.Configuration;
using HarmonyLib;
using Hazel.Udp;
using Reactor;
using Array = System.Array;
using String = System.String;
@@ -12,6 +16,8 @@ namespace Unify.Patches
new DnsRegionInfo("192.241.154.115", "skeld.net", StringNames.NoTranslation, "192.241.154.115")
.Duplicate(),
new DnsRegionInfo("localhost", "localhost", StringNames.NoTranslation, "127.0.0.1")
.Duplicate(),
new DnsRegionInfo("152.228.160.91", "matux.fr", StringNames.NoTranslation, "152.228.160.91")
.Duplicate()
};
private static IRegionInfo[] _customRegions = MergeRegions(_newRegions, LoadCustomUserRegions());
@@ -57,4 +63,21 @@ namespace Unify.Patches
return customRegions.ToArray();
}
}
[HarmonyPatch(typeof(UdpConnection), nameof(UdpConnection.HandleSend))]
public static class DisableModdedHandshakePatch
{
[HarmonyBefore(new string[] { "gg.reactor.api" })]
public static void Prefix()
{
if (!UnifyPlugin.NormalHandshake.Contains(ServerManager.Instance.CurrentRegion.Name)) return;
PluginSingleton<ReactorPlugin>.Instance.ModdedHandshake.Value = false;
}
public static void Postfix()
{
PluginSingleton<ReactorPlugin>.Instance.ModdedHandshake.Value = true;
}
}
}
+6 -2
View File
@@ -11,21 +11,25 @@ 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.reactor";
private const string Name = "Unify";
private const string Version = "2.0.1";
private const string Version = "2.0.3";
public static readonly ConfigFile ConfigFile =
new ConfigFile(Path.Combine(Paths.ConfigPath, $"{UnifyPlugin.Id}.cfg"), true);
public static readonly string[] NormalHandshake =
new string[] {"North America", "Europe", "Asia", "skeld.net"};
public Harmony Harmony { get; } = new Harmony(Id);
public override void Load()
{
RegionsPatch.Patch();
Harmony.PatchAll();
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Version>2.0.1</Version>
<Version>2.0.3</Version>
<Mappings>NuclearPowered/Mappings:0.2.0</Mappings>
<Description>Region mod for Reactor</Description>
Binary file not shown.