mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-19 15:51:54 +00:00
Add support for 2022.8.23
This commit is contained in:
6 files changed
+21
-14
No files matched your search
+2
-2
@@ -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>
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user