mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-20 01:46:21 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e58f8b5aef | ||
|
|
bac31b1b51 | ||
|
|
d2e5d026e3 | ||
|
|
081e6e2ba9 | ||
|
|
70155fe8a6 | ||
|
|
89a8adadf7 | ||
|
|
837ee142b3 | ||
|
|
2453bff8df | ||
|
|
f501dc1897 | ||
|
|
f3b510ae2a | ||
|
|
bc9b8ea8a2 | ||
|
|
c96f12029e | ||
|
|
8e8beaf30c | ||
|
|
d9e5e7f1a9 | ||
|
|
40ae06899c | ||
|
|
73e21fc406 |
No files matched your search
@@ -23,7 +23,7 @@ jobs:
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 5.x
|
||||
dotnet-version: 6.x
|
||||
|
||||
- name: Run the Cake script
|
||||
uses: cake-build/cake-action@v1
|
||||
|
||||
+4
-4
@@ -1,16 +1,16 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<GamePlatform Condition="'$(GamePlatform)' == ''">Steam</GamePlatform>
|
||||
<GameVersion Condition="'$(GamePlatform)' == 'Steam'">2021.6.30</GameVersion>
|
||||
<GameVersion Condition="'$(GamePlatform)' == 'Itch'">2021.6.30</GameVersion>
|
||||
<GameVersion Condition="'$(GamePlatform)' == 'Steam'">2022.2.23</GameVersion>
|
||||
<GameVersion Condition="'$(GamePlatform)' == 'Itch'">2021.12.15</GameVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BepInEx.IL2CPP" Version="6.0.0-be.521" />
|
||||
<PackageReference Include="BepInEx.IL2CPP" Version="6.0.0-be.551" />
|
||||
<PackageReference Include="AmongUs.GameLibs.$(GamePlatform)" Version="$(GameVersion)" PrivateAssets="all" />
|
||||
|
||||
<PackageReference Include="BepInEx.AutoPlugin" Version="1.0.1" PrivateAssets="all" />
|
||||
<PackageReference Include="BepInEx.IL2CPP.MSBuild" Version="1.0.1" PrivateAssets="all" />
|
||||
<PackageReference Include="BepInEx.IL2CPP.MSBuild" Version="1.0.2" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Copy" AfterTargets="Build" Condition="'$(AmongUs)' != ''">
|
||||
|
||||
@@ -5,6 +5,7 @@ using BepInEx.IL2CPP;
|
||||
using HarmonyLib;
|
||||
using InnerNet;
|
||||
using Reactor.Extensions;
|
||||
using UnhollowerBaseLib;
|
||||
using UnhollowerBaseLib.Attributes;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -63,20 +64,10 @@ namespace Reactor.Debugger
|
||||
{
|
||||
var data = PlayerControl.LocalPlayer.Data;
|
||||
|
||||
var newIsImpostor = GUILayout.Toggle(data.IsImpostor, "Is Impostor");
|
||||
if (data.IsImpostor != newIsImpostor)
|
||||
var newIsImpostor = GUILayout.Toggle(data.Role.IsImpostor, "Is Impostor");
|
||||
if (data.Role.IsImpostor != newIsImpostor)
|
||||
{
|
||||
if (newIsImpostor)
|
||||
{
|
||||
PlayerControl.LocalPlayer.RpcSetInfected(new[]
|
||||
{
|
||||
data
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerControl.LocalPlayer.RemoveInfected();
|
||||
}
|
||||
PlayerControl.LocalPlayer.RpcSetRole(newIsImpostor ? RoleTypes.Impostor : RoleTypes.Crewmate);
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Spawn a dummy"))
|
||||
@@ -90,10 +81,10 @@ namespace Reactor.Debugger
|
||||
playerControl.NetTransform.enabled = false;
|
||||
playerControl.SetName($"{TranslationController.Instance.GetString(StringNames.Dummy, Array.Empty<Il2CppSystem.Object>())} {i}");
|
||||
playerControl.SetColor((byte) (i % Palette.PlayerColors.Length));
|
||||
playerControl.SetHat(i % (uint) HatManager.Instance.AllHats.Count, playerControl.Data.ColorId);
|
||||
playerControl.SetPet(i % (uint) HatManager.Instance.AllPets.Count);
|
||||
playerControl.SetSkin(i % (uint) HatManager.Instance.AllSkins.Count);
|
||||
GameData.Instance.RpcSetTasks(playerControl.PlayerId, new byte[0]);
|
||||
playerControl.SetHat(HatManager.Instance.AllHats.ToArray().ElementAt(i % HatManager.Instance.AllHats.Count).ProdId, playerControl.Data.DefaultOutfit.ColorId);
|
||||
playerControl.SetPet(HatManager.Instance.AllPets.ToArray().ElementAt(i % HatManager.Instance.AllPets.Count).ProdId);
|
||||
playerControl.SetSkin(HatManager.Instance.AllSkins.ToArray().ElementAt(i % HatManager.Instance.AllSkins.Count).ProdId);
|
||||
GameData.Instance.RpcSetTasks(playerControl.PlayerId, new Il2CppStructArray<byte>(0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Reactor.Debugger
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(GameSettingMenu), nameof(GameSettingMenu.OnEnable))]
|
||||
[HarmonyPatch(typeof(GameSettingMenu), nameof(GameSettingMenu.Start))]
|
||||
public static class GameSettingMenuPatch
|
||||
{
|
||||
public static void Prefix(GameSettingMenu __instance)
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
".NETStandard,Version=v2.1": {
|
||||
"AmongUs.GameLibs.Steam": {
|
||||
"type": "Direct",
|
||||
"requested": "[2021.6.30, )",
|
||||
"resolved": "2021.6.30",
|
||||
"contentHash": "TdlFO+S61WREk/sOV2YUmzQ6MFNXk5o+uxLv4i4ft/Z1VRkxFo66/ff3cR1ZfI8DuXni/Ao9rS4dJP+j85pEFA=="
|
||||
"requested": "[2022.2.23, )",
|
||||
"resolved": "2022.2.23",
|
||||
"contentHash": "CHMKmYSv00f7bU8pZ/NSfXNSSwKqCtcYyLsBmiFJ8asx+wmLKXHPsUbB9l+Ew2ZdisTt8lU+bQm2jznyWaMtdw=="
|
||||
},
|
||||
"BepInEx.AutoPlugin": {
|
||||
"type": "Direct",
|
||||
@@ -16,35 +16,35 @@
|
||||
},
|
||||
"BepInEx.IL2CPP": {
|
||||
"type": "Direct",
|
||||
"requested": "[6.0.0-be.521, )",
|
||||
"resolved": "6.0.0-be.521",
|
||||
"contentHash": "nzXG/X9u4Ane4KvzaTTon9iP2o3zBkPierrkefaq9tmmQ91FzXFtmFGkVZpD6hGqGjd+KRIn0c6my58+e0u+gw==",
|
||||
"requested": "[6.0.0-be.551, )",
|
||||
"resolved": "6.0.0-be.551",
|
||||
"contentHash": "RvGBR8aXv/AabeiPV6jepRkSXixei4UTtQD86dRrh0canunubXt8pmIybW+0aH7BP1wewiwHIQnrKNRbniMHjQ==",
|
||||
"dependencies": {
|
||||
"BepInEx.Core": "6.0.0-be.521",
|
||||
"BepInEx.Core": "6.0.0-be.551",
|
||||
"BepInEx.Il2Cpp.TlsAdapter": "1.0.1",
|
||||
"HarmonyX": "2.5.7",
|
||||
"Iced": "1.15.0",
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.19.5",
|
||||
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.19.5",
|
||||
"Il2CppAssemblyUnhollower.Tool": "0.4.19.5",
|
||||
"HarmonyX": "2.9.0",
|
||||
"Iced": "1.17.0",
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.23",
|
||||
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.23",
|
||||
"Il2CppAssemblyUnhollower.Tool": "0.4.23",
|
||||
"Il2CppDumper": "6.6.4",
|
||||
"MonoMod.RuntimeDetour": "21.10.10.1",
|
||||
"Samboy063.Cpp2IL.Core": "2021.5.3"
|
||||
"MonoMod.RuntimeDetour": "22.1.29.1",
|
||||
"Samboy063.Cpp2IL.Core": "2022.0.1"
|
||||
}
|
||||
},
|
||||
"BepInEx.IL2CPP.MSBuild": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.0.1, )",
|
||||
"resolved": "1.0.1",
|
||||
"contentHash": "fOxbM3r8vBo5djUh3R4/cfzYNwIL4EyPc2P7yGIPaR+jrql1eS2IW+4oy2MGpfvbMLGeDHaYubcYS4VSc7F3jw=="
|
||||
"requested": "[1.0.2, )",
|
||||
"resolved": "1.0.2",
|
||||
"contentHash": "RdnDWUFy0em+AtYXohvPx4HbGokvfzJaiVovFNj35PhwzMlgqHZRIxLHoTRnfJLeWJruqBi8PXJj03JqJAeQUw=="
|
||||
},
|
||||
"BepInEx.Core": {
|
||||
"type": "Transitive",
|
||||
"resolved": "6.0.0-be.521",
|
||||
"contentHash": "O1UmrldEd72/0//LIdop26QuWwToNP3lXURfORKZGZv1Kp5nU03jS/hXIXEgDSzxRZJt5j+ffay7x+5eedXMbg==",
|
||||
"resolved": "6.0.0-be.551",
|
||||
"contentHash": "8/2XA14bH4w04KEtWxQ5J74uStOeiAV37entU/vSFA3rdesYycPZct3Te3eRJ2i5U0mVMXsP0xUDfdHVXDkfng==",
|
||||
"dependencies": {
|
||||
"HarmonyX": "2.5.7",
|
||||
"MonoMod.Utils": "21.10.10.1",
|
||||
"HarmonyX": "2.9.0",
|
||||
"MonoMod.Utils": "22.1.29.1",
|
||||
"SemanticVersioning": "2.0.0"
|
||||
}
|
||||
},
|
||||
@@ -63,41 +63,41 @@
|
||||
},
|
||||
"HarmonyX": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2.5.7",
|
||||
"contentHash": "BVQAIGbYKp6S6IoP4pduDFKT4ST6iO4WC/INHJDeK3y2CA1AyhNAgYuPTzap3TVfGFUwphNcDpWBTO7hMu5grw==",
|
||||
"resolved": "2.9.0",
|
||||
"contentHash": "vB03a0lJJefzSnPP8VJSzyTtgSx81dnxU2olfirHTBnbXY8Uc2BMoxCODPK1nzg4C53lQR0NOi+bp9170sYVFA==",
|
||||
"dependencies": {
|
||||
"MonoMod.RuntimeDetour": "21.10.10.1",
|
||||
"MonoMod.RuntimeDetour": "22.1.29.1",
|
||||
"System.Reflection.Emit": "4.7.0"
|
||||
}
|
||||
},
|
||||
"Iced": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.15.0",
|
||||
"contentHash": "zSMOcs5qL77q4yb4O4cCrnY3/E8TMrKiz9vDvHgpQacs97gtnj2JfU9WoagNgwdn3C07CmEVaaQMxto11Uh5yQ=="
|
||||
"resolved": "1.17.0",
|
||||
"contentHash": "8x+HCVTl/HHTGpscH3vMBhV8sknN/muZFw9s3TsI8SA6+c43cOTCi2+jE4KsU8pNLbJ++iF2ZFcpcXHXtDglnw=="
|
||||
},
|
||||
"Il2CppAssemblyUnhollower.BaseLib": {
|
||||
"type": "Transitive",
|
||||
"resolved": "0.4.19.5",
|
||||
"contentHash": "UP0vtj0iDigQ/HZBq6+sP/btgDLc5Ibt1WkFrPvXvOtkgjt+cIdKpJmxVZHwMluUmP6Wsy3RCXeLlXE9eC/15Q==",
|
||||
"resolved": "0.4.23",
|
||||
"contentHash": "5KJfb2ILowJyVpLqpGcWmVG2cdphQj4jUSN1LZDVdhx5Co0eL1PqXVZyma0u/tbv568YZLKVh+N8lbzPIhwm+A==",
|
||||
"dependencies": {
|
||||
"Iced": "1.15.0"
|
||||
}
|
||||
},
|
||||
"Il2CppAssemblyUnhollower.BaseLib.Legacy": {
|
||||
"type": "Transitive",
|
||||
"resolved": "0.4.19.5",
|
||||
"contentHash": "dxn4ADz0VlWQtSnNhVIaFzQREnSwZEvS6YaFmwuKW+wbLdHTk9D9bDbS5QkL8glKdgoW2ifpvCBgKd1QAui/1w==",
|
||||
"resolved": "0.4.23",
|
||||
"contentHash": "gfQbpDvZ+gFTHiMQxB60IfUARQtIdmPrNjrWgTdtUkgfBlGIFlHxBWjYByei0yGUKQk8HVgKy9nniOy75Ven5Q==",
|
||||
"dependencies": {
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.19.5"
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.23"
|
||||
}
|
||||
},
|
||||
"Il2CppAssemblyUnhollower.Tool": {
|
||||
"type": "Transitive",
|
||||
"resolved": "0.4.19.5",
|
||||
"contentHash": "TYfW5UA77dy0a0N1XaIkZJLMyJIXdHO9q3jyuhTdsZdpuD/oi7qZt1GDlpI5dsg2nf9HKVAlIPNagtIqK9pYvw==",
|
||||
"resolved": "0.4.23",
|
||||
"contentHash": "13TOP6ywMkgRVkhDpfMskBFMwxmEqBD0h8vboRaOdNhep5XDgGOkatb7jHOxlbDx1keeMoB/aSGufjgdpIpOpg==",
|
||||
"dependencies": {
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.19.5",
|
||||
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.19.5",
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.23",
|
||||
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.23",
|
||||
"Mono.Cecil": "0.11.3"
|
||||
}
|
||||
},
|
||||
@@ -131,11 +131,11 @@
|
||||
},
|
||||
"MonoMod.RuntimeDetour": {
|
||||
"type": "Transitive",
|
||||
"resolved": "21.10.10.1",
|
||||
"contentHash": "cZFLf8kCTqGAznnrGfAX8tRrMrHFH8hFHtX/Cr/CFZOcHFZZICUA03Cmjs97uoquvKpV1D2YEHGhtLprPj+ZUg==",
|
||||
"resolved": "22.1.29.1",
|
||||
"contentHash": "CksRFEGCPs8VGKe6pc3zsOPd2Jik+FMlmx5HDxWVTxz9JlAmWDk1+0PCwAVw4iGDuDZmIUjZDjhSACasyw9y/Q==",
|
||||
"dependencies": {
|
||||
"Mono.Cecil": "0.11.4",
|
||||
"MonoMod.Utils": "21.10.10.1",
|
||||
"MonoMod.Utils": "22.1.29.1",
|
||||
"System.Collections.NonGeneric": "4.3.0",
|
||||
"System.ComponentModel.TypeConverter": "4.3.0",
|
||||
"System.IO.FileSystem.Primitives": "4.3.0",
|
||||
@@ -146,8 +146,8 @@
|
||||
},
|
||||
"MonoMod.Utils": {
|
||||
"type": "Transitive",
|
||||
"resolved": "21.10.10.1",
|
||||
"contentHash": "y1ZION4RwtrnLYmE4SqI2Mnk9zZgwQlxUnfdwe0MJS8KWuSi9tU1h6RUZFaEUWSSiVE12Q2wba1Sv45j33+DLw==",
|
||||
"resolved": "22.1.29.1",
|
||||
"contentHash": "qKyM/JXIA3hr2BpE5LTtYfZvIFlcLB62pkORARRv0bXKSk1n23Nl3oAdYymQMjNfrhn/jCPZRqKDFftrYa1K2Q==",
|
||||
"dependencies": {
|
||||
"Mono.Cecil": "0.11.4",
|
||||
"System.Collections.NonGeneric": "4.3.0",
|
||||
@@ -160,27 +160,33 @@
|
||||
},
|
||||
"Samboy063.Cpp2IL.Core": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2021.5.3",
|
||||
"contentHash": "e7YdrON5J8Y3KYCwku6srp1/UdCYii/EHCLU1+sVnqKnoEnJh+CZXb2VHuKQ5IRJKLfDq2GDeWdEU8KxOW/7vQ==",
|
||||
"resolved": "2022.0.1",
|
||||
"contentHash": "oAJ1neR8sA4P1nFHRuhJqmaWC3zOGpxq0kuF4OTxCwxhUAU81fR10LzSWZHF2fHTSTIedyjNq9ve9W0B67qUbA==",
|
||||
"dependencies": {
|
||||
"Gee.External.Capstone": "2.0.2",
|
||||
"HarmonyX": "2.5.5",
|
||||
"Iced": "1.11.1",
|
||||
"IndexRange": "1.0.0",
|
||||
"Mono.Cecil": "0.11.4",
|
||||
"Samboy063.LibCpp2IL": "2021.5.3",
|
||||
"Samboy063.LibCpp2IL": "2022.0.1",
|
||||
"System.Runtime.InteropServices": "4.3.0",
|
||||
"System.ValueTuple": "4.5.0"
|
||||
}
|
||||
},
|
||||
"Samboy063.LibCpp2IL": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2021.5.3",
|
||||
"contentHash": "8N9PZiNqERUXQKRmjiacsC86/qxuBFHeD+P84MXtIzb7X9BkKuPp6N7YfoLv3EFrS+NFbd8gAgPBmAOAb80j+Q==",
|
||||
"resolved": "2022.0.1",
|
||||
"contentHash": "J22g/FsKDUMMUBFdCZicLwC0WilqrkeGD1JHHtrwFC0GwDtG6+ECvjGU/hO6ImxktSwHo05bpN+kLNYZB4U2BA==",
|
||||
"dependencies": {
|
||||
"Iced": "1.11.1",
|
||||
"IndexRange": "1.0.0"
|
||||
"IndexRange": "1.0.0",
|
||||
"Samboy063.WasmDisassembler": "2022.0.0"
|
||||
}
|
||||
},
|
||||
"Samboy063.WasmDisassembler": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2022.0.0",
|
||||
"contentHash": "1CKCMRwvw53MionMQxSQtmVymG9qDLckQne2OqwnU+Mb19ZF8CVYoVVdk3o01mBIkPWsXgTjTO2DEGE6tA+Gtw=="
|
||||
},
|
||||
"SemanticVersioning": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2.0.0",
|
||||
@@ -472,7 +478,7 @@
|
||||
"reactor": {
|
||||
"type": "Project",
|
||||
"dependencies": {
|
||||
"BepInEx.IL2CPP": "6.0.0-be.521"
|
||||
"BepInEx.IL2CPP": "6.0.0-be.551"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
".NETStandard,Version=v2.1": {
|
||||
"AmongUs.GameLibs.Steam": {
|
||||
"type": "Direct",
|
||||
"requested": "[2021.6.30, )",
|
||||
"resolved": "2021.6.30",
|
||||
"contentHash": "TdlFO+S61WREk/sOV2YUmzQ6MFNXk5o+uxLv4i4ft/Z1VRkxFo66/ff3cR1ZfI8DuXni/Ao9rS4dJP+j85pEFA=="
|
||||
"requested": "[2022.2.23, )",
|
||||
"resolved": "2022.2.23",
|
||||
"contentHash": "CHMKmYSv00f7bU8pZ/NSfXNSSwKqCtcYyLsBmiFJ8asx+wmLKXHPsUbB9l+Ew2ZdisTt8lU+bQm2jznyWaMtdw=="
|
||||
},
|
||||
"BepInEx.AutoPlugin": {
|
||||
"type": "Direct",
|
||||
@@ -16,35 +16,35 @@
|
||||
},
|
||||
"BepInEx.IL2CPP": {
|
||||
"type": "Direct",
|
||||
"requested": "[6.0.0-be.521, )",
|
||||
"resolved": "6.0.0-be.521",
|
||||
"contentHash": "nzXG/X9u4Ane4KvzaTTon9iP2o3zBkPierrkefaq9tmmQ91FzXFtmFGkVZpD6hGqGjd+KRIn0c6my58+e0u+gw==",
|
||||
"requested": "[6.0.0-be.551, )",
|
||||
"resolved": "6.0.0-be.551",
|
||||
"contentHash": "RvGBR8aXv/AabeiPV6jepRkSXixei4UTtQD86dRrh0canunubXt8pmIybW+0aH7BP1wewiwHIQnrKNRbniMHjQ==",
|
||||
"dependencies": {
|
||||
"BepInEx.Core": "6.0.0-be.521",
|
||||
"BepInEx.Core": "6.0.0-be.551",
|
||||
"BepInEx.Il2Cpp.TlsAdapter": "1.0.1",
|
||||
"HarmonyX": "2.5.7",
|
||||
"Iced": "1.15.0",
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.19.5",
|
||||
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.19.5",
|
||||
"Il2CppAssemblyUnhollower.Tool": "0.4.19.5",
|
||||
"HarmonyX": "2.9.0",
|
||||
"Iced": "1.17.0",
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.23",
|
||||
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.23",
|
||||
"Il2CppAssemblyUnhollower.Tool": "0.4.23",
|
||||
"Il2CppDumper": "6.6.4",
|
||||
"MonoMod.RuntimeDetour": "21.10.10.1",
|
||||
"Samboy063.Cpp2IL.Core": "2021.5.3"
|
||||
"MonoMod.RuntimeDetour": "22.1.29.1",
|
||||
"Samboy063.Cpp2IL.Core": "2022.0.1"
|
||||
}
|
||||
},
|
||||
"BepInEx.IL2CPP.MSBuild": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.0.1, )",
|
||||
"resolved": "1.0.1",
|
||||
"contentHash": "fOxbM3r8vBo5djUh3R4/cfzYNwIL4EyPc2P7yGIPaR+jrql1eS2IW+4oy2MGpfvbMLGeDHaYubcYS4VSc7F3jw=="
|
||||
"requested": "[1.0.2, )",
|
||||
"resolved": "1.0.2",
|
||||
"contentHash": "RdnDWUFy0em+AtYXohvPx4HbGokvfzJaiVovFNj35PhwzMlgqHZRIxLHoTRnfJLeWJruqBi8PXJj03JqJAeQUw=="
|
||||
},
|
||||
"BepInEx.Core": {
|
||||
"type": "Transitive",
|
||||
"resolved": "6.0.0-be.521",
|
||||
"contentHash": "O1UmrldEd72/0//LIdop26QuWwToNP3lXURfORKZGZv1Kp5nU03jS/hXIXEgDSzxRZJt5j+ffay7x+5eedXMbg==",
|
||||
"resolved": "6.0.0-be.551",
|
||||
"contentHash": "8/2XA14bH4w04KEtWxQ5J74uStOeiAV37entU/vSFA3rdesYycPZct3Te3eRJ2i5U0mVMXsP0xUDfdHVXDkfng==",
|
||||
"dependencies": {
|
||||
"HarmonyX": "2.5.7",
|
||||
"MonoMod.Utils": "21.10.10.1",
|
||||
"HarmonyX": "2.9.0",
|
||||
"MonoMod.Utils": "22.1.29.1",
|
||||
"SemanticVersioning": "2.0.0"
|
||||
}
|
||||
},
|
||||
@@ -63,41 +63,41 @@
|
||||
},
|
||||
"HarmonyX": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2.5.7",
|
||||
"contentHash": "BVQAIGbYKp6S6IoP4pduDFKT4ST6iO4WC/INHJDeK3y2CA1AyhNAgYuPTzap3TVfGFUwphNcDpWBTO7hMu5grw==",
|
||||
"resolved": "2.9.0",
|
||||
"contentHash": "vB03a0lJJefzSnPP8VJSzyTtgSx81dnxU2olfirHTBnbXY8Uc2BMoxCODPK1nzg4C53lQR0NOi+bp9170sYVFA==",
|
||||
"dependencies": {
|
||||
"MonoMod.RuntimeDetour": "21.10.10.1",
|
||||
"MonoMod.RuntimeDetour": "22.1.29.1",
|
||||
"System.Reflection.Emit": "4.7.0"
|
||||
}
|
||||
},
|
||||
"Iced": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.15.0",
|
||||
"contentHash": "zSMOcs5qL77q4yb4O4cCrnY3/E8TMrKiz9vDvHgpQacs97gtnj2JfU9WoagNgwdn3C07CmEVaaQMxto11Uh5yQ=="
|
||||
"resolved": "1.17.0",
|
||||
"contentHash": "8x+HCVTl/HHTGpscH3vMBhV8sknN/muZFw9s3TsI8SA6+c43cOTCi2+jE4KsU8pNLbJ++iF2ZFcpcXHXtDglnw=="
|
||||
},
|
||||
"Il2CppAssemblyUnhollower.BaseLib": {
|
||||
"type": "Transitive",
|
||||
"resolved": "0.4.19.5",
|
||||
"contentHash": "UP0vtj0iDigQ/HZBq6+sP/btgDLc5Ibt1WkFrPvXvOtkgjt+cIdKpJmxVZHwMluUmP6Wsy3RCXeLlXE9eC/15Q==",
|
||||
"resolved": "0.4.23",
|
||||
"contentHash": "5KJfb2ILowJyVpLqpGcWmVG2cdphQj4jUSN1LZDVdhx5Co0eL1PqXVZyma0u/tbv568YZLKVh+N8lbzPIhwm+A==",
|
||||
"dependencies": {
|
||||
"Iced": "1.15.0"
|
||||
}
|
||||
},
|
||||
"Il2CppAssemblyUnhollower.BaseLib.Legacy": {
|
||||
"type": "Transitive",
|
||||
"resolved": "0.4.19.5",
|
||||
"contentHash": "dxn4ADz0VlWQtSnNhVIaFzQREnSwZEvS6YaFmwuKW+wbLdHTk9D9bDbS5QkL8glKdgoW2ifpvCBgKd1QAui/1w==",
|
||||
"resolved": "0.4.23",
|
||||
"contentHash": "gfQbpDvZ+gFTHiMQxB60IfUARQtIdmPrNjrWgTdtUkgfBlGIFlHxBWjYByei0yGUKQk8HVgKy9nniOy75Ven5Q==",
|
||||
"dependencies": {
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.19.5"
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.23"
|
||||
}
|
||||
},
|
||||
"Il2CppAssemblyUnhollower.Tool": {
|
||||
"type": "Transitive",
|
||||
"resolved": "0.4.19.5",
|
||||
"contentHash": "TYfW5UA77dy0a0N1XaIkZJLMyJIXdHO9q3jyuhTdsZdpuD/oi7qZt1GDlpI5dsg2nf9HKVAlIPNagtIqK9pYvw==",
|
||||
"resolved": "0.4.23",
|
||||
"contentHash": "13TOP6ywMkgRVkhDpfMskBFMwxmEqBD0h8vboRaOdNhep5XDgGOkatb7jHOxlbDx1keeMoB/aSGufjgdpIpOpg==",
|
||||
"dependencies": {
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.19.5",
|
||||
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.19.5",
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.23",
|
||||
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.23",
|
||||
"Mono.Cecil": "0.11.3"
|
||||
}
|
||||
},
|
||||
@@ -131,11 +131,11 @@
|
||||
},
|
||||
"MonoMod.RuntimeDetour": {
|
||||
"type": "Transitive",
|
||||
"resolved": "21.10.10.1",
|
||||
"contentHash": "cZFLf8kCTqGAznnrGfAX8tRrMrHFH8hFHtX/Cr/CFZOcHFZZICUA03Cmjs97uoquvKpV1D2YEHGhtLprPj+ZUg==",
|
||||
"resolved": "22.1.29.1",
|
||||
"contentHash": "CksRFEGCPs8VGKe6pc3zsOPd2Jik+FMlmx5HDxWVTxz9JlAmWDk1+0PCwAVw4iGDuDZmIUjZDjhSACasyw9y/Q==",
|
||||
"dependencies": {
|
||||
"Mono.Cecil": "0.11.4",
|
||||
"MonoMod.Utils": "21.10.10.1",
|
||||
"MonoMod.Utils": "22.1.29.1",
|
||||
"System.Collections.NonGeneric": "4.3.0",
|
||||
"System.ComponentModel.TypeConverter": "4.3.0",
|
||||
"System.IO.FileSystem.Primitives": "4.3.0",
|
||||
@@ -146,8 +146,8 @@
|
||||
},
|
||||
"MonoMod.Utils": {
|
||||
"type": "Transitive",
|
||||
"resolved": "21.10.10.1",
|
||||
"contentHash": "y1ZION4RwtrnLYmE4SqI2Mnk9zZgwQlxUnfdwe0MJS8KWuSi9tU1h6RUZFaEUWSSiVE12Q2wba1Sv45j33+DLw==",
|
||||
"resolved": "22.1.29.1",
|
||||
"contentHash": "qKyM/JXIA3hr2BpE5LTtYfZvIFlcLB62pkORARRv0bXKSk1n23Nl3oAdYymQMjNfrhn/jCPZRqKDFftrYa1K2Q==",
|
||||
"dependencies": {
|
||||
"Mono.Cecil": "0.11.4",
|
||||
"System.Collections.NonGeneric": "4.3.0",
|
||||
@@ -160,27 +160,33 @@
|
||||
},
|
||||
"Samboy063.Cpp2IL.Core": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2021.5.3",
|
||||
"contentHash": "e7YdrON5J8Y3KYCwku6srp1/UdCYii/EHCLU1+sVnqKnoEnJh+CZXb2VHuKQ5IRJKLfDq2GDeWdEU8KxOW/7vQ==",
|
||||
"resolved": "2022.0.1",
|
||||
"contentHash": "oAJ1neR8sA4P1nFHRuhJqmaWC3zOGpxq0kuF4OTxCwxhUAU81fR10LzSWZHF2fHTSTIedyjNq9ve9W0B67qUbA==",
|
||||
"dependencies": {
|
||||
"Gee.External.Capstone": "2.0.2",
|
||||
"HarmonyX": "2.5.5",
|
||||
"Iced": "1.11.1",
|
||||
"IndexRange": "1.0.0",
|
||||
"Mono.Cecil": "0.11.4",
|
||||
"Samboy063.LibCpp2IL": "2021.5.3",
|
||||
"Samboy063.LibCpp2IL": "2022.0.1",
|
||||
"System.Runtime.InteropServices": "4.3.0",
|
||||
"System.ValueTuple": "4.5.0"
|
||||
}
|
||||
},
|
||||
"Samboy063.LibCpp2IL": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2021.5.3",
|
||||
"contentHash": "8N9PZiNqERUXQKRmjiacsC86/qxuBFHeD+P84MXtIzb7X9BkKuPp6N7YfoLv3EFrS+NFbd8gAgPBmAOAb80j+Q==",
|
||||
"resolved": "2022.0.1",
|
||||
"contentHash": "J22g/FsKDUMMUBFdCZicLwC0WilqrkeGD1JHHtrwFC0GwDtG6+ECvjGU/hO6ImxktSwHo05bpN+kLNYZB4U2BA==",
|
||||
"dependencies": {
|
||||
"Iced": "1.11.1",
|
||||
"IndexRange": "1.0.0"
|
||||
"IndexRange": "1.0.0",
|
||||
"Samboy063.WasmDisassembler": "2022.0.0"
|
||||
}
|
||||
},
|
||||
"Samboy063.WasmDisassembler": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2022.0.0",
|
||||
"contentHash": "1CKCMRwvw53MionMQxSQtmVymG9qDLckQne2OqwnU+Mb19ZF8CVYoVVdk3o01mBIkPWsXgTjTO2DEGE6tA+Gtw=="
|
||||
},
|
||||
"SemanticVersioning": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2.0.0",
|
||||
@@ -472,7 +478,7 @@
|
||||
"reactor": {
|
||||
"type": "Project",
|
||||
"dependencies": {
|
||||
"BepInEx.IL2CPP": "6.0.0-be.521"
|
||||
"BepInEx.IL2CPP": "6.0.0-be.551"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnhollowerBaseLib.Attributes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Reactor.Extensions;
|
||||
|
||||
[RegisterInIl2Cpp]
|
||||
public class Dispatcher : MonoBehaviour
|
||||
{
|
||||
public Dispatcher(IntPtr ptr) : base(ptr)
|
||||
{
|
||||
}
|
||||
|
||||
public static Dispatcher Instance { get; private set; } = null!;
|
||||
|
||||
private static readonly Queue<Action> _queue = new();
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
lock (_queue)
|
||||
{
|
||||
while (_queue.Count > 0)
|
||||
{
|
||||
_queue.Dequeue().Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[HideFromIl2Cpp]
|
||||
public void Enqueue(Action action)
|
||||
{
|
||||
lock (_queue)
|
||||
{
|
||||
_queue.Enqueue(action);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,6 @@ namespace Reactor.Extensions
|
||||
|
||||
connection.AttachReliableID(buffer, 1, ackCallback);
|
||||
connection.WriteBytesToConnection(buffer, buffer.Length);
|
||||
connection.Statistics.LogReliableSend(buffer.Length - 3, buffer.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Reactor.Extensions;
|
||||
|
||||
public static class RandomExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns random <typeparamref name="T"/> from <paramref name="input"/> using <paramref name="random"/>
|
||||
/// </summary>
|
||||
public static T? Random<T>(this IEnumerable<T> input, Random random)
|
||||
{
|
||||
var list = input as IList<T> ?? input.ToList();
|
||||
return list.Count == 0 ? default : list[random.Next(0, list.Count)];
|
||||
}
|
||||
|
||||
/// <summary>Returns a random double that is within a specified range.</summary>
|
||||
public static double NextDouble(this Random random, double minValue, double maxValue)
|
||||
{
|
||||
return random.NextDouble() * (maxValue - minValue) + minValue;
|
||||
}
|
||||
}
|
||||
@@ -18,11 +18,12 @@ namespace Reactor.Networking.MethodRpc
|
||||
{
|
||||
public delegate object HandleDelegate(InnerNetObject innerNetObject, object[] args);
|
||||
|
||||
public MethodRpc(BasePlugin plugin, MethodInfo method, uint id, SendOption option, RpcLocalHandling localHandling) : base(plugin, id)
|
||||
public MethodRpc(BasePlugin plugin, MethodInfo method, uint id, SendOption option, RpcLocalHandling localHandling, bool sendImmediately) : base(plugin, id)
|
||||
{
|
||||
Method = method;
|
||||
LocalHandling = localHandling;
|
||||
SendOption = option;
|
||||
SendImmediately = sendImmediately;
|
||||
|
||||
if (!method.IsStatic)
|
||||
{
|
||||
@@ -56,6 +57,7 @@ namespace Reactor.Networking.MethodRpc
|
||||
public override Type InnerNetObjectType { get; }
|
||||
public override RpcLocalHandling LocalHandling { get; }
|
||||
public override SendOption SendOption { get; }
|
||||
public bool SendImmediately { get; }
|
||||
|
||||
public override void UnsafeWrite(MessageWriter writer, object? data)
|
||||
{
|
||||
@@ -82,7 +84,7 @@ namespace Reactor.Networking.MethodRpc
|
||||
|
||||
public void Send(InnerNetObject innerNetObject, object[] args)
|
||||
{
|
||||
UnsafeSend(innerNetObject, args);
|
||||
UnsafeSend(innerNetObject, args, SendImmediately);
|
||||
}
|
||||
|
||||
private static readonly MethodInfo _sendMethod = AccessTools.Method(typeof(MethodRpc), nameof(Send));
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace Reactor.Networking.MethodRpc
|
||||
public uint Id { get; }
|
||||
public SendOption Option { get; set; } = SendOption.Reliable;
|
||||
public RpcLocalHandling LocalHandling { get; set; } = RpcLocalHandling.Before;
|
||||
public bool SendImmediately { get; set; }
|
||||
|
||||
public MethodRpcAttribute(uint id)
|
||||
{
|
||||
@@ -34,7 +35,7 @@ namespace Reactor.Networking.MethodRpc
|
||||
|
||||
try
|
||||
{
|
||||
var customRpc = new MethodRpc(plugin, method, attribute.Id, attribute.Option, attribute.LocalHandling);
|
||||
var customRpc = new MethodRpc(plugin, method, attribute.Id, attribute.Option, attribute.LocalHandling, attribute.SendImmediately);
|
||||
PluginSingleton<ReactorPlugin>.Instance.CustomRpcManager.Register(customRpc);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
using HarmonyLib;
|
||||
using Il2CppSystem.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace Reactor.Networking.Patches
|
||||
{
|
||||
internal static class AuthPatches
|
||||
{
|
||||
[HarmonyPatch(typeof(X509Certificate2Collection), nameof(X509Certificate2Collection.Contains))]
|
||||
public static class AcceptCustomCertificatesPatch
|
||||
{
|
||||
public static bool Prefix(X509Certificate2Collection __instance, ref bool __result)
|
||||
{
|
||||
if (AuthManager.Instance && AuthManager.Instance.connection != null && AuthManager.Instance.connection.serverCertificates.Equals(__instance))
|
||||
{
|
||||
__result = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -151,14 +151,14 @@ namespace Reactor.Networking.Patches
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(AmongUsClient), nameof(AmongUsClient.GetConnectionData))]
|
||||
[HarmonyPatch(typeof(InnerNetClient), nameof(InnerNetClient.GetConnectionData))]
|
||||
public static class HandshakePatch
|
||||
{
|
||||
public static void Postfix(ref Il2CppStructArray<byte> __result)
|
||||
{
|
||||
ModList.Update();
|
||||
|
||||
var handshake = MessageWriter.Get(SendOption.Reliable);
|
||||
var handshake = new MessageWriter(1000);
|
||||
|
||||
handshake.Write(__result);
|
||||
|
||||
@@ -167,7 +167,7 @@ namespace Reactor.Networking.Patches
|
||||
ModList.Current!.Count
|
||||
);
|
||||
|
||||
__result = handshake.ToByteArray(false);
|
||||
__result = handshake.ToByteArray(true);
|
||||
handshake.Recycle();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using HarmonyLib;
|
||||
|
||||
namespace Reactor.Patches
|
||||
{
|
||||
[HarmonyPatch]
|
||||
internal static class CustomServersPatch
|
||||
{
|
||||
[HarmonyPatch(typeof(AuthManager._CoConnect_d__4), nameof(AuthManager._CoConnect_d__4.MoveNext))]
|
||||
[HarmonyPatch(typeof(AuthManager._CoWaitForNonce_d__6), nameof(AuthManager._CoWaitForNonce_d__6.MoveNext))]
|
||||
[HarmonyPrefix]
|
||||
public static bool DisableAuthServerPatch(out bool __result)
|
||||
{
|
||||
__result = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using HarmonyLib;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
@@ -10,6 +11,15 @@ namespace Reactor.Patches
|
||||
{
|
||||
public static class FreeNamePatch
|
||||
{
|
||||
[HarmonyPatch(typeof(AccountManager), nameof(AccountManager.CheckAndRegenerateName))]
|
||||
internal static class ValidateRandomNamePatch
|
||||
{
|
||||
public static bool Prefix()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
SceneManager.add_sceneLoaded((Action<Scene, LoadSceneMode>) ((scene, _) =>
|
||||
@@ -45,14 +55,16 @@ namespace Reactor.Patches
|
||||
"JoinGameButton"
|
||||
};
|
||||
|
||||
var offset = Vector3.up;
|
||||
var gameObjects = toMove.Select(x => GameObject.Find("NormalMenu/" + x)).ToList();
|
||||
if (gameObjects.Contains(null!)) return false;
|
||||
var yStart = Vector3.up;
|
||||
var yOffset = Vector3.down * 1.5f;
|
||||
|
||||
gameObjects.ForEach(x => {
|
||||
x.transform.position = offset;
|
||||
offset += Vector3.down * 1.5f;
|
||||
});
|
||||
var gameObjects = toMove.Select(x => GameObject.Find("NormalMenu/" + x)).ToList();
|
||||
if (gameObjects.Any(x => x == null)) return false;
|
||||
|
||||
for (var i = 0; i < gameObjects.Count; i++)
|
||||
{
|
||||
gameObjects[i].transform.position = yStart + (yOffset * i);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using HarmonyLib;
|
||||
using Reactor.Extensions;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace Reactor.Patches
|
||||
{
|
||||
internal class RegionInfoWatcher : IDisposable
|
||||
{
|
||||
private FileSystemWatcher Watcher { get; }
|
||||
public bool Reload { get; set; }
|
||||
|
||||
public bool IgnoreNext { get; set; }
|
||||
|
||||
internal RegionInfoWatcher()
|
||||
{
|
||||
@@ -20,7 +24,25 @@ namespace Reactor.Patches
|
||||
{
|
||||
if (new FileInfo(e.Name).Length > 0)
|
||||
{
|
||||
Reload = true;
|
||||
if (IgnoreNext)
|
||||
{
|
||||
IgnoreNext = false;
|
||||
return;
|
||||
}
|
||||
|
||||
Dispatcher.Instance.Enqueue(() =>
|
||||
{
|
||||
ServerManager.Instance.LoadServers();
|
||||
|
||||
Object.FindObjectOfType<RegionTextMonitor>()?.Start();
|
||||
if (Object.FindObjectOfType<RegionMenu>() is { } regionMenu)
|
||||
{
|
||||
regionMenu.OnDisable();
|
||||
regionMenu.OnEnable();
|
||||
}
|
||||
|
||||
Logger<ReactorPlugin>.Info("Region file reloaded");
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -29,7 +51,19 @@ namespace Reactor.Patches
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Watcher?.Dispose();
|
||||
Watcher.Dispose();
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(FileIO), nameof(FileIO.WriteAllText))]
|
||||
private static class WritePatch
|
||||
{
|
||||
public static void Prefix(string path)
|
||||
{
|
||||
if (ServerManager.Instance && path == ServerManager.Instance.serverInfoFileJson)
|
||||
{
|
||||
PluginSingleton<ReactorPlugin>.Instance.RegionInfoWatcher.IgnoreNext = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,24 +7,6 @@ using InnerNet;
|
||||
|
||||
namespace Reactor.Patches
|
||||
{
|
||||
/// <summary>
|
||||
/// Fixes hardcoded ports
|
||||
/// </summary>
|
||||
[HarmonyPatch(typeof(InnerNetClient), nameof(InnerNetClient.SetEndpoint))]
|
||||
public static class SetEndpointPatch
|
||||
{
|
||||
public static void Prefix(InnerNetClient __instance, ref string addr, ref ushort port)
|
||||
{
|
||||
var serverManager = ServerManager.Instance;
|
||||
if (__instance.GameMode == GameModes.OnlineGame && serverManager.CurrentServer != null && addr == serverManager.OnlineNetAddress && port != serverManager.OnlineNetPort)
|
||||
{
|
||||
Logger<ReactorPlugin>.Info($"Set endpoint to {addr}:{port}");
|
||||
Logger<ReactorPlugin>.Info($"Correcting port to {serverManager.OnlineNetPort}");
|
||||
port = serverManager.OnlineNetPort;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(InnerNetClient), nameof(InnerNetClient.Connect))]
|
||||
public static class ConnectPatch
|
||||
{
|
||||
@@ -48,37 +30,22 @@ namespace Reactor.Patches
|
||||
var servers = Dns.GetHostAddresses(__instance.Fqdn)
|
||||
.Distinct()
|
||||
.Where(ipAddress => ipAddress.AddressFamily == AddressFamily.InterNetwork)
|
||||
.Select(ipAddress => new ServerInfo($"{__instance.Name}-{i++}", ipAddress.ToString(), __instance.Port))
|
||||
.Select(ipAddress => new ServerInfo($"{__instance.Name}-{i++}", ipAddress.ToString(), __instance.Port, __instance.UseDtls))
|
||||
.ToArray();
|
||||
|
||||
__instance.cachedServers = servers;
|
||||
Logger<ReactorPlugin>.Info($"Populated {__instance.Name} ({__instance.Fqdn}:{__instance.Port}) with {servers.Length} server(s) {{{servers.Join()}}}");
|
||||
Logger<ReactorPlugin>.Info($"Populated {__instance.Name} ({__instance.Fqdn}:{__instance.Port}) with {servers.Length} server(s) {{{servers.Select(x => x.ToString()).Join()}}}");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger<ReactorPlugin>.Info($"Failed to populate {__instance.Name}: {e}");
|
||||
__instance.cachedServers = new[]
|
||||
{
|
||||
new ServerInfo(__instance.Name ?? string.Empty, __instance.DefaultIp, __instance.Port),
|
||||
new ServerInfo(__instance.Name ?? string.Empty, __instance.DefaultIp, __instance.Port, __instance.UseDtls),
|
||||
};
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// De-inlines AmongUsClient#SetEndpoint from JoinGameButton
|
||||
/// </summary>
|
||||
[HarmonyPatch(typeof(JoinGameButton), nameof(JoinGameButton.OnClick))]
|
||||
public static class JoinGameButtonPatch
|
||||
{
|
||||
public static void Postfix(JoinGameButton __instance)
|
||||
{
|
||||
if (__instance.GameMode == GameModes.OnlineGame)
|
||||
{
|
||||
AmongUsClient.Instance.SetEndpoint(DestroyableSingleton<ServerManager>.Instance.OnlineNetAddress, DestroyableSingleton<ServerManager>.Instance.OnlineNetPort);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
||||
<VersionPrefix>1.1.0</VersionPrefix>
|
||||
<VersionPrefix>1.2.3</VersionPrefix>
|
||||
<VersionSuffix>dev</VersionSuffix>
|
||||
<Description>Core mod and API for Among Us</Description>
|
||||
<Authors>NuclearPowered</Authors>
|
||||
|
||||
+13
-14
@@ -4,6 +4,7 @@ using BepInEx;
|
||||
using BepInEx.Configuration;
|
||||
using BepInEx.IL2CPP;
|
||||
using HarmonyLib;
|
||||
using Reactor.Extensions;
|
||||
using Reactor.Networking;
|
||||
using Reactor.Networking.MethodRpc;
|
||||
using Reactor.Networking.Serialization;
|
||||
@@ -11,6 +12,7 @@ using Reactor.Patches;
|
||||
using Reactor.Unstrip;
|
||||
using UnhollowerBaseLib.Attributes;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Reactor
|
||||
{
|
||||
@@ -23,7 +25,7 @@ namespace Reactor
|
||||
|
||||
public ConfigEntry<bool>? AllowVanillaServers { get; private set; }
|
||||
|
||||
private RegionInfoWatcher RegionInfoWatcher { get; } = new RegionInfoWatcher();
|
||||
internal RegionInfoWatcher RegionInfoWatcher { get; } = new RegionInfoWatcher();
|
||||
|
||||
public ReactorPlugin()
|
||||
{
|
||||
@@ -44,11 +46,20 @@ namespace Reactor
|
||||
|
||||
this.AddComponent<ReactorComponent>().Plugin = this;
|
||||
this.AddComponent<Coroutines.Component>();
|
||||
this.AddComponent<Dispatcher>();
|
||||
|
||||
ReactorVersionShower.Initialize();
|
||||
FreeNamePatch.Initialize();
|
||||
SplashSkip.Initialize();
|
||||
DefaultBundle.Load();
|
||||
|
||||
SceneManager.add_sceneLoaded((Action<Scene, LoadSceneMode>) ((scene, _) =>
|
||||
{
|
||||
if (scene.name == "MainMenu")
|
||||
{
|
||||
ModManager.Instance.ShowModStamp();
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
public override bool Unload()
|
||||
@@ -69,23 +80,11 @@ namespace Reactor
|
||||
{
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
ModManager.Instance.ShowModStamp();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Plugin!.RegionInfoWatcher.Reload)
|
||||
{
|
||||
Plugin.RegionInfoWatcher.Reload = false;
|
||||
ServerManager.Instance.LoadServers();
|
||||
Plugin.Log.LogInfo("Region file reloaded");
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.F5))
|
||||
{
|
||||
Plugin.Log.LogInfo("Reloading all configs");
|
||||
Plugin!.Log.LogInfo("Reloading all configs");
|
||||
|
||||
foreach (var pluginInfo in IL2CPPChainloader.Instance.Plugins.Values)
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Reactor
|
||||
|
||||
try
|
||||
{
|
||||
ClassInjector.RegisterTypeInIl2CppWithInterfaces(type, true, interfaces);
|
||||
ClassInjector.RegisterTypeInIl2Cpp(type, new RegisterTypeOptions { Interfaces = interfaces });
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
+53
-47
@@ -4,9 +4,9 @@
|
||||
".NETStandard,Version=v2.1": {
|
||||
"AmongUs.GameLibs.Steam": {
|
||||
"type": "Direct",
|
||||
"requested": "[2021.6.30, )",
|
||||
"resolved": "2021.6.30",
|
||||
"contentHash": "TdlFO+S61WREk/sOV2YUmzQ6MFNXk5o+uxLv4i4ft/Z1VRkxFo66/ff3cR1ZfI8DuXni/Ao9rS4dJP+j85pEFA=="
|
||||
"requested": "[2022.2.23, )",
|
||||
"resolved": "2022.2.23",
|
||||
"contentHash": "CHMKmYSv00f7bU8pZ/NSfXNSSwKqCtcYyLsBmiFJ8asx+wmLKXHPsUbB9l+Ew2ZdisTt8lU+bQm2jznyWaMtdw=="
|
||||
},
|
||||
"BepInEx.AutoPlugin": {
|
||||
"type": "Direct",
|
||||
@@ -16,27 +16,27 @@
|
||||
},
|
||||
"BepInEx.IL2CPP": {
|
||||
"type": "Direct",
|
||||
"requested": "[6.0.0-be.521, )",
|
||||
"resolved": "6.0.0-be.521",
|
||||
"contentHash": "nzXG/X9u4Ane4KvzaTTon9iP2o3zBkPierrkefaq9tmmQ91FzXFtmFGkVZpD6hGqGjd+KRIn0c6my58+e0u+gw==",
|
||||
"requested": "[6.0.0-be.551, )",
|
||||
"resolved": "6.0.0-be.551",
|
||||
"contentHash": "RvGBR8aXv/AabeiPV6jepRkSXixei4UTtQD86dRrh0canunubXt8pmIybW+0aH7BP1wewiwHIQnrKNRbniMHjQ==",
|
||||
"dependencies": {
|
||||
"BepInEx.Core": "6.0.0-be.521",
|
||||
"BepInEx.Core": "6.0.0-be.551",
|
||||
"BepInEx.Il2Cpp.TlsAdapter": "1.0.1",
|
||||
"HarmonyX": "2.5.7",
|
||||
"Iced": "1.15.0",
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.19.5",
|
||||
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.19.5",
|
||||
"Il2CppAssemblyUnhollower.Tool": "0.4.19.5",
|
||||
"HarmonyX": "2.9.0",
|
||||
"Iced": "1.17.0",
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.23",
|
||||
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.23",
|
||||
"Il2CppAssemblyUnhollower.Tool": "0.4.23",
|
||||
"Il2CppDumper": "6.6.4",
|
||||
"MonoMod.RuntimeDetour": "21.10.10.1",
|
||||
"Samboy063.Cpp2IL.Core": "2021.5.3"
|
||||
"MonoMod.RuntimeDetour": "22.1.29.1",
|
||||
"Samboy063.Cpp2IL.Core": "2022.0.1"
|
||||
}
|
||||
},
|
||||
"BepInEx.IL2CPP.MSBuild": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.0.1, )",
|
||||
"resolved": "1.0.1",
|
||||
"contentHash": "fOxbM3r8vBo5djUh3R4/cfzYNwIL4EyPc2P7yGIPaR+jrql1eS2IW+4oy2MGpfvbMLGeDHaYubcYS4VSc7F3jw=="
|
||||
"requested": "[1.0.2, )",
|
||||
"resolved": "1.0.2",
|
||||
"contentHash": "RdnDWUFy0em+AtYXohvPx4HbGokvfzJaiVovFNj35PhwzMlgqHZRIxLHoTRnfJLeWJruqBi8PXJj03JqJAeQUw=="
|
||||
},
|
||||
"Microsoft.SourceLink.GitHub": {
|
||||
"type": "Direct",
|
||||
@@ -50,11 +50,11 @@
|
||||
},
|
||||
"BepInEx.Core": {
|
||||
"type": "Transitive",
|
||||
"resolved": "6.0.0-be.521",
|
||||
"contentHash": "O1UmrldEd72/0//LIdop26QuWwToNP3lXURfORKZGZv1Kp5nU03jS/hXIXEgDSzxRZJt5j+ffay7x+5eedXMbg==",
|
||||
"resolved": "6.0.0-be.551",
|
||||
"contentHash": "8/2XA14bH4w04KEtWxQ5J74uStOeiAV37entU/vSFA3rdesYycPZct3Te3eRJ2i5U0mVMXsP0xUDfdHVXDkfng==",
|
||||
"dependencies": {
|
||||
"HarmonyX": "2.5.7",
|
||||
"MonoMod.Utils": "21.10.10.1",
|
||||
"HarmonyX": "2.9.0",
|
||||
"MonoMod.Utils": "22.1.29.1",
|
||||
"SemanticVersioning": "2.0.0"
|
||||
}
|
||||
},
|
||||
@@ -73,41 +73,41 @@
|
||||
},
|
||||
"HarmonyX": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2.5.7",
|
||||
"contentHash": "BVQAIGbYKp6S6IoP4pduDFKT4ST6iO4WC/INHJDeK3y2CA1AyhNAgYuPTzap3TVfGFUwphNcDpWBTO7hMu5grw==",
|
||||
"resolved": "2.9.0",
|
||||
"contentHash": "vB03a0lJJefzSnPP8VJSzyTtgSx81dnxU2olfirHTBnbXY8Uc2BMoxCODPK1nzg4C53lQR0NOi+bp9170sYVFA==",
|
||||
"dependencies": {
|
||||
"MonoMod.RuntimeDetour": "21.10.10.1",
|
||||
"MonoMod.RuntimeDetour": "22.1.29.1",
|
||||
"System.Reflection.Emit": "4.7.0"
|
||||
}
|
||||
},
|
||||
"Iced": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.15.0",
|
||||
"contentHash": "zSMOcs5qL77q4yb4O4cCrnY3/E8TMrKiz9vDvHgpQacs97gtnj2JfU9WoagNgwdn3C07CmEVaaQMxto11Uh5yQ=="
|
||||
"resolved": "1.17.0",
|
||||
"contentHash": "8x+HCVTl/HHTGpscH3vMBhV8sknN/muZFw9s3TsI8SA6+c43cOTCi2+jE4KsU8pNLbJ++iF2ZFcpcXHXtDglnw=="
|
||||
},
|
||||
"Il2CppAssemblyUnhollower.BaseLib": {
|
||||
"type": "Transitive",
|
||||
"resolved": "0.4.19.5",
|
||||
"contentHash": "UP0vtj0iDigQ/HZBq6+sP/btgDLc5Ibt1WkFrPvXvOtkgjt+cIdKpJmxVZHwMluUmP6Wsy3RCXeLlXE9eC/15Q==",
|
||||
"resolved": "0.4.23",
|
||||
"contentHash": "5KJfb2ILowJyVpLqpGcWmVG2cdphQj4jUSN1LZDVdhx5Co0eL1PqXVZyma0u/tbv568YZLKVh+N8lbzPIhwm+A==",
|
||||
"dependencies": {
|
||||
"Iced": "1.15.0"
|
||||
}
|
||||
},
|
||||
"Il2CppAssemblyUnhollower.BaseLib.Legacy": {
|
||||
"type": "Transitive",
|
||||
"resolved": "0.4.19.5",
|
||||
"contentHash": "dxn4ADz0VlWQtSnNhVIaFzQREnSwZEvS6YaFmwuKW+wbLdHTk9D9bDbS5QkL8glKdgoW2ifpvCBgKd1QAui/1w==",
|
||||
"resolved": "0.4.23",
|
||||
"contentHash": "gfQbpDvZ+gFTHiMQxB60IfUARQtIdmPrNjrWgTdtUkgfBlGIFlHxBWjYByei0yGUKQk8HVgKy9nniOy75Ven5Q==",
|
||||
"dependencies": {
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.19.5"
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.23"
|
||||
}
|
||||
},
|
||||
"Il2CppAssemblyUnhollower.Tool": {
|
||||
"type": "Transitive",
|
||||
"resolved": "0.4.19.5",
|
||||
"contentHash": "TYfW5UA77dy0a0N1XaIkZJLMyJIXdHO9q3jyuhTdsZdpuD/oi7qZt1GDlpI5dsg2nf9HKVAlIPNagtIqK9pYvw==",
|
||||
"resolved": "0.4.23",
|
||||
"contentHash": "13TOP6ywMkgRVkhDpfMskBFMwxmEqBD0h8vboRaOdNhep5XDgGOkatb7jHOxlbDx1keeMoB/aSGufjgdpIpOpg==",
|
||||
"dependencies": {
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.19.5",
|
||||
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.19.5",
|
||||
"Il2CppAssemblyUnhollower.BaseLib": "0.4.23",
|
||||
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.23",
|
||||
"Mono.Cecil": "0.11.3"
|
||||
}
|
||||
},
|
||||
@@ -151,11 +151,11 @@
|
||||
},
|
||||
"MonoMod.RuntimeDetour": {
|
||||
"type": "Transitive",
|
||||
"resolved": "21.10.10.1",
|
||||
"contentHash": "cZFLf8kCTqGAznnrGfAX8tRrMrHFH8hFHtX/Cr/CFZOcHFZZICUA03Cmjs97uoquvKpV1D2YEHGhtLprPj+ZUg==",
|
||||
"resolved": "22.1.29.1",
|
||||
"contentHash": "CksRFEGCPs8VGKe6pc3zsOPd2Jik+FMlmx5HDxWVTxz9JlAmWDk1+0PCwAVw4iGDuDZmIUjZDjhSACasyw9y/Q==",
|
||||
"dependencies": {
|
||||
"Mono.Cecil": "0.11.4",
|
||||
"MonoMod.Utils": "21.10.10.1",
|
||||
"MonoMod.Utils": "22.1.29.1",
|
||||
"System.Collections.NonGeneric": "4.3.0",
|
||||
"System.ComponentModel.TypeConverter": "4.3.0",
|
||||
"System.IO.FileSystem.Primitives": "4.3.0",
|
||||
@@ -166,8 +166,8 @@
|
||||
},
|
||||
"MonoMod.Utils": {
|
||||
"type": "Transitive",
|
||||
"resolved": "21.10.10.1",
|
||||
"contentHash": "y1ZION4RwtrnLYmE4SqI2Mnk9zZgwQlxUnfdwe0MJS8KWuSi9tU1h6RUZFaEUWSSiVE12Q2wba1Sv45j33+DLw==",
|
||||
"resolved": "22.1.29.1",
|
||||
"contentHash": "qKyM/JXIA3hr2BpE5LTtYfZvIFlcLB62pkORARRv0bXKSk1n23Nl3oAdYymQMjNfrhn/jCPZRqKDFftrYa1K2Q==",
|
||||
"dependencies": {
|
||||
"Mono.Cecil": "0.11.4",
|
||||
"System.Collections.NonGeneric": "4.3.0",
|
||||
@@ -180,27 +180,33 @@
|
||||
},
|
||||
"Samboy063.Cpp2IL.Core": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2021.5.3",
|
||||
"contentHash": "e7YdrON5J8Y3KYCwku6srp1/UdCYii/EHCLU1+sVnqKnoEnJh+CZXb2VHuKQ5IRJKLfDq2GDeWdEU8KxOW/7vQ==",
|
||||
"resolved": "2022.0.1",
|
||||
"contentHash": "oAJ1neR8sA4P1nFHRuhJqmaWC3zOGpxq0kuF4OTxCwxhUAU81fR10LzSWZHF2fHTSTIedyjNq9ve9W0B67qUbA==",
|
||||
"dependencies": {
|
||||
"Gee.External.Capstone": "2.0.2",
|
||||
"HarmonyX": "2.5.5",
|
||||
"Iced": "1.11.1",
|
||||
"IndexRange": "1.0.0",
|
||||
"Mono.Cecil": "0.11.4",
|
||||
"Samboy063.LibCpp2IL": "2021.5.3",
|
||||
"Samboy063.LibCpp2IL": "2022.0.1",
|
||||
"System.Runtime.InteropServices": "4.3.0",
|
||||
"System.ValueTuple": "4.5.0"
|
||||
}
|
||||
},
|
||||
"Samboy063.LibCpp2IL": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2021.5.3",
|
||||
"contentHash": "8N9PZiNqERUXQKRmjiacsC86/qxuBFHeD+P84MXtIzb7X9BkKuPp6N7YfoLv3EFrS+NFbd8gAgPBmAOAb80j+Q==",
|
||||
"resolved": "2022.0.1",
|
||||
"contentHash": "J22g/FsKDUMMUBFdCZicLwC0WilqrkeGD1JHHtrwFC0GwDtG6+ECvjGU/hO6ImxktSwHo05bpN+kLNYZB4U2BA==",
|
||||
"dependencies": {
|
||||
"Iced": "1.11.1",
|
||||
"IndexRange": "1.0.0"
|
||||
"IndexRange": "1.0.0",
|
||||
"Samboy063.WasmDisassembler": "2022.0.0"
|
||||
}
|
||||
},
|
||||
"Samboy063.WasmDisassembler": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2022.0.0",
|
||||
"contentHash": "1CKCMRwvw53MionMQxSQtmVymG9qDLckQne2OqwnU+Mb19ZF8CVYoVVdk3o01mBIkPWsXgTjTO2DEGE6tA+Gtw=="
|
||||
},
|
||||
"SemanticVersioning": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2.0.0",
|
||||
|
||||
Reference in new issue
Block a user