70 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
js6pak f24cbf182a 1.2.7 2022-06-24 04:58:30 +02:00
js6pak fdda5571b2 Bump dependencies 2022-06-24 04:58:10 +02:00
js6pak 89f06e01f1 Fix splash skip on epic 2022-06-24 04:50:17 +02:00
js6pak 0a03a9d90d Fix udp matchmaking 2022-06-03 21:49:56 +02:00
js6pak 22550a88ca 1.2.6 2022-05-31 00:40:18 +02:00
js6pak 2b98a211bd Merge pull request #55 from miniduikboot/fix/region-info-feedback-loop
Improve regionInfo.json writing logic
2022-05-30 21:43:05 +00:00
miniduikboot cb799e877e Improve regionInfo.json writing logic
Since a few version AU writes the regionInfo.json file after loading it.
This triggers the write observer, causing a positive feedback loop.
70155fe8a6 took the first stab at stopping
this positive feedback, but unfortunately it isn't adequate enough when
4+ clients are running at the same time, so this commit takes it a step
further by not writing the data if it didn't change, stopping the loop.
2022-05-30 23:38:15 +02:00
js6pak fcc8056aaa 1.2.5 2022-05-06 14:02:13 +02:00
js6pak c4a8c8abbe [skip ci] Create release from CI 2022-05-06 14:00:24 +02:00
js6pak 7203698222 Totally didn't forget to commit this 2022-04-01 10:08:10 +02:00
js6pak d3fa33aaf0 2022.3.29 2022-03-31 22:26:18 +02:00
js6pak bbcb1abb67 Merge pull request #53 from miniduikboot/fix/usedtls-desync 2022-03-09 22:54:14 +01:00
miniduikboot 9b1211f505 Add prefix patch to sync up useDtlsLayout argument
Workaround a much deeper, yet unknown issue
2022-03-03 22:01:19 +01:00
js6pak e58f8b5aef Update CustomServersPatch for 2022.2.8+ 2022-02-27 15:52:08 +01:00
js6pak bac31b1b51 Support 2022.2.23s and bump dependencies 2022-02-26 17:43:08 +01:00
amsyarasyiq d2e5d026e3 Patch random name generator (#46) 2022-02-18 21:54:03 +00:00
js6pak 081e6e2ba9 1.2.1 2022-02-18 22:40:48 +01:00
js6pak 70155fe8a6 Don't reload regionInfo.json when the game saves it 2022-02-18 22:38:35 +01:00
js6pak 89a8adadf7 2021.12.15 2021-12-21 15:53:08 +01:00
js6pak 837ee142b3 2021.12.14 2021-12-15 19:45:27 +01:00
js6pak 2453bff8df Merge branch '2021.11.9' 2021-12-14 23:17:43 +01:00
js6pak f501dc1897 RandomExtensions 2021-12-14 22:40:12 +01:00
js6pak f3b510ae2a Bump version to 1.2.0 2021-12-03 00:53:28 +01:00
js6pak bc9b8ea8a2 Merge remote-tracking branch 'origin/master' into 2021.11.9 2021-12-03 00:52:46 +01:00
Simon Kelly c96f12029e Allow sending method rpcs immediately (#45) 2021-11-24 15:28:51 +00:00
js6pak 8e8beaf30c Merge remote-tracking branch 'origin/master' into 2021.11.9
# Conflicts:
#	AmongUs.props
#	Reactor.Debugger/packages.lock.json
#	Reactor.Example/packages.lock.json
#	Reactor/packages.lock.json
2021-11-20 01:20:39 +01:00
js6pak d92447a490 Update packages 2021-11-19 23:24:32 +01:00
js6pak d9e5e7f1a9 Fix freeplay 2021-11-11 11:35:30 +01:00
js6pak 40ae06899c Update CI to .NET 6 2021-11-10 15:45:39 +01:00
js6pak 73e21fc406 2021.11.9 2021-11-10 15:43:17 +01:00
js6pak f63f1bc884 Fix method rpc registration 2021-11-06 12:14:14 +01:00
Simon Kelly 6613fb007f Use BepInEx Coroutines (#42) 2021-11-06 11:01:42 +00:00
js6pak 5f807e4122 Ensure it wont happen in future 2021-11-04 14:38:48 +01:00
js6pak 12d44b1482 Fix freeplay in some cases 2021-11-04 14:36:41 +01:00
js6pakandminiduikboot d5929c270a Add ServerInfoFixes
Co-authored-by: miniduikboot <mini@duikbo.at>
2021-11-02 21:18:26 +01:00
js6pak d39b31059f Delete PlayerColor 2021-11-02 20:24:23 +01:00
js6pak f8faf5117d Enable nullable 2021-11-02 20:07:28 +01:00
js6pak 111ef34298 Upgrade deps 2021-11-01 21:32:10 +01:00
js6pak 213bb27444 Add cache to CI 2021-11-01 00:51:13 +01:00
js6pak e0154f2fc5 Upgrade deps 2021-11-01 00:37:18 +01:00
js6pak 90536631f9 Dispose DefaultBundle stream 2021-10-31 02:58:51 +02:00
js6pak 7a84617b1b StreamWrapper 2021-10-31 02:12:26 +02:00
js6pak ad1635df9e Use even more new unhollower features 2021-10-30 21:26:42 +02:00
js6pak ade1cfc35f Fix imgui windows flickering 2021-10-30 13:43:36 +02:00
Simon Kellyandjs6pak dd3e49144d Support new unhollower features (#40)
Co-authored-by: js6pak <kubastaron@hotmail.com>
2021-10-29 21:12:51 +00:00
js6pak feb44ea6b6 Merge branch 'free-name-patch' into bepinex-upgrade 2021-10-24 01:37:36 +02:00
js6pak 534382a263 Merge branch 'method_rpc' into bepinex-upgrade
# Conflicts:
#	Reactor.Example/ExamplePlugin.cs
2021-10-24 01:34:12 +02:00
js6pak 88b3b39066 Initial BepInEx upgrade 2021-10-24 01:32:43 +02:00
js6pak 179cb84da2 PluginSide from AssemblyMetadataAttribute 2021-10-23 21:44:03 +02:00
amsyarasyiq 959c5b1fc8 Better math 2021-08-26 11:27:01 +08:00
amsyarasyiq 5d362b0885 Move objects 2021-08-26 08:59:42 +08:00
amsyarasyiq 089dada562 Readd FreeNamePatch 2021-08-26 08:57:21 +08:00
js6pak 1107480ea2 Add .editorconfig 2021-07-27 20:21:11 +02:00
js6pak 7d02cb9616 IL gen refactor and serialization changes 2021-07-27 16:18:11 +02:00
Zirno 41413eea20 Add ReaderWriter for custom types 2021-07-26 17:07:57 +02:00
Zirno c6d2ff686b Some Optimizations 2021-07-26 17:07:57 +02:00
Zirno 63fdde22c6 Add an Example 2021-07-26 17:07:57 +02:00
Zirno eb7fce3350 method Rpc 2021-07-26 17:07:57 +02:00
js6pak 0f0d322c8c BepInEx version check 2021-07-26 16:38:47 +02:00
js6pak 31e8bd4f6f Simplify CustomStringName patches 2021-07-21 00:22:35 +02:00
js6pak fbe03ebac5 Fix coroutine exception handling 2021-07-07 20:41:30 +02:00
js6pak c009f5a7a2 2021.6.30 2021-07-07 19:17:17 +02:00
js6pak 51b5ec8f3a Update Reactor.MSBuild 2021-06-30 21:28:45 +02:00
50 changed files with 2854 additions and 687 deletions

No files matched your search

+217
View File
@@ -1,3 +1,220 @@
# top-most EditorConfig file
root = true
[*]
indent_style = space
charset = utf-8
end_of_line = lf
insert_final_newline = true
# Code files
[*.{cs, csx, vb, vbx}]
indent_size = 4
# XML project files
[*.{csproj, vbproj, vcxproj, vcxproj.filters, proj, projitems, shproj}]
indent_size = 4
# XML config files
[*.{props, targets, ruleset, config, nuspec, resx, vsixmanifest, vsct}]
indent_size = 4
# Dotnet code style settings:
[*.{cs, vb}]
# IDE0055: Fix formatting
dotnet_diagnostic.IDE0055.severity = warning
# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false
# Avoid "this." and "Me." if not necessary
dotnet_style_qualification_for_field = false:refactoring
dotnet_style_qualification_for_property = false:refactoring
dotnet_style_qualification_for_method = false:refactoring
dotnet_style_qualification_for_event = false:refactoring
# Use language keywords instead of framework type names for type references
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
# Suggest more modern language features when available
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
# Non-private static fields are PascalCase
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style
dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected
dotnet_naming_symbols.non_private_static_fields.required_modifiers = static
dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case
# Non-private readonly fields are PascalCase
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.symbols = non_private_readonly_fields
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.style = non_private_readonly_field_style
dotnet_naming_symbols.non_private_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected
dotnet_naming_symbols.non_private_readonly_fields.required_modifiers = readonly
dotnet_naming_style.non_private_readonly_field_style.capitalization = pascal_case
# Constants are PascalCase
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style
dotnet_naming_symbols.constants.applicable_kinds = field, local
dotnet_naming_symbols.constants.required_modifiers = const
dotnet_naming_style.constant_style.capitalization = pascal_case
# Instance fields are camelCase and start with _
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
dotnet_naming_symbols.instance_fields.applicable_kinds = field
dotnet_naming_style.instance_field_style.capitalization = camel_case
dotnet_naming_style.instance_field_style.required_prefix = _
# Locals and parameters are camelCase
dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion
dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters
dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local
dotnet_naming_style.camel_case_style.capitalization = camel_case
# Local functions are PascalCase
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions
dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
dotnet_naming_style.local_function_style.capitalization = pascal_case
# By default, name items with PascalCase
dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members
dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.all_members.applicable_kinds = *
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# Async methods should have "Async" suffix
dotnet_naming_rule.async_methods_end_in_async.symbols = any_async_methods
dotnet_naming_rule.async_methods_end_in_async.style = end_in_async
dotnet_naming_rule.async_methods_end_in_async.severity = warning
dotnet_naming_symbols.any_async_methods.applicable_kinds = method
dotnet_naming_symbols.any_async_methods.applicable_accessibilities = *
dotnet_naming_symbols.any_async_methods.required_modifiers = async
dotnet_naming_style.end_in_async.required_prefix =
dotnet_naming_style.end_in_async.required_suffix = Async
dotnet_naming_style.end_in_async.capitalization = pascal_case
dotnet_naming_style.end_in_async.word_separator =
# error RS2008: Enable analyzer release tracking for the analyzer project containing rule '{0}'
dotnet_diagnostic.RS2008.severity = none
# IDE0005: Remove unnecessary import
dotnet_diagnostic.IDE0005.severity = warning
# IDE0007: Use `var` instead of explicit type
dotnet_diagnostic.IDE0007.severity = warning
# IDE0035: Remove unreachable code
dotnet_diagnostic.IDE0035.severity = warning
# IDE0036: Order modifiers
dotnet_diagnostic.IDE0036.severity = warning
# IDE0043: Format string contains invalid placeholder
dotnet_diagnostic.IDE0043.severity = warning
# IDE0044: Make field readonly
dotnet_diagnostic.IDE0044.severity = warning
# CSharp code style settings:
[*.cs]
# Newline settings
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
# csharp_new_line_before_members_in_object_initializers = true TODO seems like Rider/ReSharper has the value inverted, uncomment when its fixed
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = false
csharp_indent_switch_labels = true
csharp_indent_labels = flush_left
# Prefer "var" everywhere
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion
# Prefer method-like constructs to have a block body
csharp_style_expression_bodied_methods = false:none
csharp_style_expression_bodied_constructors = false:none
csharp_style_expression_bodied_operators = false:none
# Prefer property-like constructs to have an expression-body
csharp_style_expression_bodied_properties = true:none
csharp_style_expression_bodied_indexers = true:none
csharp_style_expression_bodied_accessors = true:none
# Suggest more modern language features when available
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion
# Space preferences
csharp_space_after_cast = true
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = do_not_ignore
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
# Blocks are allowed
csharp_prefer_braces = true:silent
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
+17 -2
View File
@@ -1,6 +1,6 @@
name: CI
on: [ "push", "pull_request" ]
on: ["push", "pull_request"]
jobs:
build:
@@ -11,10 +11,19 @@ jobs:
with:
submodules: true
- uses: actions/cache@v3
with:
path: |
~/.nuget/packages
~/.cache/bepinex
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- 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
@@ -35,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
+8 -12
View File
@@ -1,23 +1,19 @@
<Project>
<PropertyGroup>
<GamePlatform Condition="'$(GamePlatform)' == ''">Steam</GamePlatform>
<GameVersion Condition="'$(GamePlatform)' == 'Steam'">2021.6.15s</GameVersion>
<GameVersion Condition="'$(GamePlatform)' == 'Itch'">2021.6.15i</GameVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<GameProvider>$(GamePlatform)</GameProvider>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<GameProvider>Github</GameProvider>
<GameVersion Condition="'$(GamePlatform)' == 'Steam'">2022.8.23</GameVersion>
<GameVersion Condition="'$(GamePlatform)' == 'Itch'">2022.8.23</GameVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Reactor.MSBuild" Version="0.1.4" PrivateAssets="all" />
<PackageReference Include="BepInEx.IL2CPP" Version="6.0.0-be.570" />
<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.1.1" PrivateAssets="all" />
</ItemGroup>
<Target Name="Copy" AfterTargets="Build" Condition="'$(AmongUs)' != ''">
<Copy SourceFiles="$(OutputPath)$(AssemblyName).dll" DestinationFolder="$(AmongUs)/BepInEx/plugins/" Condition="'$(Configuration)' == 'Debug'" />
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(AmongUs)/BepInEx/plugins/" UseSymboliclinksIfPossible="true" />
</Target>
</Project>
+5
View File
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>
</Project>
+19 -31
View File
@@ -11,21 +11,18 @@ using UnityEngine;
namespace Reactor.Debugger
{
[BepInPlugin(Id)]
[BepInAutoPlugin("gg.reactor.debugger")]
[BepInProcess("Among Us.exe")]
[BepInDependency(ReactorPlugin.Id)]
[ReactorPluginSide(PluginSide.ClientOnly)]
public class DebuggerPlugin : BasePlugin
public partial class DebuggerPlugin : BasePlugin
{
public const string Id = "gg.reactor.debugger";
public Harmony Harmony { get; } = new Harmony(Id);
public DebuggerComponent Component { get; private set; }
public override void Load()
{
var gameObject = new GameObject(nameof(DebuggerPlugin)).DontDestroy();
Component = gameObject.AddComponent<DebuggerComponent>();
Component = this.AddComponent<DebuggerComponent>();
GameOptionsData.MaxImpostors = GameOptionsData.RecommendedImpostors = Enumerable.Repeat((int) byte.MaxValue, byte.MaxValue).ToArray();
GameOptionsData.MinPlayers = Enumerable.Repeat(1, 4).ToArray();
@@ -46,18 +43,18 @@ namespace Reactor.Debugger
{
TestWindow = new DragWindow(new Rect(20, 20, 0, 0), "Debugger", () =>
{
GUILayout.Label("Name: " + SaveManager.PlayerName, new Il2CppReferenceArray<GUILayoutOption>(0));
DisableGameEnd = GUILayout.Toggle(DisableGameEnd, "Disable game end", new Il2CppReferenceArray<GUILayoutOption>(0));
GUILayout.Label("Name: " + SaveManager.PlayerName);
DisableGameEnd = GUILayout.Toggle(DisableGameEnd, "Disable game end");
if (ShipStatus.Instance && AmongUsClient.Instance.AmHost)
{
if (GUILayout.Button("Force game end", new Il2CppReferenceArray<GUILayoutOption>(0)))
if (GUILayout.Button("Force game end"))
{
ShipStatus.Instance.enabled = false;
ShipStatus.RpcEndGame(GameOverReason.ImpostorDisconnect, false);
}
if (GUILayout.Button("Call a meeting", new Il2CppReferenceArray<GUILayoutOption>(0)))
if (GUILayout.Button("Call a meeting"))
{
PlayerControl.LocalPlayer.CmdReportDeadBody(null);
}
@@ -67,23 +64,13 @@ namespace Reactor.Debugger
{
var data = PlayerControl.LocalPlayer.Data;
var newIsImpostor = GUILayout.Toggle(data.IsImpostor, "Is Impostor", new Il2CppReferenceArray<GUILayoutOption>(0));
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", new Il2CppReferenceArray<GUILayoutOption>(0)))
if (GUILayout.Button("Spawn a dummy"))
{
var playerControl = Instantiate(TutorialManager.Instance.PlayerPrefab);
var i = playerControl.PlayerId = (byte) GameData.Instance.GetAvailableId();
@@ -93,19 +80,20 @@ 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(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]);
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));
}
}
if (PlayerControl.LocalPlayer)
{
var position = PlayerControl.LocalPlayer.transform.position;
GUILayout.Label($"x: {position.x}", new Il2CppReferenceArray<GUILayoutOption>(0));
GUILayout.Label($"y: {position.y}", new Il2CppReferenceArray<GUILayoutOption>(0));
GUILayout.Label($"x: {position.x}");
GUILayout.Label($"y: {position.y}");
}
})
{
+1 -1
View File
@@ -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)
+486
View File
@@ -0,0 +1,486 @@
{
"version": 1,
"dependencies": {
".NETStandard,Version=v2.1": {
"AmongUs.GameLibs.Steam": {
"type": "Direct",
"requested": "[2022.8.23, )",
"resolved": "2022.8.23",
"contentHash": "baY5JO6dbdOAZ0VTtGX0xre6/BlDdreJDAH8boCKZt3JTAcn+eeH+l8mUZRC9eCJOODUik2C0TTAt5AqBmYtZg=="
},
"BepInEx.AutoPlugin": {
"type": "Direct",
"requested": "[1.0.1, )",
"resolved": "1.0.1",
"contentHash": "G4YpTHG9rtkDJof+ld7Er4E+sCOlgsjG4bJ1itx1ub7dgff6qqHLy9ksX1ehgO0AdBOPVyVl/GKJg9o7iNl8HA=="
},
"BepInEx.IL2CPP": {
"type": "Direct",
"requested": "[6.0.0-be.570, )",
"resolved": "6.0.0-be.570",
"contentHash": "JGkWFFGZTWQ+YlFQ17izlwfGNUyo/zfFGNYPX6XAeTkfM5RwXiPYNMNO6eWoxbKwaYlAylQq2YCRkkCnAr9nwQ==",
"dependencies": {
"BepInEx.Core": "6.0.0-be.570",
"BepInEx.Il2Cpp.TlsAdapter": "1.0.1",
"HarmonyX": "2.10.0",
"Iced": "1.17.0",
"Il2CppAssemblyUnhollower.BaseLib": "0.4.33.3",
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.33.3",
"Il2CppAssemblyUnhollower.Lib": "0.4.33.3",
"Il2CppDumper": "6.6.4",
"MonoMod.RuntimeDetour": "22.5.1.1",
"Samboy063.Cpp2IL.Core": "2022.0.5"
}
},
"BepInEx.IL2CPP.MSBuild": {
"type": "Direct",
"requested": "[1.1.1, )",
"resolved": "1.1.1",
"contentHash": "uUSo4TuamyEIVg+ICNeJMSSW/arKWHGpfBFINc4fdF5kppfHFrsDURKzNPmDvxivtLsiuGthck9J/5uPXgIcTg=="
},
"BepInEx.Core": {
"type": "Transitive",
"resolved": "6.0.0-be.570",
"contentHash": "kygIunLrK1HMGcRo2E/7e4ZEAA0xewuB/j5mPoMi7Xk58GUi43XnclBJHif9x05a55s0kFkfKOrpwIRmjd0cDw==",
"dependencies": {
"HarmonyX": "2.10.0",
"MonoMod.Utils": "22.3.23.4",
"SemanticVersioning": "2.0.2"
}
},
"BepInEx.Il2Cpp.TlsAdapter": {
"type": "Transitive",
"resolved": "1.0.1",
"contentHash": "kTfX6312X0Fvwks+t7Ul3YO2jMSbqNS2Jx/85Cgl6lbAjEJnKzsmx7Krmd66dbnx0eY/QMjaV2r6LyWmQARtdA==",
"dependencies": {
"HarmonyX": "2.3.1"
}
},
"HarmonyX": {
"type": "Transitive",
"resolved": "2.10.0",
"contentHash": "4ayiy/dlCiW86K2N7Jvbf+VpI5wvP7dncv/6oRmfwRi32UCmCRzCGzsxdMfzJZkp6/26oBW+DrD8vi4UejzVAg==",
"dependencies": {
"MonoMod.RuntimeDetour": "22.3.23.4",
"System.Reflection.Emit": "4.7.0"
}
},
"Iced": {
"type": "Transitive",
"resolved": "1.17.0",
"contentHash": "8x+HCVTl/HHTGpscH3vMBhV8sknN/muZFw9s3TsI8SA6+c43cOTCi2+jE4KsU8pNLbJ++iF2ZFcpcXHXtDglnw=="
},
"Il2CppAssemblyUnhollower.BaseLib": {
"type": "Transitive",
"resolved": "0.4.33.3",
"contentHash": "CH91M6Asz4iwennTa8cLg5wqROJY1JvnsfRetyOvs0cy8o/YAikvm8uuNgZv6UiTO/qoyy/QrBE1qSZDvs8bLw==",
"dependencies": {
"Iced": "1.15.0"
}
},
"Il2CppAssemblyUnhollower.BaseLib.Legacy": {
"type": "Transitive",
"resolved": "0.4.33.3",
"contentHash": "6yIJg8lkayBDevPwcdcV3LWTdHt8VAZVY0wQwuXH4POOo0Kzc6Cshy9kLCxH3AC6EQg0G/v+Albs6RZgwszXMQ==",
"dependencies": {
"Il2CppAssemblyUnhollower.BaseLib": "0.4.33.3"
}
},
"Il2CppAssemblyUnhollower.Lib": {
"type": "Transitive",
"resolved": "0.4.33.3",
"contentHash": "tdu4OnMxodkWwoImNDaycaLY1L3qJOazb5UaLAt1ncRpWyu6xvKuKe5NM6OcBXONpkYsJQeQZjD6syeFl5MCQA==",
"dependencies": {
"Il2CppAssemblyUnhollower.BaseLib": "0.4.33.3",
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.33.3",
"Mono.Cecil": "0.11.3"
}
},
"Il2CppDumper": {
"type": "Transitive",
"resolved": "6.6.4",
"contentHash": "aqjmlyigdZ5FS9ElMNlaCExlgSmAiho4BeIcVwkmzHGnomBzopjOCxqIX9vc/575TQ87TKoaGW2KP+3b5xI15A==",
"dependencies": {
"Mono.Cecil": "0.11.3"
}
},
"IndexRange": {
"type": "Transitive",
"resolved": "1.0.0",
"contentHash": "6TgS1JLSUkpmPLfXBPaAgB39ZUix8E4soXWk2XSDcscVe84i1JKzIAtA7jHbRHSkOOrcr6YA0MpLCeq98y9mYQ=="
},
"js6pak.Gee.External.Capstone": {
"type": "Transitive",
"resolved": "2.1.0",
"contentHash": "YYpq7NM50bSSVUDjXyV/eiITk6syXqItPjKBOb3jEWS6RFsk0DNhpWMPW6b3hKDmArARuWDU6S2pVu1IeVrvIA=="
},
"Microsoft.NETCore.Platforms": {
"type": "Transitive",
"resolved": "1.1.0",
"contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A=="
},
"Microsoft.NETCore.Targets": {
"type": "Transitive",
"resolved": "1.1.0",
"contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg=="
},
"Mono.Cecil": {
"type": "Transitive",
"resolved": "0.11.4",
"contentHash": "IC1h5g0NeJGHIUgzM1P82ld57knhP0IcQfrYITDPXlNpMYGUrsG5TxuaWTjaeqDNQMBDNZkB8L0rBnwsY6JHuQ=="
},
"MonoMod.RuntimeDetour": {
"type": "Transitive",
"resolved": "22.5.1.1",
"contentHash": "WG5zLRuAr8KJEnIkKTuIG1OJCrGIT3pjvnAD43E0FDchHf3Dp985MF/8tmIQvAzCZV87JNs6QKeGGqmwDmpXpw==",
"dependencies": {
"Mono.Cecil": "0.11.4",
"MonoMod.Utils": "22.5.1.1",
"System.Collections.NonGeneric": "4.3.0",
"System.ComponentModel.TypeConverter": "4.3.0",
"System.IO.FileSystem.Primitives": "4.3.0",
"System.Reflection.Emit.ILGeneration": "4.7.0",
"System.Reflection.Emit.Lightweight": "4.7.0",
"System.Reflection.TypeExtensions": "4.7.0"
}
},
"MonoMod.Utils": {
"type": "Transitive",
"resolved": "22.5.1.1",
"contentHash": "vBObO1atXxhi2C4AuC53y87Bqeogi9xIrD1Ym3YWr5uxc8Nrm8SrsFeD1i3x04R999+XQ3FdeHrbXScyWYEHqQ==",
"dependencies": {
"Mono.Cecil": "0.11.4",
"System.Collections.NonGeneric": "4.3.0",
"System.ComponentModel.TypeConverter": "4.3.0",
"System.IO.FileSystem.Primitives": "4.3.0",
"System.Reflection.Emit.ILGeneration": "4.7.0",
"System.Reflection.Emit.Lightweight": "4.7.0",
"System.Reflection.TypeExtensions": "4.7.0"
}
},
"Samboy063.Cpp2IL.Core": {
"type": "Transitive",
"resolved": "2022.0.5",
"contentHash": "5JipfyEmJWePqLLnvwzxWx9dQXxNfgN0wcZ4IcmuabWKVvk4gA5Rux4vgDh9NrWf8q9LzkizWHkrnMaG1niF7g==",
"dependencies": {
"HarmonyX": "2.5.5",
"Iced": "1.11.1",
"IndexRange": "1.0.0",
"Mono.Cecil": "0.11.4",
"Samboy063.LibCpp2IL": "2022.0.5",
"System.Runtime.InteropServices": "4.3.0",
"System.ValueTuple": "4.5.0",
"js6pak.Gee.External.Capstone": "2.1.0"
}
},
"Samboy063.LibCpp2IL": {
"type": "Transitive",
"resolved": "2022.0.5",
"contentHash": "eH+/FBclsKDxboa9N/tFoiM8kwvietVX0FtXYxvcexSp/geYCyTt2XUGOQjinqd3Yqg/QxmpIqBO7qy4MQHrhw==",
"dependencies": {
"IndexRange": "1.0.0",
"Samboy063.WasmDisassembler": "2022.0.2"
}
},
"Samboy063.WasmDisassembler": {
"type": "Transitive",
"resolved": "2022.0.2",
"contentHash": "2uu+xBb7M3HKfBx9tAY6jiDieAf0hRnQjSmGX+7IdE6i24dYsx6TYgtrLvRx5lOuF2M8DijZ5H8yQ1pcuCs2SA=="
},
"SemanticVersioning": {
"type": "Transitive",
"resolved": "2.0.2",
"contentHash": "4EQgYdNZ92SyaO7YFk6olVnebF5V+jrHyMUjvPq89tLeMo8NSfgDF+6Zwq/lgh9j/0yfQp9Lkm0ZA0rUATCZFA=="
},
"System.Collections": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Collections.NonGeneric": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "prtjIEMhGUnQq6RnPEYLpFt8AtLbp9yq2zxOSrY7KJJZrw25Fi97IzBqY7iqssbM61Ek5b8f3MG/sG1N2sN5KA==",
"dependencies": {
"System.Diagnostics.Debug": "4.3.0",
"System.Globalization": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Threading": "4.3.0"
}
},
"System.Collections.Specialized": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "Epx8PoVZR0iuOnJJDzp7pWvdfMMOAvpUo95pC4ScH2mJuXkKA2Y4aR3cG9qt2klHgSons1WFh4kcGW7cSXvrxg==",
"dependencies": {
"System.Collections.NonGeneric": "4.3.0",
"System.Globalization": "4.3.0",
"System.Globalization.Extensions": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Threading": "4.3.0"
}
},
"System.ComponentModel": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "VyGn1jGRZVfxnh8EdvDCi71v3bMXrsu8aYJOwoV7SNDLVhiEqwP86pPMyRGsDsxhXAm2b3o9OIqeETfN5qfezw==",
"dependencies": {
"System.Runtime": "4.3.0"
}
},
"System.ComponentModel.Primitives": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "j8GUkCpM8V4d4vhLIIoBLGey2Z5bCkMVNjEZseyAlm4n5arcsJOeI3zkUP+zvZgzsbLTYh4lYeP/ZD/gdIAPrw==",
"dependencies": {
"System.ComponentModel": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.ComponentModel.TypeConverter": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "16pQ6P+EdhcXzPiEK4kbA953Fu0MNG2ovxTZU81/qsCd1zPRsKc3uif5NgvllCY598k6bI0KUyKW8fanlfaDQg==",
"dependencies": {
"System.Collections": "4.3.0",
"System.Collections.NonGeneric": "4.3.0",
"System.Collections.Specialized": "4.3.0",
"System.ComponentModel": "4.3.0",
"System.ComponentModel.Primitives": "4.3.0",
"System.Globalization": "4.3.0",
"System.Linq": "4.3.0",
"System.Reflection": "4.3.0",
"System.Reflection.Extensions": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
"System.Reflection.TypeExtensions": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Threading": "4.3.0"
}
},
"System.Diagnostics.Debug": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Globalization": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Globalization.Extensions": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"System.Globalization": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Runtime.InteropServices": "4.3.0"
}
},
"System.IO": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0",
"System.Text.Encoding": "4.3.0",
"System.Threading.Tasks": "4.3.0"
}
},
"System.IO.FileSystem.Primitives": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==",
"dependencies": {
"System.Runtime": "4.3.0"
}
},
"System.Linq": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==",
"dependencies": {
"System.Collections": "4.3.0",
"System.Diagnostics.Debug": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0"
}
},
"System.Reflection": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.IO": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.Reflection.Emit": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "VR4kk8XLKebQ4MZuKuIni/7oh+QGFmZW3qORd1GvBq/8026OpW501SzT/oypwiQl4TvT8ErnReh/NzY9u+C6wQ=="
},
"System.Reflection.Emit.ILGeneration": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "AucBYo3DSI0IDxdUjKksBcQJXPHyoPyrCXYURW1WDsLI4M65Ar/goSHjdnHOAY9MiYDNKqDlIgaYm+zL2hA1KA=="
},
"System.Reflection.Emit.Lightweight": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "a4OLB4IITxAXJeV74MDx49Oq2+PsF6Sml54XAFv+2RyWwtDBcabzoxiiJRhdhx+gaohLh4hEGCLQyBozXoQPqA=="
},
"System.Reflection.Extensions": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Reflection": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.Reflection.Primitives": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Reflection.TypeExtensions": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "VybpaOQQhqE6siHppMktjfGBw1GCwvCqiufqmP8F1nj7fTUNtW35LOEt3UZTEsECfo+ELAl/9o9nJx3U91i7vA=="
},
"System.Resources.ResourceManager": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Globalization": "4.3.0",
"System.Reflection": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.Runtime": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0"
}
},
"System.Runtime.Extensions": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Runtime.Handles": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Runtime.InteropServices": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Reflection": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Handles": "4.3.0"
}
},
"System.Text.Encoding": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Threading": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==",
"dependencies": {
"System.Runtime": "4.3.0",
"System.Threading.Tasks": "4.3.0"
}
},
"System.Threading.Tasks": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.ValueTuple": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ=="
},
"reactor": {
"type": "Project",
"dependencies": {
"BepInEx.IL2CPP": "6.0.0-be.570"
}
}
}
}
}
+2 -1
View File
@@ -2,6 +2,7 @@ namespace Reactor.Example
{
public enum CustomRpcCalls : uint
{
Example
Example,
MethodRpcExample
}
}
+25 -15
View File
@@ -3,47 +3,57 @@ using BepInEx;
using BepInEx.IL2CPP;
using Reactor.Extensions;
using Reactor.Networking;
using Reactor.Networking.MethodRpc;
using UnhollowerBaseLib.Attributes;
using UnityEngine;
using Random = UnityEngine.Random;
namespace Reactor.Example
{
[BepInPlugin(Id)]
[BepInAutoPlugin("gg.reactor.Example")]
[BepInProcess("Among Us.exe")]
[BepInDependency(ReactorPlugin.Id)]
public class ExamplePlugin : BasePlugin
public partial class ExamplePlugin : BasePlugin
{
public const string Id = "gg.reactor.Example";
public override void Load()
{
var gameObject = new GameObject(nameof(ReactorPlugin)).DontDestroy();
gameObject.AddComponent<ExampleComponent>().Plugin = this;
this.AddComponent<ExampleComponent>();
}
[RegisterInIl2Cpp]
public class ExampleComponent : MonoBehaviour
{
[HideFromIl2Cpp]
public ExamplePlugin Plugin { get; internal set; }
public ExampleComponent(IntPtr ptr) : base(ptr)
{
}
private void Update()
{
if (Input.GetKeyDown(KeyCode.F3) && AmongUsClient.Instance && PlayerControl.LocalPlayer)
if (AmongUsClient.Instance && PlayerControl.LocalPlayer)
{
var name = PlayerControl.LocalPlayer.Data.PlayerName;
Rpc<ExampleRpc>.Instance.Send(new ExampleRpc.Data($"Send: from {name}"));
if (!AmongUsClient.Instance.AmHost)
if (Input.GetKeyDown(KeyCode.F3))
{
Rpc<ExampleRpc>.Instance.SendTo(AmongUsClient.Instance.HostId, new ExampleRpc.Data($"SendTo: from {name} to host"));
var name = PlayerControl.LocalPlayer.Data.PlayerName;
Rpc<ExampleRpc>.Instance.Send(new ExampleRpc.Data($"Send: from {name}"));
if (!AmongUsClient.Instance.AmHost)
{
Rpc<ExampleRpc>.Instance.SendTo(AmongUsClient.Instance.HostId, new ExampleRpc.Data($"SendTo: from {name} to host"));
}
}
if (Input.GetKeyDown(KeyCode.F4))
{
RpcSay(PlayerControl.LocalPlayer, "Hello from method rpc", Random.value, PlayerControl.LocalPlayer);
}
}
}
}
[MethodRpc((uint) CustomRpcCalls.MethodRpcExample)]
public static void RpcSay(PlayerControl player, string text, float number, PlayerControl testPlayer)
{
Logger<ExamplePlugin>.Info($"{player.Data.PlayerName} text: {text} number: {number} testPlayer: {testPlayer.NetId}");
}
}
}
+1
View File
@@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>latest</LangVersion>
<DebugType>embedded</DebugType>
<Version>0.1.0</Version>
<Description>Example mod using Reactor</Description>
+486
View File
@@ -0,0 +1,486 @@
{
"version": 1,
"dependencies": {
".NETStandard,Version=v2.1": {
"AmongUs.GameLibs.Steam": {
"type": "Direct",
"requested": "[2022.8.23, )",
"resolved": "2022.8.23",
"contentHash": "baY5JO6dbdOAZ0VTtGX0xre6/BlDdreJDAH8boCKZt3JTAcn+eeH+l8mUZRC9eCJOODUik2C0TTAt5AqBmYtZg=="
},
"BepInEx.AutoPlugin": {
"type": "Direct",
"requested": "[1.0.1, )",
"resolved": "1.0.1",
"contentHash": "G4YpTHG9rtkDJof+ld7Er4E+sCOlgsjG4bJ1itx1ub7dgff6qqHLy9ksX1ehgO0AdBOPVyVl/GKJg9o7iNl8HA=="
},
"BepInEx.IL2CPP": {
"type": "Direct",
"requested": "[6.0.0-be.570, )",
"resolved": "6.0.0-be.570",
"contentHash": "JGkWFFGZTWQ+YlFQ17izlwfGNUyo/zfFGNYPX6XAeTkfM5RwXiPYNMNO6eWoxbKwaYlAylQq2YCRkkCnAr9nwQ==",
"dependencies": {
"BepInEx.Core": "6.0.0-be.570",
"BepInEx.Il2Cpp.TlsAdapter": "1.0.1",
"HarmonyX": "2.10.0",
"Iced": "1.17.0",
"Il2CppAssemblyUnhollower.BaseLib": "0.4.33.3",
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.33.3",
"Il2CppAssemblyUnhollower.Lib": "0.4.33.3",
"Il2CppDumper": "6.6.4",
"MonoMod.RuntimeDetour": "22.5.1.1",
"Samboy063.Cpp2IL.Core": "2022.0.5"
}
},
"BepInEx.IL2CPP.MSBuild": {
"type": "Direct",
"requested": "[1.1.1, )",
"resolved": "1.1.1",
"contentHash": "uUSo4TuamyEIVg+ICNeJMSSW/arKWHGpfBFINc4fdF5kppfHFrsDURKzNPmDvxivtLsiuGthck9J/5uPXgIcTg=="
},
"BepInEx.Core": {
"type": "Transitive",
"resolved": "6.0.0-be.570",
"contentHash": "kygIunLrK1HMGcRo2E/7e4ZEAA0xewuB/j5mPoMi7Xk58GUi43XnclBJHif9x05a55s0kFkfKOrpwIRmjd0cDw==",
"dependencies": {
"HarmonyX": "2.10.0",
"MonoMod.Utils": "22.3.23.4",
"SemanticVersioning": "2.0.2"
}
},
"BepInEx.Il2Cpp.TlsAdapter": {
"type": "Transitive",
"resolved": "1.0.1",
"contentHash": "kTfX6312X0Fvwks+t7Ul3YO2jMSbqNS2Jx/85Cgl6lbAjEJnKzsmx7Krmd66dbnx0eY/QMjaV2r6LyWmQARtdA==",
"dependencies": {
"HarmonyX": "2.3.1"
}
},
"HarmonyX": {
"type": "Transitive",
"resolved": "2.10.0",
"contentHash": "4ayiy/dlCiW86K2N7Jvbf+VpI5wvP7dncv/6oRmfwRi32UCmCRzCGzsxdMfzJZkp6/26oBW+DrD8vi4UejzVAg==",
"dependencies": {
"MonoMod.RuntimeDetour": "22.3.23.4",
"System.Reflection.Emit": "4.7.0"
}
},
"Iced": {
"type": "Transitive",
"resolved": "1.17.0",
"contentHash": "8x+HCVTl/HHTGpscH3vMBhV8sknN/muZFw9s3TsI8SA6+c43cOTCi2+jE4KsU8pNLbJ++iF2ZFcpcXHXtDglnw=="
},
"Il2CppAssemblyUnhollower.BaseLib": {
"type": "Transitive",
"resolved": "0.4.33.3",
"contentHash": "CH91M6Asz4iwennTa8cLg5wqROJY1JvnsfRetyOvs0cy8o/YAikvm8uuNgZv6UiTO/qoyy/QrBE1qSZDvs8bLw==",
"dependencies": {
"Iced": "1.15.0"
}
},
"Il2CppAssemblyUnhollower.BaseLib.Legacy": {
"type": "Transitive",
"resolved": "0.4.33.3",
"contentHash": "6yIJg8lkayBDevPwcdcV3LWTdHt8VAZVY0wQwuXH4POOo0Kzc6Cshy9kLCxH3AC6EQg0G/v+Albs6RZgwszXMQ==",
"dependencies": {
"Il2CppAssemblyUnhollower.BaseLib": "0.4.33.3"
}
},
"Il2CppAssemblyUnhollower.Lib": {
"type": "Transitive",
"resolved": "0.4.33.3",
"contentHash": "tdu4OnMxodkWwoImNDaycaLY1L3qJOazb5UaLAt1ncRpWyu6xvKuKe5NM6OcBXONpkYsJQeQZjD6syeFl5MCQA==",
"dependencies": {
"Il2CppAssemblyUnhollower.BaseLib": "0.4.33.3",
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.33.3",
"Mono.Cecil": "0.11.3"
}
},
"Il2CppDumper": {
"type": "Transitive",
"resolved": "6.6.4",
"contentHash": "aqjmlyigdZ5FS9ElMNlaCExlgSmAiho4BeIcVwkmzHGnomBzopjOCxqIX9vc/575TQ87TKoaGW2KP+3b5xI15A==",
"dependencies": {
"Mono.Cecil": "0.11.3"
}
},
"IndexRange": {
"type": "Transitive",
"resolved": "1.0.0",
"contentHash": "6TgS1JLSUkpmPLfXBPaAgB39ZUix8E4soXWk2XSDcscVe84i1JKzIAtA7jHbRHSkOOrcr6YA0MpLCeq98y9mYQ=="
},
"js6pak.Gee.External.Capstone": {
"type": "Transitive",
"resolved": "2.1.0",
"contentHash": "YYpq7NM50bSSVUDjXyV/eiITk6syXqItPjKBOb3jEWS6RFsk0DNhpWMPW6b3hKDmArARuWDU6S2pVu1IeVrvIA=="
},
"Microsoft.NETCore.Platforms": {
"type": "Transitive",
"resolved": "1.1.0",
"contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A=="
},
"Microsoft.NETCore.Targets": {
"type": "Transitive",
"resolved": "1.1.0",
"contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg=="
},
"Mono.Cecil": {
"type": "Transitive",
"resolved": "0.11.4",
"contentHash": "IC1h5g0NeJGHIUgzM1P82ld57knhP0IcQfrYITDPXlNpMYGUrsG5TxuaWTjaeqDNQMBDNZkB8L0rBnwsY6JHuQ=="
},
"MonoMod.RuntimeDetour": {
"type": "Transitive",
"resolved": "22.5.1.1",
"contentHash": "WG5zLRuAr8KJEnIkKTuIG1OJCrGIT3pjvnAD43E0FDchHf3Dp985MF/8tmIQvAzCZV87JNs6QKeGGqmwDmpXpw==",
"dependencies": {
"Mono.Cecil": "0.11.4",
"MonoMod.Utils": "22.5.1.1",
"System.Collections.NonGeneric": "4.3.0",
"System.ComponentModel.TypeConverter": "4.3.0",
"System.IO.FileSystem.Primitives": "4.3.0",
"System.Reflection.Emit.ILGeneration": "4.7.0",
"System.Reflection.Emit.Lightweight": "4.7.0",
"System.Reflection.TypeExtensions": "4.7.0"
}
},
"MonoMod.Utils": {
"type": "Transitive",
"resolved": "22.5.1.1",
"contentHash": "vBObO1atXxhi2C4AuC53y87Bqeogi9xIrD1Ym3YWr5uxc8Nrm8SrsFeD1i3x04R999+XQ3FdeHrbXScyWYEHqQ==",
"dependencies": {
"Mono.Cecil": "0.11.4",
"System.Collections.NonGeneric": "4.3.0",
"System.ComponentModel.TypeConverter": "4.3.0",
"System.IO.FileSystem.Primitives": "4.3.0",
"System.Reflection.Emit.ILGeneration": "4.7.0",
"System.Reflection.Emit.Lightweight": "4.7.0",
"System.Reflection.TypeExtensions": "4.7.0"
}
},
"Samboy063.Cpp2IL.Core": {
"type": "Transitive",
"resolved": "2022.0.5",
"contentHash": "5JipfyEmJWePqLLnvwzxWx9dQXxNfgN0wcZ4IcmuabWKVvk4gA5Rux4vgDh9NrWf8q9LzkizWHkrnMaG1niF7g==",
"dependencies": {
"HarmonyX": "2.5.5",
"Iced": "1.11.1",
"IndexRange": "1.0.0",
"Mono.Cecil": "0.11.4",
"Samboy063.LibCpp2IL": "2022.0.5",
"System.Runtime.InteropServices": "4.3.0",
"System.ValueTuple": "4.5.0",
"js6pak.Gee.External.Capstone": "2.1.0"
}
},
"Samboy063.LibCpp2IL": {
"type": "Transitive",
"resolved": "2022.0.5",
"contentHash": "eH+/FBclsKDxboa9N/tFoiM8kwvietVX0FtXYxvcexSp/geYCyTt2XUGOQjinqd3Yqg/QxmpIqBO7qy4MQHrhw==",
"dependencies": {
"IndexRange": "1.0.0",
"Samboy063.WasmDisassembler": "2022.0.2"
}
},
"Samboy063.WasmDisassembler": {
"type": "Transitive",
"resolved": "2022.0.2",
"contentHash": "2uu+xBb7M3HKfBx9tAY6jiDieAf0hRnQjSmGX+7IdE6i24dYsx6TYgtrLvRx5lOuF2M8DijZ5H8yQ1pcuCs2SA=="
},
"SemanticVersioning": {
"type": "Transitive",
"resolved": "2.0.2",
"contentHash": "4EQgYdNZ92SyaO7YFk6olVnebF5V+jrHyMUjvPq89tLeMo8NSfgDF+6Zwq/lgh9j/0yfQp9Lkm0ZA0rUATCZFA=="
},
"System.Collections": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Collections.NonGeneric": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "prtjIEMhGUnQq6RnPEYLpFt8AtLbp9yq2zxOSrY7KJJZrw25Fi97IzBqY7iqssbM61Ek5b8f3MG/sG1N2sN5KA==",
"dependencies": {
"System.Diagnostics.Debug": "4.3.0",
"System.Globalization": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Threading": "4.3.0"
}
},
"System.Collections.Specialized": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "Epx8PoVZR0iuOnJJDzp7pWvdfMMOAvpUo95pC4ScH2mJuXkKA2Y4aR3cG9qt2klHgSons1WFh4kcGW7cSXvrxg==",
"dependencies": {
"System.Collections.NonGeneric": "4.3.0",
"System.Globalization": "4.3.0",
"System.Globalization.Extensions": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Threading": "4.3.0"
}
},
"System.ComponentModel": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "VyGn1jGRZVfxnh8EdvDCi71v3bMXrsu8aYJOwoV7SNDLVhiEqwP86pPMyRGsDsxhXAm2b3o9OIqeETfN5qfezw==",
"dependencies": {
"System.Runtime": "4.3.0"
}
},
"System.ComponentModel.Primitives": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "j8GUkCpM8V4d4vhLIIoBLGey2Z5bCkMVNjEZseyAlm4n5arcsJOeI3zkUP+zvZgzsbLTYh4lYeP/ZD/gdIAPrw==",
"dependencies": {
"System.ComponentModel": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.ComponentModel.TypeConverter": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "16pQ6P+EdhcXzPiEK4kbA953Fu0MNG2ovxTZU81/qsCd1zPRsKc3uif5NgvllCY598k6bI0KUyKW8fanlfaDQg==",
"dependencies": {
"System.Collections": "4.3.0",
"System.Collections.NonGeneric": "4.3.0",
"System.Collections.Specialized": "4.3.0",
"System.ComponentModel": "4.3.0",
"System.ComponentModel.Primitives": "4.3.0",
"System.Globalization": "4.3.0",
"System.Linq": "4.3.0",
"System.Reflection": "4.3.0",
"System.Reflection.Extensions": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
"System.Reflection.TypeExtensions": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Threading": "4.3.0"
}
},
"System.Diagnostics.Debug": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Globalization": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Globalization.Extensions": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"System.Globalization": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Runtime.InteropServices": "4.3.0"
}
},
"System.IO": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0",
"System.Text.Encoding": "4.3.0",
"System.Threading.Tasks": "4.3.0"
}
},
"System.IO.FileSystem.Primitives": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==",
"dependencies": {
"System.Runtime": "4.3.0"
}
},
"System.Linq": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==",
"dependencies": {
"System.Collections": "4.3.0",
"System.Diagnostics.Debug": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0"
}
},
"System.Reflection": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.IO": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.Reflection.Emit": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "VR4kk8XLKebQ4MZuKuIni/7oh+QGFmZW3qORd1GvBq/8026OpW501SzT/oypwiQl4TvT8ErnReh/NzY9u+C6wQ=="
},
"System.Reflection.Emit.ILGeneration": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "AucBYo3DSI0IDxdUjKksBcQJXPHyoPyrCXYURW1WDsLI4M65Ar/goSHjdnHOAY9MiYDNKqDlIgaYm+zL2hA1KA=="
},
"System.Reflection.Emit.Lightweight": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "a4OLB4IITxAXJeV74MDx49Oq2+PsF6Sml54XAFv+2RyWwtDBcabzoxiiJRhdhx+gaohLh4hEGCLQyBozXoQPqA=="
},
"System.Reflection.Extensions": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Reflection": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.Reflection.Primitives": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Reflection.TypeExtensions": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "VybpaOQQhqE6siHppMktjfGBw1GCwvCqiufqmP8F1nj7fTUNtW35LOEt3UZTEsECfo+ELAl/9o9nJx3U91i7vA=="
},
"System.Resources.ResourceManager": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Globalization": "4.3.0",
"System.Reflection": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.Runtime": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0"
}
},
"System.Runtime.Extensions": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Runtime.Handles": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Runtime.InteropServices": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Reflection": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Handles": "4.3.0"
}
},
"System.Text.Encoding": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Threading": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==",
"dependencies": {
"System.Runtime": "4.3.0",
"System.Threading.Tasks": "4.3.0"
}
},
"System.Threading.Tasks": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.ValueTuple": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ=="
},
"reactor": {
"type": "Project",
"dependencies": {
"BepInEx.IL2CPP": "6.0.0-be.570"
}
}
}
}
}
+1 -1
View File
@@ -9,7 +9,7 @@ namespace Reactor
{
public delegate void PluginLoadHandler(BasePlugin plugin);
public static event PluginLoadHandler PluginLoad;
public static event PluginLoadHandler? PluginLoad;
internal static void OnPluginLoad(BasePlugin plugin)
{
+20 -352
View File
@@ -1,385 +1,53 @@
// Adapted from https://github.com/LavaGang/MelonLoader/blob/364515defde1d781daf39c10331f883254295774/SM_Il2Cpp/Coroutines.cs#L10
/*
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
Copyright 2020 Lava Gang
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnhollowerBaseLib;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using BepInEx.IL2CPP.Utils;
using UnityEngine;
namespace Reactor
{
public class Il2CppEnumeratorWrapper : IEnumerator
{
private readonly Il2CppSystem.Collections.IEnumerator _il2CPPEnumerator;
public Il2CppEnumeratorWrapper(Il2CppSystem.Collections.IEnumerator il2CppEnumerator) => _il2CPPEnumerator = il2CppEnumerator;
public bool MoveNext() => _il2CPPEnumerator.MoveNext();
public void Reset() => _il2CPPEnumerator.Reset();
public object Current => _il2CPPEnumerator.Current;
}
public static class Coroutines
{
private struct CoroutineTuple
{
public object WaitCondition;
public IEnumerator Coroutine;
}
[RegisterInIl2Cpp]
internal class Component : MonoBehaviour
{
internal static Component? Instance { get; set; }
public Component(IntPtr ptr) : base(ptr)
{
}
private void Start()
private void Awake()
{
Camera.onPostRender = Camera.onPostRender == null
? new Action<Camera>(OnPostRenderM)
: Il2CppSystem.Delegate.Combine(Camera.onPostRender, (Camera.CameraCallback) (Action<Camera>) OnPostRenderM).Cast<Camera.CameraCallback>();
Instance = this;
}
private void FixedUpdate()
private void OnDestroy()
{
ProcessCoroutineList(_ourWaitForFixedUpdateCoroutines);
}
private void Update()
{
Process();
}
public static Camera OnPostRenderCam { get; private set; }
private static void OnPostRenderM(Camera camera)
{
if (OnPostRenderCam == null)
{
OnPostRenderCam = camera;
}
if (OnPostRenderCam == camera)
{
ProcessCoroutineList(_ourWaitForEndOfFrameCoroutines);
}
Instance = null;
}
}
private static readonly List<CoroutineTuple> _ourCoroutinesStore = new List<CoroutineTuple>();
private static readonly List<IEnumerator> _ourNextFrameCoroutines = new List<IEnumerator>();
private static readonly List<IEnumerator> _ourWaitForFixedUpdateCoroutines = new List<IEnumerator>();
private static readonly List<IEnumerator> _ourWaitForEndOfFrameCoroutines = new List<IEnumerator>();
private static readonly ConditionalWeakTable<IEnumerator, Coroutine> _ourCoroutineStore = new();
private static readonly List<IEnumerator> _tempList = new List<IEnumerator>();
public static IEnumerator Start(IEnumerator routine)
[return: NotNullIfNotNull("routine")]
public static IEnumerator? Start(IEnumerator? routine)
{
if (routine != null) ProcessNextOfCoroutine(routine);
if (routine != null)
{
_ourCoroutineStore.AddOrUpdate(routine, Component.Instance!.StartCoroutine(routine));
}
return routine;
}
public static void Stop(IEnumerator enumerator)
public static void Stop(IEnumerator? enumerator)
{
if (_ourNextFrameCoroutines.Contains(enumerator)) // the coroutine is running itself
if (enumerator != null && _ourCoroutineStore.TryGetValue(enumerator, out var routine))
{
_ourNextFrameCoroutines.Remove(enumerator);
Component.Instance!.StopCoroutine(routine);
}
else
{
var coroutineTupleIndex = _ourCoroutinesStore.FindIndex(c => c.Coroutine == enumerator);
if (coroutineTupleIndex != -1) // the coroutine is waiting for a subroutine
{
var waitCondition = _ourCoroutinesStore[coroutineTupleIndex].WaitCondition;
if (waitCondition is IEnumerator waitEnumerator)
{
Stop(waitEnumerator);
}
_ourCoroutinesStore.RemoveAt(coroutineTupleIndex);
}
}
}
private static void ProcessCoroutineList(List<IEnumerator> target)
{
if (target.Count == 0) return;
// use a temp list to make sure waits made during processing are not handled by same processing invocation
// additionally, a temp list reduces allocations compared to an array
_tempList.AddRange(target);
target.Clear();
foreach (var enumerator in _tempList) ProcessNextOfCoroutine(enumerator);
_tempList.Clear();
}
private static void Process()
{
for (var i = _ourCoroutinesStore.Count - 1; i >= 0; i--)
{
var tuple = _ourCoroutinesStore[i];
if (tuple.WaitCondition is WaitForSeconds waitForSeconds)
{
if ((waitForSeconds.m_Seconds -= Time.deltaTime) <= 0)
{
_ourCoroutinesStore.RemoveAt(i);
ProcessNextOfCoroutine(tuple.Coroutine);
}
}
}
ProcessCoroutineList(_ourNextFrameCoroutines);
}
private static void ProcessNextOfCoroutine(IEnumerator enumerator)
{
try
{
if (!enumerator.MoveNext()) // Run the next step of the coroutine. If it's done, restore the parent routine
{
var indices = _ourCoroutinesStore.Select((it, idx) => (idx, it)).Where(it => it.it.WaitCondition == enumerator).Select(it => it.idx).ToList();
for (var i = indices.Count - 1; i >= 0; i--)
{
var index = indices[i];
_ourNextFrameCoroutines.Add(_ourCoroutinesStore[index].Coroutine);
_ourCoroutinesStore.RemoveAt(index);
}
return;
}
}
catch (Exception e)
{
Logger<ReactorPlugin>.Error(e.ToString());
Stop(FindOriginalCoroutine(enumerator)); // We want the entire coroutine hierarchy to stop when an error happen
}
var next = enumerator.Current;
switch (next)
{
case null:
_ourNextFrameCoroutines.Add(enumerator);
return;
case WaitForFixedUpdate _:
_ourWaitForFixedUpdateCoroutines.Add(enumerator);
return;
case WaitForEndOfFrame _:
_ourWaitForEndOfFrameCoroutines.Add(enumerator);
return;
case WaitForSeconds _:
break; // do nothing, this one is supported in Process
case Il2CppObjectBase il2CppObjectBase:
var nextAsEnumerator = il2CppObjectBase.TryCast<Il2CppSystem.Collections.IEnumerator>();
if (nextAsEnumerator != null) // il2cpp IEnumerator also handles CustomYieldInstruction
next = new Il2CppEnumeratorWrapper(nextAsEnumerator);
else
Logger<ReactorPlugin>.Warning($"Unknown coroutine yield object of type {il2CppObjectBase} for coroutine {enumerator}");
break;
}
_ourCoroutinesStore.Add(new CoroutineTuple { WaitCondition = next, Coroutine = enumerator });
if (next is IEnumerator nextCoroutine)
ProcessNextOfCoroutine(nextCoroutine);
}
private static IEnumerator FindOriginalCoroutine(IEnumerator enumerator)
{
var index = _ourCoroutinesStore.FindIndex(ct => ct.WaitCondition == enumerator);
return index == -1 ? enumerator : FindOriginalCoroutine(_ourCoroutinesStore[index].Coroutine);
}
}
}
+3 -20
View File
@@ -32,31 +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(TranslationController), nameof(TranslationController.GetString), typeof(StringNames), typeof(Il2CppReferenceArray<Il2CppSystem.Object>))]
private static class GetStringPatch
{
public static bool Prefix([HarmonyArgument(0)] StringNames stringId, [HarmonyArgument(1)] Il2CppReferenceArray<Il2CppSystem.Object> parts, ref string __result)
public static bool Prefix(StringNames id, Il2CppReferenceArray<Il2CppSystem.Object> parts, ref string __result)
{
var customStringName = (CustomStringName) stringId;
if (customStringName != null)
{
__result = string.Format(customStringName.Value, parts);
return false;
}
return true;
}
}
[HarmonyPatch(typeof(TranslationController), nameof(TranslationController.GetStringWithDefault))]
private static class GetStringOrDefaultPatch
{
public static bool Prefix([HarmonyArgument(0)] StringNames stringId, [HarmonyArgument(2)] Il2CppReferenceArray<Il2CppSystem.Object> parts, ref string __result)
{
var customStringName = (CustomStringName) stringId;
var customStringName = (CustomStringName?) id;
if (customStringName != null)
{
+43
View File
@@ -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);
}
}
}
+5 -5
View File
@@ -23,7 +23,7 @@ namespace Reactor.Extensions
/// </summary>
public static void once_sceneLoaded(Action<Scene, LoadSceneMode> value)
{
UnityAction<Scene, LoadSceneMode> unityAction = null;
UnityAction<Scene, LoadSceneMode>? unityAction = null;
unityAction = (Action<Scene, LoadSceneMode>) ((scene, loadMode) =>
{
@@ -37,7 +37,7 @@ namespace Reactor.Extensions
/// <summary>
/// Returns random <typeparamref name="T"/> from <paramref name="input"/>
/// </summary>
public static T Random<T>(this IEnumerable<T> input)
public static T? Random<T>(this IEnumerable<T> input)
{
var list = input as IList<T> ?? input.ToList();
return list.Count == 0 ? default : list[UnityEngine.Random.Range(0, list.Count)];
@@ -77,9 +77,9 @@ namespace Reactor.Extensions
/// </summary>
public static Task SendAsync(this UnityWebRequest request)
{
var task = new TaskCompletionSource<object>();
var task = new TaskCompletionSource<object?>();
request.Send().m_completeCallback = (Action<AsyncOperation>) (x =>
request.Send().m_completeCallback = (Action<AsyncOperation>) (_ =>
{
task.SetResult(null);
});
@@ -115,7 +115,7 @@ namespace Reactor.Extensions
return type.GetMethods(AccessTools.all, returnType, parameterTypes);
}
public static T LoadAsset<T>(this AssetBundle assetBundle, string name) where T : UnityEngine.Object
public static T? LoadAsset<T>(this AssetBundle assetBundle, string name) where T : UnityEngine.Object
{
return assetBundle.LoadAsset(name, Il2CppType.Of<T>())?.Cast<T>();
}
@@ -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);
}
}
}
+7 -3
View File
@@ -48,7 +48,7 @@ namespace Reactor.Extensions
return Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0.5f, 0.5f), 100f);
}
public static DefaultControls.Resources StandardResources { get; internal set; }
public static DefaultControls.Resources StandardResources { get; internal set; } = null!;
public static GameObject CreateCanvas()
{
@@ -114,8 +114,12 @@ namespace Reactor.Extensions
{
if (Enabled)
{
Rect = Rect.ResetSize();
Rect = GUILayout.Window(Id, Rect, Func, Title, new Il2CppReferenceArray<GUILayoutOption>(0));
if (Event.current.type == EventType.Layout)
{
Rect = Rect.ResetSize();
}
Rect = GUILayout.Window(Id, Rect, Func, Title);
if ((Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1)) && Rect.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)))
{
@@ -1,17 +0,0 @@
using UnityEngine;
namespace Reactor.Extensions
{
public static class PlayerControlExtensions
{
public static Color32 ToPlayerColor(this PlayerColor color)
{
return Palette.PlayerColors[(byte) color];
}
public static Color32 ToShadowColor(this PlayerColor color)
{
return Palette.ShadowColors[(byte) color];
}
}
}
+23
View File
@@ -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;
}
}
+93
View File
@@ -0,0 +1,93 @@
using System;
using System.IO;
using System.Runtime.CompilerServices;
using UnhollowerBaseLib;
using UnhollowerBaseLib.Attributes;
using UnhollowerRuntimeLib;
namespace Reactor.Extensions
{
[RegisterInIl2Cpp]
public class StreamWrapper : Il2CppSystem.IO.Stream
{
private readonly Stream _stream;
#pragma warning disable 8618
public StreamWrapper(IntPtr ptr) : base(ptr) { }
#pragma warning restore 8618
public StreamWrapper(Stream stream) : base(ClassInjector.DerivedConstructorPointer<StreamWrapper>())
{
ClassInjector.DerivedConstructorBody(this);
_stream = stream;
}
[HideFromIl2Cpp]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe Span<byte> GetSpan(Il2CppStructArray<byte> buffer, int offset, int count)
{
var rawBuffer = (byte*) buffer.Pointer + 4 * IntPtr.Size;
return new Span<byte>(rawBuffer + offset, count);
}
public override int Read(Il2CppStructArray<byte> buffer, int offset, int count)
{
return _stream.Read(GetSpan(buffer, offset, count));
}
public override void Write(Il2CppStructArray<byte> buffer, int offset, int count)
{
_stream.Write(GetSpan(buffer, offset, count));
}
public override void Flush()
{
_stream.Flush();
}
public override void Close()
{
_stream.Close();
}
public override void Dispose()
{
_stream.Dispose();
}
public override long Seek(long offset, Il2CppSystem.IO.SeekOrigin origin)
{
return _stream.Seek(offset, origin switch
{
Il2CppSystem.IO.SeekOrigin.Begin => SeekOrigin.Begin,
Il2CppSystem.IO.SeekOrigin.Current => SeekOrigin.Current,
Il2CppSystem.IO.SeekOrigin.End => SeekOrigin.End,
_ => throw new ArgumentOutOfRangeException(nameof(origin), origin, null)
});
}
public override void SetLength(long value)
{
_stream.SetLength(value);
}
public override bool CanRead => _stream.CanRead;
public override bool CanSeek => _stream.CanSeek;
public override bool CanWrite => _stream.CanWrite;
public override long Length => _stream.Length;
public override long Position
{
get => _stream.Position;
set => _stream.Position = value;
}
}
public static class StreamExtensions
{
/// <summary>
/// Wraps a System Stream into an Il2Cpp Stream
/// </summary>
public static StreamWrapper AsIl2Cpp(this Stream stream) => new(stream);
}
}
+2 -2
View File
@@ -5,7 +5,7 @@ namespace Reactor
{
public sealed class Il2CppEqualityComparer<T> : IEqualityComparer<T> where T : Il2CppSystem.Object
{
private static Il2CppEqualityComparer<T> _instance;
private static Il2CppEqualityComparer<T>? _instance;
public static Il2CppEqualityComparer<T> Instance
{
@@ -25,7 +25,7 @@ namespace Reactor
return RuntimeHelpers.GetHashCode(value);
}
public bool Equals(T left, T right)
public bool Equals(T? left, T? right)
{
if (left == null || right == null)
{
+10 -10
View File
@@ -14,23 +14,23 @@ namespace Reactor.Networking
public TPlugin Plugin => (TPlugin) UnsafePlugin;
public override Type InnerNetObjectType => typeof(TInnerNetObject);
public abstract void Write(MessageWriter writer, TData data);
public abstract void Write(MessageWriter writer, TData? data);
public abstract TData Read(MessageReader reader);
public abstract void Handle(TInnerNetObject innerNetObject, TData data);
public abstract void Handle(TInnerNetObject innerNetObject, TData? data);
public override void UnsafeWrite(MessageWriter writer, object data)
public override void UnsafeWrite(MessageWriter writer, object? data)
{
Write(writer, (TData) data);
Write(writer, (TData?) data);
}
public override object UnsafeRead(MessageReader reader)
public override object? UnsafeRead(MessageReader reader)
{
return Read(reader);
}
public override void UnsafeHandle(InnerNetObject innerNetObject, object data)
public override void UnsafeHandle(InnerNetObject innerNetObject, object? data)
{
Handle((TInnerNetObject) innerNetObject, (TData) data);
Handle((TInnerNetObject) innerNetObject, (TData?) data);
}
public void Send(InnerNetObject netObject, TData data, bool immediately = false)
@@ -55,16 +55,16 @@ namespace Reactor.Networking
public abstract void Handle(TInnerNetObject innerNetObject);
public override void UnsafeWrite(MessageWriter writer, object data)
public override void UnsafeWrite(MessageWriter writer, object? data)
{
}
public override object UnsafeRead(MessageReader reader)
public override object? UnsafeRead(MessageReader reader)
{
return null;
}
public override void UnsafeHandle(InnerNetObject innerNetObject, object data)
public override void UnsafeHandle(InnerNetObject innerNetObject, object? data)
{
Handle((TInnerNetObject) innerNetObject);
}
+5 -2
View File
@@ -47,7 +47,10 @@ namespace Reactor.Networking
_list.Add(customRpc);
_map[customRpc.InnerNetObjectType].Add(customRpc);
typeof(Rpc<>).MakeGenericType(customRpc.GetType()).GetProperty("Instance")!.SetValue(null, customRpc);
if (customRpc.IsSingleton)
{
typeof(Rpc<>).MakeGenericType(customRpc.GetType()).GetProperty("Instance")!.SetValue(null, customRpc);
}
return customRpc;
}
@@ -87,7 +90,7 @@ namespace Reactor.Networking
public static class Rpc<T> where T : UnsafeCustomRpc
{
private static T _instance;
private static T? _instance;
public static T Instance
{
+213
View File
@@ -0,0 +1,213 @@
using System;
using System.Collections;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.InteropServices;
using BepInEx.IL2CPP;
using HarmonyLib;
using Hazel;
using InnerNet;
using MonoMod.RuntimeDetour;
using MonoMod.Utils;
using Reactor.Networking.Serialization;
namespace Reactor.Networking.MethodRpc
{
public class MethodRpc : UnsafeCustomRpc
{
public delegate object HandleDelegate(InnerNetObject innerNetObject, object[] args);
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)
{
throw new NotImplementedException("Instance method rpc support is postponed until unhollower v0.5.0");
}
var parameters = method.GetParameters();
if (method.IsStatic && parameters.Length == 0)
{
throw new ArgumentException("Static method rpc requires at least one argument", nameof(method));
}
var innerNetObjectType = parameters.First().ParameterType;
if (!typeof(InnerNetObject).IsAssignableFrom(innerNetObjectType))
{
throw new ArgumentException("First argument of a static method rpc has to be an InnerNetObject", nameof(method));
}
InnerNetObjectType = innerNetObjectType;
Handle = Hook(method, parameters);
}
public MethodInfo Method { get; }
public HandleDelegate Handle { get; }
protected internal override bool IsSingleton => false;
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)
{
var args = (object[]) data!;
MessageSerializer.Serialize(writer, args);
}
public override object UnsafeRead(MessageReader reader)
{
var args = MessageSerializer.Deserialize(reader, this);
return args;
}
public override void UnsafeHandle(InnerNetObject innerNetObject, object? data)
{
var args = (object[]) data!;
var result = Handle(innerNetObject, args);
if (result is IEnumerator enumerator)
{
Coroutines.Start(enumerator);
}
}
public void Send(InnerNetObject innerNetObject, object[] args)
{
UnsafeSend(innerNetObject, args, SendImmediately);
}
private static readonly MethodInfo _sendMethod = AccessTools.Method(typeof(MethodRpc), nameof(Send));
/// <summary>
/// Hooks the <paramref name="method"/> rpc with a dynamic method that sends it
/// </summary>
private HandleDelegate Hook(MethodInfo method, ParameterInfo[] parameters)
{
var detour = new Detour(method, GenerateSender());
// Used as target when hooking, sends the method rpc
DynamicMethod GenerateSender()
{
var dynamicMethod = new DynamicMethod($"Sender<{method.GetID(simple: true)}>", method.ReturnType, parameters.Select(x => x.ParameterType).ToArray());
foreach (var parameter in parameters)
{
dynamicMethod.DefineParameter(parameter.Position, ParameterAttributes.None, parameter.Name);
}
var il = dynamicMethod.GetILGenerator();
// :yeefuckinhaw:
// Black magic from stackoverflow, they also said that you shouldn't do that ;)
// Resort to Dictionary<MethodInfo, MethodRpc> if this turns out to be unreliable
{
var handle = GCHandle.Alloc(this);
var ptr = GCHandle.ToIntPtr(handle);
if (IntPtr.Size == 4)
{
il.Emit(OpCodes.Ldc_I4, ptr.ToInt32());
}
else
{
il.Emit(OpCodes.Ldc_I8, ptr.ToInt64());
}
il.Emit(OpCodes.Conv_I);
// TODO Figure out why this always throws NullReferenceException on mono
// il.Emit(OpCodes.Ldobj, typeof(MethodRpc));
// Workaround for ^, speed seems to be the same
il.Emit(OpCodes.Call, AccessTools.Method(typeof(GCHandle), nameof(GCHandle.FromIntPtr)));
var temp = il.DeclareLocal(typeof(GCHandle));
il.Emit(OpCodes.Stloc, temp);
il.Emit(OpCodes.Ldloca, temp);
il.Emit(OpCodes.Call, AccessTools.PropertyGetter(typeof(GCHandle), nameof(GCHandle.Target)));
}
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Ldc_I4, parameters.Length - 1);
il.Emit(OpCodes.Newarr, typeof(object));
for (var i = 1; i < parameters.Length; i++)
{
var parameter = parameters[i];
il.Emit(OpCodes.Dup);
il.Emit(OpCodes.Ldc_I4, i - 1);
il.Emit(OpCodes.Ldarg, i);
var parameterType = parameter.ParameterType;
if (parameterType.IsValueType)
{
il.Emit(OpCodes.Box, parameterType);
}
il.Emit(OpCodes.Stelem_Ref);
}
il.Emit(OpCodes.Call, _sendMethod);
if (method.ReturnType != typeof(void))
{
il.Emit(OpCodes.Ldnull);
}
il.Emit(OpCodes.Ret);
return dynamicMethod;
}
// Proxy translating object array to trampoline method args, used by MethodRpc to invoke original handling
HandleDelegate GenerateHandler(DynamicMethod trampoline)
{
var dynamicMethod = new DynamicMethod($"Handler<{method.GetID(simple: true)}>", typeof(object), new[] { typeof(InnerNetObject), typeof(object[]) });
dynamicMethod.DefineParameter(0, ParameterAttributes.None, "innerNetObject");
dynamicMethod.DefineParameter(1, ParameterAttributes.None, "args");
var il = dynamicMethod.GetILGenerator();
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Castclass, InnerNetObjectType);
for (var i = 1; i < parameters.Length; i++)
{
var parameter = parameters[i];
il.Emit(OpCodes.Ldarg_1);
il.Emit(OpCodes.Ldc_I4, i - 1);
il.Emit(OpCodes.Ldelem_Ref);
var parameterType = parameter.ParameterType;
il.Emit(parameterType.IsValueType ? OpCodes.Unbox_Any : OpCodes.Castclass, parameterType);
}
il.Emit(OpCodes.Call, trampoline);
if (method.ReturnType == typeof(void))
{
il.Emit(OpCodes.Ldnull);
}
il.Emit(OpCodes.Ret);
return dynamicMethod.CreateDelegate<HandleDelegate>();
}
return GenerateHandler((DynamicMethod) detour.GenerateTrampoline());
}
}
}
@@ -0,0 +1,53 @@
using System;
using System.Linq;
using System.Reflection;
using BepInEx.IL2CPP;
using HarmonyLib;
using Hazel;
namespace Reactor.Networking.MethodRpc
{
[AttributeUsage(AttributeTargets.Method)]
public class MethodRpcAttribute : Attribute
{
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)
{
Id = id;
}
public static void Register(Assembly assembly, BasePlugin plugin)
{
var methods = assembly.GetTypes()
.SelectMany(t => t.GetMethods(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public));
foreach (var method in methods)
{
var attribute = method.GetCustomAttribute<MethodRpcAttribute>();
if (attribute == null)
{
continue;
}
try
{
var customRpc = new MethodRpc(plugin, method, attribute.Id, attribute.Option, attribute.LocalHandling, attribute.SendImmediately);
PluginSingleton<ReactorPlugin>.Instance.CustomRpcManager.Register(customRpc);
}
catch (Exception e)
{
Logger<ReactorPlugin>.Warning($"Failed to register {method.FullDescription()}: {e}");
}
}
}
internal static void Initialize()
{
ChainloaderHooks.PluginLoad += plugin => Register(plugin.GetType().Assembly, plugin);
}
}
}
+6 -7
View File
@@ -1,25 +1,24 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using BepInEx.IL2CPP;
namespace Reactor.Networking
{
public static class ModList
{
private static Dictionary<string, Mod> _mapById;
private static Dictionary<uint, Mod> _mapByNetId;
private static Dictionary<string, Mod>? _mapById;
private static Dictionary<uint, Mod>? _mapByNetId;
public static ISet<Mod> Current { get; private set; }
public static ISet<Mod>? Current { get; private set; }
public static Mod GetById(string id)
{
return _mapById[id];
return _mapById![id];
}
public static Mod GetByNetId(uint netId)
{
return _mapByNetId[netId];
return _mapByNetId![netId];
}
internal static void Update()
@@ -32,7 +31,7 @@ namespace Reactor.Networking
i++,
plugin.Metadata.GUID,
plugin.Metadata.Version.Clean(),
plugin.Instance.GetType().GetCustomAttribute<ReactorPluginSideAttribute>()?.Side ?? PluginSide.Both
ReactorPluginSideAttribute.GetPluginSide(plugin.Instance.GetType())
))
.ToHashSet();
-23
View File
@@ -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;
}
}
}
}
+15 -6
View File
@@ -30,7 +30,7 @@ namespace Reactor.Networking.Patches
Logger<ReactorPlugin>.Info($"Connected to a modded server ({serverName} {serverVersion}, {pluginCount} plugins), sending mod declarations");
var mods = ModList.Current;
var mods = ModList.Current!;
var writer = MessageWriter.Get(SendOption.Reliable);
@@ -131,7 +131,7 @@ namespace Reactor.Networking.Patches
{
var reactorPlugin = PluginSingleton<ReactorPlugin>.Instance;
if (reactorPlugin.AllowVanillaServers.Value)
if (reactorPlugin.AllowVanillaServers!.Value)
{
if (reactorPlugin.CustomRpcManager.List.Any())
{
@@ -151,23 +151,32 @@ namespace Reactor.Networking.Patches
}
}
[HarmonyPatch(typeof(AmongUsClient), nameof(AmongUsClient.GetConnectionData))]
[HarmonyPatch(typeof(InnerNetClient), nameof(InnerNetClient.GetConnectionData))]
public static class HandshakePatch
{
public static void Prefix(ref bool useDtlsLayout)
{
// Due to reasons currently unknown, the useDtlsLayout parameter sometimes doesn't reflect whether DTLS
// is actually supposed to be enabled. This causes a bad handshake message and a quick disconnect.
// The field on AmongUsClient appears to be more reliable, so override this parameter with what it is supposed to be.
Logger<ReactorPlugin>.Info($"Currently using dtls: {useDtlsLayout}. Should use dtls: {AmongUsClient.Instance.useDtls}");
useDtlsLayout = AmongUsClient.Instance.useDtls;
}
public static void Postfix(ref Il2CppStructArray<byte> __result)
{
ModList.Update();
var handshake = MessageWriter.Get(SendOption.Reliable);
var handshake = new MessageWriter(1000);
handshake.Write(__result);
ModdedHandshakeC2S.Serialize(
handshake,
ModList.Current.Count
ModList.Current!.Count
);
__result = handshake.ToByteArray(false);
__result = handshake.ToByteArray(true);
handshake.Recycle();
}
}
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using HarmonyLib;
using Hazel;
using InnerNet;
using MonoMod.Utils;
namespace Reactor.Networking.Serialization
{
[MessageConverter]
public class InnerNetObjectConverter : MessageConverter<InnerNetObject>
{
private static readonly MethodInfo _readNetObject = AccessTools.Method(typeof(MessageExtensions), nameof(MessageExtensions.ReadNetObject));
private static readonly Dictionary<Type, Func<MessageReader, InnerNetObject>> _readNetObjectMap = new Dictionary<Type, Func<MessageReader, InnerNetObject>>();
public static InnerNetObject ReadNetObject(MessageReader reader, Type t)
{
if (_readNetObjectMap.TryGetValue(t, out var value))
{
return value(reader);
}
var @delegate = _readNetObject.MakeGenericMethod(t).CreateDelegate<Func<MessageReader, InnerNetObject>>();
_readNetObjectMap[t] = @delegate;
return @delegate(reader);
}
public override void Write(MessageWriter writer, InnerNetObject value)
{
MessageExtensions.WriteNetObject(writer, value);
}
public override InnerNetObject Read(MessageReader reader, Type objectType)
{
return ReadNetObject(reader, objectType);
}
}
}
@@ -0,0 +1,29 @@
using System;
using Hazel;
namespace Reactor.Networking.Serialization
{
public abstract class UnsafeMessageConverter
{
public abstract void UnsafeWrite(MessageWriter writer, object value);
public abstract object UnsafeRead(MessageReader reader, Type objectType);
public abstract bool CanConvert(Type objectType);
}
public abstract class MessageConverter<T> : UnsafeMessageConverter
{
public abstract void Write(MessageWriter writer, T value);
public abstract T Read(MessageReader reader, Type objectType);
public override bool CanConvert(Type objectType)
{
return typeof(T).IsAssignableFrom(objectType);
}
public override void UnsafeWrite(MessageWriter writer, object value) => Write(writer, (T) value);
public override object UnsafeRead(MessageReader reader, Type objectType) => Read(reader, objectType)!;
}
}
@@ -0,0 +1,41 @@
using System;
using System.Reflection;
using HarmonyLib;
namespace Reactor.Networking.Serialization
{
[AttributeUsage(AttributeTargets.Class)]
public class MessageConverterAttribute : Attribute
{
public static void Register(Assembly assembly)
{
foreach (var type in assembly.GetTypes())
{
var attribute = type.GetCustomAttribute<MessageConverterAttribute>();
if (attribute != null)
{
if (!type.IsSubclassOf(typeof(UnsafeMessageConverter)))
{
throw new InvalidOperationException($"Type {type.FullDescription()} has {nameof(MessageConverterAttribute)} but doesn't extend {nameof(UnsafeMessageConverter)}.");
}
try
{
var messageConverter = (UnsafeMessageConverter) Activator.CreateInstance(type);
MessageSerializer.Register(messageConverter);
}
catch (Exception e)
{
Logger<ReactorPlugin>.Warning($"Failed to register {type.FullDescription()}: {e}");
}
}
}
}
internal static void Initialize()
{
ChainloaderHooks.PluginLoad += plugin => Register(plugin.GetType().Assembly);
}
}
}
@@ -0,0 +1,156 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Hazel;
using Reactor.Extensions;
using UnityEngine;
namespace Reactor.Networking.Serialization
{
public static class MessageSerializer
{
private static List<UnsafeMessageConverter> MessageConverters { get; } = new List<UnsafeMessageConverter>();
private static Dictionary<Type, UnsafeMessageConverter> MessageConverterMap { get; } = new Dictionary<Type, UnsafeMessageConverter>();
public static void Register(UnsafeMessageConverter messageConverter)
{
MessageConverters.Add(messageConverter);
MessageConverterMap.Clear();
}
public static UnsafeMessageConverter? FindConverter(Type type)
{
if (MessageConverterMap.TryGetValue(type, out var value))
{
return value;
}
var converter = MessageConverters.SingleOrDefault(x => x.CanConvert(type));
MessageConverterMap.Add(type, converter);
return converter;
}
public static void Serialize(MessageWriter writer, object[] args)
{
foreach (var arg in args)
{
writer.Serialize(arg);
}
}
public static void Serialize(this MessageWriter writer, object o)
{
switch (o)
{
case int i:
writer.WritePacked(i);
break;
case uint i:
writer.WritePacked(i);
break;
case byte i:
writer.Write(i);
break;
case float i:
writer.Write(i);
break;
case sbyte i:
writer.Write(i);
break;
case ushort i:
writer.Write(i);
break;
case bool i:
writer.Write(i);
break;
case Vector2 i:
writer.Write(i);
break;
case string i:
writer.Write(i);
break;
default:
var converter = FindConverter(o.GetType());
if (converter != null)
{
converter.UnsafeWrite(writer, o);
break;
}
throw new NotSupportedException("Couldn't serialize " + o.GetType());
}
}
public static object[] Deserialize(MessageReader reader, MethodRpc.MethodRpc methodRpc)
{
var parameters = methodRpc.Method.GetParameters();
var args = new object[parameters.Length - 1];
for (var i = 1; i < parameters.Length; i++)
{
var parameter = parameters[i];
args[i - 1] = reader.Deserialize(parameter.ParameterType);
}
return args;
}
public static object Deserialize(this MessageReader reader, Type t)
{
if (t == typeof(int))
{
return reader.ReadPackedInt32();
}
if (t == typeof(uint))
{
return reader.ReadPackedUInt32();
}
if (t == typeof(byte))
{
return reader.ReadByte();
}
if (t == typeof(float))
{
return reader.ReadSingle();
}
if (t == typeof(sbyte))
{
return reader.ReadSByte();
}
if (t == typeof(ushort))
{
return reader.ReadUInt16();
}
if (t == typeof(bool))
{
return reader.ReadBoolean();
}
if (t == typeof(Vector2))
{
return reader.ReadVector2();
}
if (t == typeof(string))
{
return reader.ReadString();
}
var converter = FindConverter(t);
if (converter != null)
{
return converter.UnsafeRead(reader, t);
}
throw new NotSupportedException("Couldn't deserialize " + t);
}
}
}
+11 -10
View File
@@ -8,7 +8,8 @@ namespace Reactor.Networking
{
public abstract class UnsafeCustomRpc
{
internal CustomRpcManager Manager { get; set; }
internal CustomRpcManager? Manager { get; set; }
protected internal virtual bool IsSingleton => true;
public uint Id { get; }
public BasePlugin UnsafePlugin { get; }
@@ -26,13 +27,13 @@ namespace Reactor.Networking
Id = id;
}
public abstract void UnsafeWrite(MessageWriter writer, object data);
public abstract object UnsafeRead(MessageReader reader);
public abstract void UnsafeHandle(InnerNetObject innerNetObject, object data);
public abstract void UnsafeWrite(MessageWriter writer, object? data);
public abstract object? UnsafeRead(MessageReader reader);
public abstract void UnsafeHandle(InnerNetObject innerNetObject, object? data);
public void UnsafeSend(InnerNetObject netObject, object data, bool immediately = false, int targetClientId = -1)
public void UnsafeSend(InnerNetObject innerNetObject, object? data, bool immediately = false, int targetClientId = -1)
{
if (netObject == null) throw new ArgumentNullException(nameof(netObject));
if (innerNetObject == null) throw new ArgumentNullException(nameof(innerNetObject));
if (Manager == null)
{
@@ -41,13 +42,13 @@ namespace Reactor.Networking
if (LocalHandling == RpcLocalHandling.Before)
{
UnsafeHandle(netObject, data);
UnsafeHandle(innerNetObject, data);
}
var writer = immediately switch
{
false => AmongUsClient.Instance.StartRpc(netObject.NetId, CustomRpcManager.CallId, SendOption),
true => AmongUsClient.Instance.StartRpcImmediately(netObject.NetId, CustomRpcManager.CallId, SendOption, targetClientId)
false => AmongUsClient.Instance.StartRpc(innerNetObject.NetId, CustomRpcManager.CallId, SendOption),
true => AmongUsClient.Instance.StartRpcImmediately(innerNetObject.NetId, CustomRpcManager.CallId, SendOption, targetClientId)
};
var pluginNetId = ModList.GetById(PluginId).NetId;
@@ -69,7 +70,7 @@ namespace Reactor.Networking
if (LocalHandling == RpcLocalHandling.After)
{
UnsafeHandle(netObject, data);
UnsafeHandle(innerNetObject, data);
}
}
}
+32
View File
@@ -0,0 +1,32 @@
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;
}
[HarmonyPatch(typeof(AmongUsClient._CoJoinOnlinePublicGame_d__1), nameof(AmongUsClient._CoJoinOnlinePublicGame_d__1.MoveNext))]
[HarmonyPrefix]
public static void EnableUdpMatchmakingPatch(AmongUsClient._CoJoinOnlinePublicGame_d__1 __instance)
{
// Skip to state 1 which just calls CoJoinOnlineGameDirect
if (__instance.__1__state == 0 && !ServerManager.Instance.IsHttp)
{
__instance.__1__state = 1;
__instance.__8__1 = new AmongUsClient.__c__DisplayClass1_0
{
matchmakerToken = string.Empty,
};
}
}
}
}
-25
View File
@@ -1,25 +0,0 @@
using HarmonyLib;
using TMPro;
using UnhollowerBaseLib;
using Object = Il2CppSystem.Object;
namespace Reactor.Patches
{
// 2021.4.12 does not properly set the region text, so we need to help it a bit.
internal static class FixRegionText
{
[HarmonyPatch(typeof(TextMeshPro), nameof(TextMeshPro.Awake))]
public static class MatchMakerPatch
{
public static void Prefix(TextMeshPro __instance)
{
if (__instance.name == "RegionText_TMP")
{
var region = ServerManager.Instance.CurrentRegion;
var name = TranslationController.Instance.GetStringWithDefault(region.TranslateName, region.Name, new Il2CppReferenceArray<Object>(0));
__instance.text = name;
}
}
}
}
}
+52 -30
View File
@@ -1,50 +1,72 @@
using System;
using System.Collections.Generic;
using System.Linq;
using HarmonyLib;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using Object = UnityEngine.Object;
namespace Reactor.Patches
{
// TODO this needs some changes as text box was entirely removed in 2021.6.15
internal static class FreeNamePatch
public static class FreeNamePatch
{
[HarmonyPatch(typeof(SetNameText), nameof(SetNameText.Start))]
public static class NameInputPatch
[HarmonyPatch(typeof(AccountManager), nameof(AccountManager.CheckAndRegenerateName))]
internal static class ValidateRandomNamePatch
{
public static void Postfix(SetNameText __instance)
public static bool Prefix()
{
if (!__instance)
{
return;
}
return false;
}
}
public static void Initialize()
{
SceneManager.add_sceneLoaded((Action<Scene, LoadSceneMode>) ((scene, _) =>
{
if (!scene.name.Equals("MMOnline")) return;
if (!TryMoveObjects()) return;
var editName = DestroyableSingleton<AccountManager>.Instance.accountTab.editNameScreen;
var nameText = Object.Instantiate(editName.nameText.gameObject);
var nameText = __instance.gameObject;
nameText.transform.localPosition += Vector3.up * 2.2f;
var textBox = nameText.AddComponent<TextBoxTMP>();
textBox.Background = nameText.GetComponentInChildren<SpriteRenderer>();
textBox.OnChange = textBox.OnEnter = textBox.OnFocusLost = new Button.ButtonClickedEvent();
textBox.characterLimit = 10;
var textMeshPro = nameText.GetComponentInChildren<TextMeshPro>();
textBox.outputText = textMeshPro;
textBox.SetText(SaveManager.PlayerName);
textBox.OnChange.AddListener((Action) (() =>
{
var textBox = nameText.GetComponent<TextBoxTMP>();
textBox.outputText.alignment = TextAlignmentOptions.CenterGeoAligned;
textBox.outputText.transform.position = nameText.transform.position;
textBox.outputText.fontSize = 4f;
textBox.OnChange.AddListener((Action) (() => {
SaveManager.PlayerName = textBox.text;
}));
textBox.OnEnter = textBox.OnFocusLost = textBox.OnChange;
textBox.Pipe.GetComponent<TextMeshPro>().fontSize = 4f;
}));
}
var pipeGameObject = GameObject.Find("Pipe");
if (!pipeGameObject)
{
return;
}
private static bool TryMoveObjects()
{
var toMove = new List<string>
{
"HostGameButton",
"FindGameButton",
"JoinGameButton"
};
var pipe = UnityEngine.Object.Instantiate(pipeGameObject, textMeshPro.transform);
pipe.GetComponent<TextMeshPro>().fontSize = 4f;
textBox.Pipe = pipe.GetComponent<MeshRenderer>();
var yStart = Vector3.up;
var yOffset = 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;
}
}
}
+4 -4
View File
@@ -12,9 +12,9 @@ namespace Reactor.Patches
{
public static class ReactorVersionShower
{
public static TextMeshPro Text { get; private set; }
public static TextMeshPro? Text { get; private set; }
public static event TextUpdatedHandler TextUpdated;
public static event TextUpdatedHandler? TextUpdated;
public delegate void TextUpdatedHandler(TextMeshPro text);
@@ -56,8 +56,8 @@ namespace Reactor.Patches
public static void UpdateText()
{
Text.text = "Reactor " + typeof(ReactorPlugin).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
Text.text += "\nBepInEx: " + Paths.BepInExVersion;
Text!.text = "Reactor " + typeof(ReactorPlugin).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
Text.text += "\nBepInEx " + Paths.BepInExVersion;
Text.text += "\nMods: " + IL2CPPChainloader.Instance.Plugins.Count;
TextUpdated?.Invoke(Text);
}
+56 -3
View File
@@ -1,13 +1,18 @@
using System;
using System.IO;
using System.Reflection;
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 +25,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 +52,37 @@ namespace Reactor.Patches
public void Dispose()
{
Watcher?.Dispose();
Watcher.Dispose();
}
[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
// 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)
{
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;
return continueWrite;
}
return true;
}
}
}
}
+51
View File
@@ -0,0 +1,51 @@
using System;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using HarmonyLib;
using InnerNet;
namespace Reactor.Patches
{
[HarmonyPatch(typeof(InnerNetClient), nameof(InnerNetClient.Connect))]
public static class ConnectPatch
{
public static void Prefix(InnerNetClient __instance)
{
Logger<ReactorPlugin>.Info($"Joining {__instance.networkAddress}:{__instance.networkPort}");
}
}
/// <summary>
/// Fixes hardcoded port and filters out IPv6 in DnsRegionInfo
/// </summary>
[HarmonyPatch(typeof(DnsRegionInfo), nameof(DnsRegionInfo.PopulateServers))]
public static class PopulateServersPatch
{
public static bool Prefix(DnsRegionInfo __instance)
{
try
{
var i = 0;
var servers = Dns.GetHostAddresses(__instance.Fqdn)
.Distinct()
.Where(ipAddress => ipAddress.AddressFamily == AddressFamily.InterNetwork)
.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.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, __instance.UseDtls),
};
}
return false;
}
}
}
+33 -9
View File
@@ -1,19 +1,43 @@
using System;
using UnityEngine.SceneManagement;
using System.Reflection;
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, _) =>
__instance.minimumSecondsBeforeSceneChange = 0;
}
}
[HarmonyPatch(typeof(SplashManager), nameof(SplashManager.Update))]
internal static class WaitForEpicAuth
{
private static readonly PropertyInfo? _localUserIdProperty = typeof(EpicManager).GetProperty("localUserId", BindingFlags.Static | BindingFlags.Public);
private static bool _loginFinished;
private static bool Prefix(SplashManager __instance)
{
if (__instance.startedSceneLoad) return true;
if (_localUserIdProperty != null && !_loginFinished)
{
if (scene.name == "SplashIntro")
{
SceneManager.LoadScene("MainMenu");
}
}));
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;
}
}
}
}
-18
View File
@@ -1,18 +0,0 @@
namespace Reactor
{
public enum PlayerColor : byte
{
Red,
Blue,
Green,
Pink,
Orange,
Yellow,
Black,
White,
Purple,
Brown,
Cyan,
Lime
}
}
+1 -1
View File
@@ -6,7 +6,7 @@ namespace Reactor
{
public static class PluginSingleton<T> where T : BasePlugin
{
private static T _instance;
private static T? _instance;
public static T Instance => _instance ??= IL2CPPChainloader.Instance.Plugins.Values.Select(x => x.Instance).OfType<T>().Single();
+6 -3
View File
@@ -2,8 +2,11 @@
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>latest</LangVersion>
<DebugType>embedded</DebugType>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionPrefix>1.2.8</VersionPrefix>
<VersionSuffix>dev</VersionSuffix>
<Description>Core mod and API for Among Us</Description>
<Authors>NuclearPowered</Authors>
@@ -14,14 +17,14 @@
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DebugType>embedded</DebugType>
<!-- SourceLink -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
+23 -26
View File
@@ -6,32 +6,34 @@ using BepInEx.IL2CPP;
using HarmonyLib;
using Reactor.Extensions;
using Reactor.Networking;
using Reactor.Networking.MethodRpc;
using Reactor.Networking.Serialization;
using Reactor.Patches;
using Reactor.Unstrip;
using UnhollowerBaseLib.Attributes;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace Reactor
{
[BepInPlugin(Id)]
[BepInAutoPlugin("gg.reactor.api")]
[BepInProcess("Among Us.exe")]
public class ReactorPlugin : BasePlugin
public partial class ReactorPlugin : BasePlugin
{
public const string Id = "gg.reactor.api";
public Harmony Harmony { get; } = new Harmony(Id);
public CustomRpcManager CustomRpcManager { get; } = new CustomRpcManager();
public ConfigEntry<bool> AllowVanillaServers;
public ConfigEntry<bool>? AllowVanillaServers { get; private set; }
private GameObject _gameObject;
private RegionInfoWatcher RegionInfoWatcher { get; } = new RegionInfoWatcher();
internal RegionInfoWatcher RegionInfoWatcher { get; } = new RegionInfoWatcher();
public ReactorPlugin()
{
PluginSingleton<BasePlugin>.Initialize();
RegisterInIl2CppAttribute.Initialize();
RegisterCustomRpcAttribute.Initialize();
MessageConverterAttribute.Initialize();
MethodRpcAttribute.Initialize();
ChainloaderHooks.OnPluginLoad(this);
}
@@ -42,19 +44,26 @@ namespace Reactor
Harmony.PatchAll();
_gameObject = new GameObject(nameof(ReactorPlugin)).DontDestroy();
_gameObject.AddComponent<ReactorComponent>().Plugin = this;
_gameObject.AddComponent<Coroutines.Component>();
this.AddComponent<ReactorComponent>().Plugin = this;
this.AddComponent<Coroutines.Component>();
this.AddComponent<Dispatcher>();
ReactorVersionShower.Initialize();
SplashSkip.Initialize();
FreeNamePatch.Initialize();
DefaultBundle.Load();
SceneManager.add_sceneLoaded((Action<Scene, LoadSceneMode>) ((scene, _) =>
{
if (scene.name == "MainMenu")
{
ModManager.Instance.ShowModStamp();
}
}));
}
public override bool Unload()
{
Harmony.UnpatchSelf();
_gameObject.Destroy();
RegionInfoWatcher?.Dispose();
return base.Unload();
@@ -64,29 +73,17 @@ namespace Reactor
public class ReactorComponent : MonoBehaviour
{
[HideFromIl2Cpp]
public ReactorPlugin Plugin { get; internal set; }
public ReactorPlugin? Plugin { get; internal set; }
public ReactorComponent(IntPtr ptr) : base(ptr)
{
}
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)
{
+19
View File
@@ -1,4 +1,6 @@
using System;
using System.Linq;
using System.Reflection;
namespace Reactor
{
@@ -14,5 +16,22 @@ namespace Reactor
{
Side = side;
}
public static PluginSide GetPluginSide(Type type)
{
var attribute = type.GetCustomAttribute<ReactorPluginSideAttribute>();
if (attribute != null)
{
return attribute.Side;
}
var metadataAttribute = type.Assembly.GetCustomAttributes<AssemblyMetadataAttribute>().SingleOrDefault(x => x.Key == "Reactor.PluginSide");
if (metadataAttribute != null)
{
return Enum.Parse<PluginSide>(metadataAttribute.Value, true);
}
return PluginSide.Both;
}
}
}
+21 -35
View File
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using HarmonyLib;
using UnhollowerRuntimeLib;
@@ -12,53 +11,39 @@ namespace Reactor
[AttributeUsage(AttributeTargets.Class)]
public class RegisterInIl2CppAttribute : Attribute
{
public Type[] Interfaces { get; }
public RegisterInIl2CppAttribute()
{
Interfaces = Type.EmptyTypes;
}
public RegisterInIl2CppAttribute(params Type[] interfaces)
{
Interfaces = interfaces;
}
[Obsolete("You don't need to call this anymore", true)]
public static void Register()
{
}
private static readonly AccessTools.FieldRef<object, HashSet<string>> _injectedTypes
= AccessTools.FieldRefAccess<HashSet<string>>(typeof(ClassInjector), "InjectedTypes");
private static readonly Func<Type, IntPtr> _readClassPointerForType = AccessTools.MethodDelegate<Func<Type, IntPtr>>(
AccessTools.Method(typeof(ClassInjector), "ReadClassPointerForType")
);
private static bool IsInjected(Type type)
private static void Register(Type type, Type[] interfaces)
{
if (_readClassPointerForType(type) != IntPtr.Zero)
var baseTypeAttribute = type.BaseType?.GetCustomAttribute<RegisterInIl2CppAttribute>();
if (baseTypeAttribute != null)
{
return true;
Register(type.BaseType!, baseTypeAttribute.Interfaces);
}
var injectedTypes = _injectedTypes();
lock (injectedTypes)
{
if (injectedTypes.Contains(type.FullName))
{
return true;
}
}
return false;
}
private static void Register(Type type)
{
if (type.BaseType?.GetCustomAttribute<RegisterInIl2CppAttribute>() != null)
{
Register(type.BaseType);
}
if (IsInjected(type))
if (ClassInjector.IsTypeRegisteredInIl2Cpp(type))
{
return;
}
try
{
ClassInjector.RegisterTypeInIl2Cpp(type);
ClassInjector.RegisterTypeInIl2Cpp(type, new RegisterTypeOptions { Interfaces = interfaces });
}
catch (Exception e)
{
@@ -70,9 +55,10 @@ namespace Reactor
{
foreach (var type in assembly.GetTypes())
{
if (type.GetCustomAttribute<RegisterInIl2CppAttribute>() != null)
var attribute = type.GetCustomAttribute<RegisterInIl2CppAttribute>();
if (attribute != null)
{
Register(type);
Register(type, attribute.Interfaces);
}
}
}
+9 -8
View File
@@ -8,7 +8,8 @@ namespace Reactor.Unstrip
{
public static void Load()
{
var bundle = AssetBundle.LoadFromMemory(typeof(ReactorPlugin).Assembly.GetManifestResourceStream("Reactor.Assets.default.bundle").ReadFully());
using var stream = typeof(ReactorPlugin).Assembly.GetManifestResourceStream("Reactor.Assets.default.bundle")!;
var bundle = AssetBundle.LoadFromStream(stream.AsIl2Cpp());
var backupShader = bundle.LoadAsset<Shader>("UI-Default");
@@ -19,13 +20,13 @@ namespace Reactor.Unstrip
GUIExtensions.StandardResources = new DefaultControls.Resources
{
background = bundle.LoadAsset<Sprite>("Background").DontUnload(),
checkmark = bundle.LoadAsset<Sprite>("Checkmark").DontUnload(),
dropdown = bundle.LoadAsset<Sprite>("DropdownArrow").DontUnload(),
knob = bundle.LoadAsset<Sprite>("Knob").DontUnload(),
mask = bundle.LoadAsset<Sprite>("UIMask").DontUnload(),
standard = bundle.LoadAsset<Sprite>("UISprite").DontUnload(),
inputField = bundle.LoadAsset<Sprite>("InputFieldBackground").DontUnload()
background = bundle.LoadAsset<Sprite>("Background")!.DontUnload(),
checkmark = bundle.LoadAsset<Sprite>("Checkmark")!.DontUnload(),
dropdown = bundle.LoadAsset<Sprite>("DropdownArrow")!.DontUnload(),
knob = bundle.LoadAsset<Sprite>("Knob")!.DontUnload(),
mask = bundle.LoadAsset<Sprite>("UIMask")!.DontUnload(),
standard = bundle.LoadAsset<Sprite>("UISprite")!.DontUnload(),
inputField = bundle.LoadAsset<Sprite>("InputFieldBackground")!.DontUnload()
};
bundle.Unload(false);
+500
View File
@@ -0,0 +1,500 @@
{
"version": 1,
"dependencies": {
".NETStandard,Version=v2.1": {
"AmongUs.GameLibs.Steam": {
"type": "Direct",
"requested": "[2022.8.23, )",
"resolved": "2022.8.23",
"contentHash": "baY5JO6dbdOAZ0VTtGX0xre6/BlDdreJDAH8boCKZt3JTAcn+eeH+l8mUZRC9eCJOODUik2C0TTAt5AqBmYtZg=="
},
"BepInEx.AutoPlugin": {
"type": "Direct",
"requested": "[1.0.1, )",
"resolved": "1.0.1",
"contentHash": "G4YpTHG9rtkDJof+ld7Er4E+sCOlgsjG4bJ1itx1ub7dgff6qqHLy9ksX1ehgO0AdBOPVyVl/GKJg9o7iNl8HA=="
},
"BepInEx.IL2CPP": {
"type": "Direct",
"requested": "[6.0.0-be.570, )",
"resolved": "6.0.0-be.570",
"contentHash": "JGkWFFGZTWQ+YlFQ17izlwfGNUyo/zfFGNYPX6XAeTkfM5RwXiPYNMNO6eWoxbKwaYlAylQq2YCRkkCnAr9nwQ==",
"dependencies": {
"BepInEx.Core": "6.0.0-be.570",
"BepInEx.Il2Cpp.TlsAdapter": "1.0.1",
"HarmonyX": "2.10.0",
"Iced": "1.17.0",
"Il2CppAssemblyUnhollower.BaseLib": "0.4.33.3",
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.33.3",
"Il2CppAssemblyUnhollower.Lib": "0.4.33.3",
"Il2CppDumper": "6.6.4",
"MonoMod.RuntimeDetour": "22.5.1.1",
"Samboy063.Cpp2IL.Core": "2022.0.5"
}
},
"BepInEx.IL2CPP.MSBuild": {
"type": "Direct",
"requested": "[1.1.1, )",
"resolved": "1.1.1",
"contentHash": "uUSo4TuamyEIVg+ICNeJMSSW/arKWHGpfBFINc4fdF5kppfHFrsDURKzNPmDvxivtLsiuGthck9J/5uPXgIcTg=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[1.1.1, )",
"resolved": "1.1.1",
"contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "1.1.1",
"Microsoft.SourceLink.Common": "1.1.1"
}
},
"BepInEx.Core": {
"type": "Transitive",
"resolved": "6.0.0-be.570",
"contentHash": "kygIunLrK1HMGcRo2E/7e4ZEAA0xewuB/j5mPoMi7Xk58GUi43XnclBJHif9x05a55s0kFkfKOrpwIRmjd0cDw==",
"dependencies": {
"HarmonyX": "2.10.0",
"MonoMod.Utils": "22.3.23.4",
"SemanticVersioning": "2.0.2"
}
},
"BepInEx.Il2Cpp.TlsAdapter": {
"type": "Transitive",
"resolved": "1.0.1",
"contentHash": "kTfX6312X0Fvwks+t7Ul3YO2jMSbqNS2Jx/85Cgl6lbAjEJnKzsmx7Krmd66dbnx0eY/QMjaV2r6LyWmQARtdA==",
"dependencies": {
"HarmonyX": "2.3.1"
}
},
"HarmonyX": {
"type": "Transitive",
"resolved": "2.10.0",
"contentHash": "4ayiy/dlCiW86K2N7Jvbf+VpI5wvP7dncv/6oRmfwRi32UCmCRzCGzsxdMfzJZkp6/26oBW+DrD8vi4UejzVAg==",
"dependencies": {
"MonoMod.RuntimeDetour": "22.3.23.4",
"System.Reflection.Emit": "4.7.0"
}
},
"Iced": {
"type": "Transitive",
"resolved": "1.17.0",
"contentHash": "8x+HCVTl/HHTGpscH3vMBhV8sknN/muZFw9s3TsI8SA6+c43cOTCi2+jE4KsU8pNLbJ++iF2ZFcpcXHXtDglnw=="
},
"Il2CppAssemblyUnhollower.BaseLib": {
"type": "Transitive",
"resolved": "0.4.33.3",
"contentHash": "CH91M6Asz4iwennTa8cLg5wqROJY1JvnsfRetyOvs0cy8o/YAikvm8uuNgZv6UiTO/qoyy/QrBE1qSZDvs8bLw==",
"dependencies": {
"Iced": "1.15.0"
}
},
"Il2CppAssemblyUnhollower.BaseLib.Legacy": {
"type": "Transitive",
"resolved": "0.4.33.3",
"contentHash": "6yIJg8lkayBDevPwcdcV3LWTdHt8VAZVY0wQwuXH4POOo0Kzc6Cshy9kLCxH3AC6EQg0G/v+Albs6RZgwszXMQ==",
"dependencies": {
"Il2CppAssemblyUnhollower.BaseLib": "0.4.33.3"
}
},
"Il2CppAssemblyUnhollower.Lib": {
"type": "Transitive",
"resolved": "0.4.33.3",
"contentHash": "tdu4OnMxodkWwoImNDaycaLY1L3qJOazb5UaLAt1ncRpWyu6xvKuKe5NM6OcBXONpkYsJQeQZjD6syeFl5MCQA==",
"dependencies": {
"Il2CppAssemblyUnhollower.BaseLib": "0.4.33.3",
"Il2CppAssemblyUnhollower.BaseLib.Legacy": "0.4.33.3",
"Mono.Cecil": "0.11.3"
}
},
"Il2CppDumper": {
"type": "Transitive",
"resolved": "6.6.4",
"contentHash": "aqjmlyigdZ5FS9ElMNlaCExlgSmAiho4BeIcVwkmzHGnomBzopjOCxqIX9vc/575TQ87TKoaGW2KP+3b5xI15A==",
"dependencies": {
"Mono.Cecil": "0.11.3"
}
},
"IndexRange": {
"type": "Transitive",
"resolved": "1.0.0",
"contentHash": "6TgS1JLSUkpmPLfXBPaAgB39ZUix8E4soXWk2XSDcscVe84i1JKzIAtA7jHbRHSkOOrcr6YA0MpLCeq98y9mYQ=="
},
"js6pak.Gee.External.Capstone": {
"type": "Transitive",
"resolved": "2.1.0",
"contentHash": "YYpq7NM50bSSVUDjXyV/eiITk6syXqItPjKBOb3jEWS6RFsk0DNhpWMPW6b3hKDmArARuWDU6S2pVu1IeVrvIA=="
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q=="
},
"Microsoft.NETCore.Platforms": {
"type": "Transitive",
"resolved": "1.1.0",
"contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A=="
},
"Microsoft.NETCore.Targets": {
"type": "Transitive",
"resolved": "1.1.0",
"contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg=="
},
"Mono.Cecil": {
"type": "Transitive",
"resolved": "0.11.4",
"contentHash": "IC1h5g0NeJGHIUgzM1P82ld57knhP0IcQfrYITDPXlNpMYGUrsG5TxuaWTjaeqDNQMBDNZkB8L0rBnwsY6JHuQ=="
},
"MonoMod.RuntimeDetour": {
"type": "Transitive",
"resolved": "22.5.1.1",
"contentHash": "WG5zLRuAr8KJEnIkKTuIG1OJCrGIT3pjvnAD43E0FDchHf3Dp985MF/8tmIQvAzCZV87JNs6QKeGGqmwDmpXpw==",
"dependencies": {
"Mono.Cecil": "0.11.4",
"MonoMod.Utils": "22.5.1.1",
"System.Collections.NonGeneric": "4.3.0",
"System.ComponentModel.TypeConverter": "4.3.0",
"System.IO.FileSystem.Primitives": "4.3.0",
"System.Reflection.Emit.ILGeneration": "4.7.0",
"System.Reflection.Emit.Lightweight": "4.7.0",
"System.Reflection.TypeExtensions": "4.7.0"
}
},
"MonoMod.Utils": {
"type": "Transitive",
"resolved": "22.5.1.1",
"contentHash": "vBObO1atXxhi2C4AuC53y87Bqeogi9xIrD1Ym3YWr5uxc8Nrm8SrsFeD1i3x04R999+XQ3FdeHrbXScyWYEHqQ==",
"dependencies": {
"Mono.Cecil": "0.11.4",
"System.Collections.NonGeneric": "4.3.0",
"System.ComponentModel.TypeConverter": "4.3.0",
"System.IO.FileSystem.Primitives": "4.3.0",
"System.Reflection.Emit.ILGeneration": "4.7.0",
"System.Reflection.Emit.Lightweight": "4.7.0",
"System.Reflection.TypeExtensions": "4.7.0"
}
},
"Samboy063.Cpp2IL.Core": {
"type": "Transitive",
"resolved": "2022.0.5",
"contentHash": "5JipfyEmJWePqLLnvwzxWx9dQXxNfgN0wcZ4IcmuabWKVvk4gA5Rux4vgDh9NrWf8q9LzkizWHkrnMaG1niF7g==",
"dependencies": {
"HarmonyX": "2.5.5",
"Iced": "1.11.1",
"IndexRange": "1.0.0",
"Mono.Cecil": "0.11.4",
"Samboy063.LibCpp2IL": "2022.0.5",
"System.Runtime.InteropServices": "4.3.0",
"System.ValueTuple": "4.5.0",
"js6pak.Gee.External.Capstone": "2.1.0"
}
},
"Samboy063.LibCpp2IL": {
"type": "Transitive",
"resolved": "2022.0.5",
"contentHash": "eH+/FBclsKDxboa9N/tFoiM8kwvietVX0FtXYxvcexSp/geYCyTt2XUGOQjinqd3Yqg/QxmpIqBO7qy4MQHrhw==",
"dependencies": {
"IndexRange": "1.0.0",
"Samboy063.WasmDisassembler": "2022.0.2"
}
},
"Samboy063.WasmDisassembler": {
"type": "Transitive",
"resolved": "2022.0.2",
"contentHash": "2uu+xBb7M3HKfBx9tAY6jiDieAf0hRnQjSmGX+7IdE6i24dYsx6TYgtrLvRx5lOuF2M8DijZ5H8yQ1pcuCs2SA=="
},
"SemanticVersioning": {
"type": "Transitive",
"resolved": "2.0.2",
"contentHash": "4EQgYdNZ92SyaO7YFk6olVnebF5V+jrHyMUjvPq89tLeMo8NSfgDF+6Zwq/lgh9j/0yfQp9Lkm0ZA0rUATCZFA=="
},
"System.Collections": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Collections.NonGeneric": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "prtjIEMhGUnQq6RnPEYLpFt8AtLbp9yq2zxOSrY7KJJZrw25Fi97IzBqY7iqssbM61Ek5b8f3MG/sG1N2sN5KA==",
"dependencies": {
"System.Diagnostics.Debug": "4.3.0",
"System.Globalization": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Threading": "4.3.0"
}
},
"System.Collections.Specialized": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "Epx8PoVZR0iuOnJJDzp7pWvdfMMOAvpUo95pC4ScH2mJuXkKA2Y4aR3cG9qt2klHgSons1WFh4kcGW7cSXvrxg==",
"dependencies": {
"System.Collections.NonGeneric": "4.3.0",
"System.Globalization": "4.3.0",
"System.Globalization.Extensions": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Threading": "4.3.0"
}
},
"System.ComponentModel": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "VyGn1jGRZVfxnh8EdvDCi71v3bMXrsu8aYJOwoV7SNDLVhiEqwP86pPMyRGsDsxhXAm2b3o9OIqeETfN5qfezw==",
"dependencies": {
"System.Runtime": "4.3.0"
}
},
"System.ComponentModel.Primitives": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "j8GUkCpM8V4d4vhLIIoBLGey2Z5bCkMVNjEZseyAlm4n5arcsJOeI3zkUP+zvZgzsbLTYh4lYeP/ZD/gdIAPrw==",
"dependencies": {
"System.ComponentModel": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.ComponentModel.TypeConverter": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "16pQ6P+EdhcXzPiEK4kbA953Fu0MNG2ovxTZU81/qsCd1zPRsKc3uif5NgvllCY598k6bI0KUyKW8fanlfaDQg==",
"dependencies": {
"System.Collections": "4.3.0",
"System.Collections.NonGeneric": "4.3.0",
"System.Collections.Specialized": "4.3.0",
"System.ComponentModel": "4.3.0",
"System.ComponentModel.Primitives": "4.3.0",
"System.Globalization": "4.3.0",
"System.Linq": "4.3.0",
"System.Reflection": "4.3.0",
"System.Reflection.Extensions": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
"System.Reflection.TypeExtensions": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Threading": "4.3.0"
}
},
"System.Diagnostics.Debug": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Globalization": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Globalization.Extensions": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"System.Globalization": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Runtime.InteropServices": "4.3.0"
}
},
"System.IO": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0",
"System.Text.Encoding": "4.3.0",
"System.Threading.Tasks": "4.3.0"
}
},
"System.IO.FileSystem.Primitives": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==",
"dependencies": {
"System.Runtime": "4.3.0"
}
},
"System.Linq": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==",
"dependencies": {
"System.Collections": "4.3.0",
"System.Diagnostics.Debug": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0"
}
},
"System.Reflection": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.IO": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.Reflection.Emit": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "VR4kk8XLKebQ4MZuKuIni/7oh+QGFmZW3qORd1GvBq/8026OpW501SzT/oypwiQl4TvT8ErnReh/NzY9u+C6wQ=="
},
"System.Reflection.Emit.ILGeneration": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "AucBYo3DSI0IDxdUjKksBcQJXPHyoPyrCXYURW1WDsLI4M65Ar/goSHjdnHOAY9MiYDNKqDlIgaYm+zL2hA1KA=="
},
"System.Reflection.Emit.Lightweight": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "a4OLB4IITxAXJeV74MDx49Oq2+PsF6Sml54XAFv+2RyWwtDBcabzoxiiJRhdhx+gaohLh4hEGCLQyBozXoQPqA=="
},
"System.Reflection.Extensions": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Reflection": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.Reflection.Primitives": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Reflection.TypeExtensions": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "VybpaOQQhqE6siHppMktjfGBw1GCwvCqiufqmP8F1nj7fTUNtW35LOEt3UZTEsECfo+ELAl/9o9nJx3U91i7vA=="
},
"System.Resources.ResourceManager": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Globalization": "4.3.0",
"System.Reflection": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.Runtime": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0"
}
},
"System.Runtime.Extensions": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Runtime.Handles": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Runtime.InteropServices": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Reflection": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Handles": "4.3.0"
}
},
"System.Text.Encoding": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Threading": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==",
"dependencies": {
"System.Runtime": "4.3.0",
"System.Threading.Tasks": "4.3.0"
}
},
"System.Threading.Tasks": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.ValueTuple": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ=="
}
}
}
}
+5 -4
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="BepInExLibs" value="https://pkgs.dev.azure.com/bepinex/BepInEx/_packaging/BepInExLibs/nuget/v3/index.json" />
</packageSources>
</configuration>
<packageSources>
<add key="BepInEx" value="https://nuget.bepinex.dev/v3/index.json" />
</packageSources>
</configuration>