7 Commits
Author SHA1 Message Date
js6pak a6152f559c Revert "Start working on http handshake support"
This reverts commit 3579ecb89e.
2022-08-23 20:47:22 +02:00
js6pak 9893fc9e45 Add support for 2022.8.23 2022-08-23 20:36:20 +02:00
js6pak 16135fa897 Merge pull request #58 from miniduikboot/fix/ci-caching 2022-08-07 18:21:05 +00:00
miniduikboot 0eb6ac0cbe Fix CI Caching by cloning first
The cache action requires the checksum of the packages.lock.json files,
but can't find them because the repository wasn't cloned yet. So clone
the repository first
2022-08-07 19:50:32 +02:00
js6pak 3579ecb89e Start working on http handshake support 2022-07-30 01:00:58 +02:00
js6pak ff7a80addf Fix regioninfo watcher crashing when the file doesn't exist 2022-07-29 21:17:17 +02:00
js6pak ef6baeacce Fix epic splashskip fix 2022-07-29 21:00:35 +02:00
8 changed files with 39 additions and 25 deletions

No files matched your search

+6 -6
View File
@@ -1,13 +1,17 @@
name: CI
on: [ "push", "pull_request" ]
on: ["push", "pull_request"]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/cache@v2
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/cache@v3
with:
path: |
~/.nuget/packages
@@ -16,10 +20,6 @@ jobs:
restore-keys: |
${{ runner.os }}-nuget-
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
+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 -3
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,8 +74,7 @@ namespace Reactor.Patches
// file again, stop AU from actually writing it.
if (ServerManager.Instance && path == ServerManager.Instance.serverInfoFileJson)
{
var currentContents = FileIO.ReadAllText(path);
var continueWrite = currentContents != 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;
+12 -4
View File
@@ -1,7 +1,5 @@
using System.Reflection;
using HarmonyLib;
using System;
using MonoMod.Utils;
namespace Reactor.Patches
{
@@ -18,18 +16,28 @@ namespace Reactor.Patches
internal static class WaitForEpicAuth
{
private static readonly PropertyInfo? _localUserIdProperty = typeof(EpicManager).GetProperty("localUserId", BindingFlags.Static | BindingFlags.Public);
private static readonly Func<object>? _localUserId = _localUserIdProperty == null ? null : _localUserIdProperty.GetMethod.CreateDelegate<Func<object>>();
private static bool _loginFinished;
private static bool Prefix(SplashManager __instance)
{
if (__instance.startedSceneLoad) return true;
if (_localUserId != null && _localUserId() == null)
if (_localUserIdProperty != null && !_loginFinished)
{
return false;
}
return true;
}
// EpicManager calls SaveManager.LoadPlayerPrefs(true) both on successful and unsuccessful EOS login
[HarmonyPatch(typeof(SaveManager), nameof(SaveManager.LoadPlayerPrefs))]
private static class LoadPlayerPrefsPatch
{
private static void Postfix(bool overrideLoad)
{
if (overrideLoad) _loginFinished = true;
}
}
}
}
+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",