mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-20 21:35:55 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22550a88ca | ||
|
|
2b98a211bd | ||
|
|
cb799e877e | ||
|
|
fcc8056aaa | ||
|
|
c4a8c8abbe | ||
|
|
7203698222 | ||
|
|
d3fa33aaf0 |
No files matched your search
@@ -44,3 +44,9 @@ jobs:
|
||||
with:
|
||||
name: Reactor.Debugger.dll
|
||||
path: Reactor.Debugger/bin/Release/netstandard2.1/Reactor.Debugger.dll
|
||||
|
||||
- uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
draft: true
|
||||
files: Reactor/bin/Release/netstandard2.1/Reactor.dll
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<GamePlatform Condition="'$(GamePlatform)' == ''">Steam</GamePlatform>
|
||||
<GameVersion Condition="'$(GamePlatform)' == 'Steam'">2022.2.23</GameVersion>
|
||||
<GameVersion Condition="'$(GamePlatform)' == 'Itch'">2021.12.15</GameVersion>
|
||||
<GameVersion Condition="'$(GamePlatform)' == 'Steam'">2022.3.29</GameVersion>
|
||||
<GameVersion Condition="'$(GamePlatform)' == 'Itch'">2022.3.29</GameVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -80,10 +80,11 @@ namespace Reactor.Debugger
|
||||
playerControl.GetComponent<DummyBehaviour>().enabled = true;
|
||||
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(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);
|
||||
var color = (byte) (i % Palette.PlayerColors.Length);
|
||||
playerControl.SetColor(color);
|
||||
playerControl.SetHat(HatManager.Instance.allHats[i % HatManager.Instance.allHats.Count].ProdId, playerControl.Data.DefaultOutfit.ColorId);
|
||||
playerControl.SetPet(HatManager.Instance.allPets[i % HatManager.Instance.allPets.Count].ProdId);
|
||||
playerControl.SetSkin(HatManager.Instance.allSkins[i % HatManager.Instance.allSkins.Count].ProdId, color);
|
||||
GameData.Instance.RpcSetTasks(playerControl.PlayerId, new Il2CppStructArray<byte>(0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
".NETStandard,Version=v2.1": {
|
||||
"AmongUs.GameLibs.Steam": {
|
||||
"type": "Direct",
|
||||
"requested": "[2022.2.23, )",
|
||||
"resolved": "2022.2.23",
|
||||
"contentHash": "CHMKmYSv00f7bU8pZ/NSfXNSSwKqCtcYyLsBmiFJ8asx+wmLKXHPsUbB9l+Ew2ZdisTt8lU+bQm2jznyWaMtdw=="
|
||||
"requested": "[2022.3.29, )",
|
||||
"resolved": "2022.3.29",
|
||||
"contentHash": "EStKwHGq8MMvSRxIHjlh31VJmCZrGHZ/xoDDN33L5gh7XJLWBFufo6+5ueezndSRpanoCkqLwuTkG73KCS2J1A=="
|
||||
},
|
||||
"BepInEx.AutoPlugin": {
|
||||
"type": "Direct",
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
".NETStandard,Version=v2.1": {
|
||||
"AmongUs.GameLibs.Steam": {
|
||||
"type": "Direct",
|
||||
"requested": "[2022.2.23, )",
|
||||
"resolved": "2022.2.23",
|
||||
"contentHash": "CHMKmYSv00f7bU8pZ/NSfXNSSwKqCtcYyLsBmiFJ8asx+wmLKXHPsUbB9l+Ew2ZdisTt8lU+bQm2jznyWaMtdw=="
|
||||
"requested": "[2022.3.29, )",
|
||||
"resolved": "2022.3.29",
|
||||
"contentHash": "EStKwHGq8MMvSRxIHjlh31VJmCZrGHZ/xoDDN33L5gh7XJLWBFufo6+5ueezndSRpanoCkqLwuTkG73KCS2J1A=="
|
||||
},
|
||||
"BepInEx.AutoPlugin": {
|
||||
"type": "Direct",
|
||||
|
||||
@@ -32,14 +32,14 @@ namespace Reactor
|
||||
}
|
||||
|
||||
public static implicit operator StringNames(CustomStringName name) => (StringNames) name.Id;
|
||||
public static explicit operator CustomStringName(StringNames name) => List.SingleOrDefault(x => x.Id == (int) name);
|
||||
public static explicit operator CustomStringName?(StringNames name) => List.SingleOrDefault(x => x.Id == (int) name);
|
||||
|
||||
[HarmonyPatch(typeof(LanguageUnit), nameof(LanguageUnit.GetString), typeof(StringNames), typeof(string), typeof(Il2CppReferenceArray<Il2CppSystem.Object>))]
|
||||
[HarmonyPatch(typeof(TranslationController), nameof(TranslationController.GetString), typeof(StringNames), typeof(Il2CppReferenceArray<Il2CppSystem.Object>))]
|
||||
private static class GetStringPatch
|
||||
{
|
||||
public static bool Prefix(StringNames stringId, Il2CppReferenceArray<Il2CppSystem.Object> parts, ref string __result)
|
||||
public static bool Prefix(StringNames id, Il2CppReferenceArray<Il2CppSystem.Object> parts, ref string __result)
|
||||
{
|
||||
var customStringName = (CustomStringName) stringId;
|
||||
var customStringName = (CustomStringName?) id;
|
||||
|
||||
if (customStringName != null)
|
||||
{
|
||||
|
||||
@@ -57,12 +57,25 @@ namespace Reactor.Patches
|
||||
[HarmonyPatch(typeof(FileIO), nameof(FileIO.WriteAllText))]
|
||||
private static class WritePatch
|
||||
{
|
||||
public static void Prefix(string path)
|
||||
public static bool Prefix(string path, string contents)
|
||||
{
|
||||
// Among Us' region loading code unfortunately contains a call
|
||||
// to SaveServers, which will write out the region file. This
|
||||
// will lead to a positive feedback loop when detecting writes,
|
||||
// which is undesireable. So we check if the write makes a
|
||||
// change to the file on disk and if it would write the same
|
||||
// file again, stop AU from actually writing it.
|
||||
if (ServerManager.Instance && path == ServerManager.Instance.serverInfoFileJson)
|
||||
{
|
||||
PluginSingleton<ReactorPlugin>.Instance.RegionInfoWatcher.IgnoreNext = true;
|
||||
var currentContents = FileIO.ReadAllText(path);
|
||||
var continueWrite = currentContents != 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;
|
||||
return continueWrite;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,13 @@
|
||||
using System;
|
||||
using UnityEngine.SceneManagement;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace Reactor.Patches
|
||||
{
|
||||
[HarmonyPatch(typeof(SplashManager), nameof(SplashManager.Start))]
|
||||
internal static class SplashSkip
|
||||
{
|
||||
internal static void Initialize()
|
||||
private static void Prefix(SplashManager __instance)
|
||||
{
|
||||
SceneManager.add_sceneLoaded((Action<Scene, LoadSceneMode>) ((scene, _) =>
|
||||
{
|
||||
if (scene.name == "SplashIntro")
|
||||
{
|
||||
SceneManager.LoadScene("MainMenu");
|
||||
}
|
||||
}));
|
||||
__instance.minimumSecondsBeforeSceneChange = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
||||
<VersionPrefix>1.2.3</VersionPrefix>
|
||||
<VersionPrefix>1.2.6</VersionPrefix>
|
||||
<VersionSuffix>dev</VersionSuffix>
|
||||
<Description>Core mod and API for Among Us</Description>
|
||||
<Authors>NuclearPowered</Authors>
|
||||
|
||||
@@ -50,7 +50,6 @@ namespace Reactor
|
||||
|
||||
ReactorVersionShower.Initialize();
|
||||
FreeNamePatch.Initialize();
|
||||
SplashSkip.Initialize();
|
||||
DefaultBundle.Load();
|
||||
|
||||
SceneManager.add_sceneLoaded((Action<Scene, LoadSceneMode>) ((scene, _) =>
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
".NETStandard,Version=v2.1": {
|
||||
"AmongUs.GameLibs.Steam": {
|
||||
"type": "Direct",
|
||||
"requested": "[2022.2.23, )",
|
||||
"resolved": "2022.2.23",
|
||||
"contentHash": "CHMKmYSv00f7bU8pZ/NSfXNSSwKqCtcYyLsBmiFJ8asx+wmLKXHPsUbB9l+Ew2ZdisTt8lU+bQm2jznyWaMtdw=="
|
||||
"requested": "[2022.3.29, )",
|
||||
"resolved": "2022.3.29",
|
||||
"contentHash": "EStKwHGq8MMvSRxIHjlh31VJmCZrGHZ/xoDDN33L5gh7XJLWBFufo6+5ueezndSRpanoCkqLwuTkG73KCS2J1A=="
|
||||
},
|
||||
"BepInEx.AutoPlugin": {
|
||||
"type": "Direct",
|
||||
|
||||
Reference in new issue
Block a user