Add support for 2022.8.23

This commit is contained in:
js6pak committed 2022-08-23 20:36:20 +02:00
1 parent 16135fa897
commit 9893fc9e45
6 files changed
+21 -14

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
<Project>
<PropertyGroup>
<GamePlatform Condition="'$(GamePlatform)' == ''">Steam</GamePlatform>
<GameVersion Condition="'$(GamePlatform)' == 'Steam'">2022.6.21</GameVersion>
<GameVersion Condition="'$(GamePlatform)' == 'Itch'">2022.6.21</GameVersion>
<GameVersion Condition="'$(GamePlatform)' == 'Steam'">2022.8.23</GameVersion>
<GameVersion Condition="'$(GamePlatform)' == 'Itch'">2022.8.23</GameVersion>
</PropertyGroup>
<ItemGroup>
+3 -3
View File
@@ -4,9 +4,9 @@
".NETStandard,Version=v2.1": {
"AmongUs.GameLibs.Steam": {
"type": "Direct",
"requested": "[2022.6.21, )",
"resolved": "2022.6.21",
"contentHash": "l5lB5cTEBRWW+WNOso11mT8csmoZK7CUEqTkACSTwQbxtMQyZN9YORNxkJmtOD7pZnNkbWJ3dLAvQ6pMUsFDsQ=="
"requested": "[2022.8.23, )",
"resolved": "2022.8.23",
"contentHash": "baY5JO6dbdOAZ0VTtGX0xre6/BlDdreJDAH8boCKZt3JTAcn+eeH+l8mUZRC9eCJOODUik2C0TTAt5AqBmYtZg=="
},
"BepInEx.AutoPlugin": {
"type": "Direct",
+3 -3
View File
@@ -4,9 +4,9 @@
".NETStandard,Version=v2.1": {
"AmongUs.GameLibs.Steam": {
"type": "Direct",
"requested": "[2022.6.21, )",
"resolved": "2022.6.21",
"contentHash": "l5lB5cTEBRWW+WNOso11mT8csmoZK7CUEqTkACSTwQbxtMQyZN9YORNxkJmtOD7pZnNkbWJ3dLAvQ6pMUsFDsQ=="
"requested": "[2022.8.23, )",
"resolved": "2022.8.23",
"contentHash": "baY5JO6dbdOAZ0VTtGX0xre6/BlDdreJDAH8boCKZt3JTAcn+eeH+l8mUZRC9eCJOODUik2C0TTAt5AqBmYtZg=="
},
"BepInEx.AutoPlugin": {
"type": "Direct",
+9 -2
View File
@@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Reflection;
using HarmonyLib;
using Reactor.Extensions;
using UnityEngine;
@@ -54,9 +55,15 @@ namespace Reactor.Patches
Watcher.Dispose();
}
[HarmonyPatch(typeof(FileIO), nameof(FileIO.WriteAllText))]
[HarmonyPatch]
private static class WritePatch
{
public static MethodBase TargetMethod()
{
var type = Type.GetType("FileIO, Assembly-CSharp", false) ?? Type.GetType("Innersloth.IO.FileIO, Assembly-CSharp", true);
return AccessTools.Method(type, "WriteAllText");
}
public static bool Prefix(string path, string contents)
{
// Among Us' region loading code unfortunately contains a call
@@ -67,7 +74,7 @@ namespace Reactor.Patches
// file again, stop AU from actually writing it.
if (ServerManager.Instance && path == ServerManager.Instance.serverInfoFileJson)
{
var continueWrite = !FileIO.Exists(path) || FileIO.ReadAllText(path) != contents;
var continueWrite = !File.Exists(path) || File.ReadAllText(path) != contents;
Logger<ReactorPlugin>.Debug($"Continue serverInfoFile write? {continueWrite}");
// If we will write, ignore the next change action from the observer.
PluginSingleton<ReactorPlugin>.Instance.RegionInfoWatcher.IgnoreNext = continueWrite;
+1 -1
View File
@@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<VersionPrefix>1.2.7</VersionPrefix>
<VersionPrefix>1.2.8</VersionPrefix>
<VersionSuffix>dev</VersionSuffix>
<Description>Core mod and API for Among Us</Description>
<Authors>NuclearPowered</Authors>
+3 -3
View File
@@ -4,9 +4,9 @@
".NETStandard,Version=v2.1": {
"AmongUs.GameLibs.Steam": {
"type": "Direct",
"requested": "[2022.6.21, )",
"resolved": "2022.6.21",
"contentHash": "l5lB5cTEBRWW+WNOso11mT8csmoZK7CUEqTkACSTwQbxtMQyZN9YORNxkJmtOD7pZnNkbWJ3dLAvQ6pMUsFDsQ=="
"requested": "[2022.8.23, )",
"resolved": "2022.8.23",
"contentHash": "baY5JO6dbdOAZ0VTtGX0xre6/BlDdreJDAH8boCKZt3JTAcn+eeH+l8mUZRC9eCJOODUik2C0TTAt5AqBmYtZg=="
},
"BepInEx.AutoPlugin": {
"type": "Direct",