Skip to content

Commit

Permalink
Merge pull request #86 from NuclearPowered/feature/v2024.8.13
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexejhero authored Aug 15, 2024
2 parents 127f48f + 6faea03 commit b0dcf9d
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion AmongUs.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<ItemGroup>
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.679" Private="false" ExcludeAssets="runtime;native" />
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2024.6.18" PrivateAssets="all" />
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2024.8.13" PrivateAssets="all" />

<PackageReference Include="BepInEx.AutoPlugin" Version="1.1.0" PrivateAssets="all" />
<PackageReference Include="BepInEx.IL2CPP.MSBuild" Version="2.0.1" PrivateAssets="all" ExcludeAssets="runtime" />
Expand Down
6 changes: 3 additions & 3 deletions Reactor.Benchmarks/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"net6.0": {
"AmongUs.GameLibs.Steam": {
"type": "Direct",
"requested": "[2024.6.18, )",
"resolved": "2024.6.18",
"contentHash": "xb+HP1xXn4/ES8AgXpk9xeoW568LFYw5NTjY6bHwd6vQjHDf2kT1xHMmQ1me5Vfee/Gp69YIMZDXUAUToG7Elg=="
"requested": "[2024.8.13, )",
"resolved": "2024.8.13",
"contentHash": "xYZBHQJcwSF5wABtJIZlmpNwZ7jXWafe6vid6/YEWSxpk1fcYLxz42bHSTYcGjpu4wVz1p1ZG/QC4Eu0SbGhrg=="
},
"BenchmarkDotNet": {
"type": "Direct",
Expand Down
6 changes: 3 additions & 3 deletions Reactor.Debugger/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"net6.0": {
"AmongUs.GameLibs.Steam": {
"type": "Direct",
"requested": "[2024.6.18, )",
"resolved": "2024.6.18",
"contentHash": "xb+HP1xXn4/ES8AgXpk9xeoW568LFYw5NTjY6bHwd6vQjHDf2kT1xHMmQ1me5Vfee/Gp69YIMZDXUAUToG7Elg=="
"requested": "[2024.8.13, )",
"resolved": "2024.8.13",
"contentHash": "xYZBHQJcwSF5wABtJIZlmpNwZ7jXWafe6vid6/YEWSxpk1fcYLxz42bHSTYcGjpu4wVz1p1ZG/QC4Eu0SbGhrg=="
},
"BepInEx.AutoPlugin": {
"type": "Direct",
Expand Down
6 changes: 3 additions & 3 deletions Reactor.Example/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"net6.0": {
"AmongUs.GameLibs.Steam": {
"type": "Direct",
"requested": "[2024.6.18, )",
"resolved": "2024.6.18",
"contentHash": "xb+HP1xXn4/ES8AgXpk9xeoW568LFYw5NTjY6bHwd6vQjHDf2kT1xHMmQ1me5Vfee/Gp69YIMZDXUAUToG7Elg=="
"requested": "[2024.8.13, )",
"resolved": "2024.8.13",
"contentHash": "xYZBHQJcwSF5wABtJIZlmpNwZ7jXWafe6vid6/YEWSxpk1fcYLxz42bHSTYcGjpu4wVz1p1ZG/QC4Eu0SbGhrg=="
},
"BepInEx.AutoPlugin": {
"type": "Direct",
Expand Down
9 changes: 8 additions & 1 deletion Reactor/Patches/Fixes/CursorPosPatch.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using HarmonyLib;
using TMPro;
using UnityEngine;
Expand All @@ -8,9 +10,14 @@ namespace Reactor.Patches.Fixes;
/// <summary>
/// "Fixes" an issue where empty TextBoxes have wrong cursor positions.
/// </summary>
[HarmonyPatch(typeof(TextMeshProExtensions), nameof(TextMeshProExtensions.CursorPos))]
[HarmonyPatch]
internal static class CursorPosPatch
{
public static IEnumerable<MethodBase> TargetMethods()
{
return AccessTools.GetDeclaredMethods(typeof(TextMeshProExtensions)).Where(m => m.Name == nameof(TextMeshProExtensions.CursorPos));
}

public static bool Prefix(TextMeshPro self, ref Vector2 __result)
{
if (self.textInfo == null || self.textInfo.lineCount == 0 || self.textInfo.lineInfo[0].characterCount <= 0)
Expand Down
3 changes: 0 additions & 3 deletions Reactor/Patches/Miscellaneous/FreeNamePatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,12 @@ public static void Initialize()
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) (() =>
{
DataManager.Player.Customization.Name = textBox.text;
}));
textBox.OnEnter = textBox.OnFocusLost = textBox.OnChange;
textBox.Pipe.GetComponent<TextMeshPro>().fontSize = 4f;
}));
}

Expand Down
6 changes: 3 additions & 3 deletions Reactor/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"net6.0": {
"AmongUs.GameLibs.Steam": {
"type": "Direct",
"requested": "[2024.6.18, )",
"resolved": "2024.6.18",
"contentHash": "xb+HP1xXn4/ES8AgXpk9xeoW568LFYw5NTjY6bHwd6vQjHDf2kT1xHMmQ1me5Vfee/Gp69YIMZDXUAUToG7Elg=="
"requested": "[2024.8.13, )",
"resolved": "2024.8.13",
"contentHash": "xYZBHQJcwSF5wABtJIZlmpNwZ7jXWafe6vid6/YEWSxpk1fcYLxz42bHSTYcGjpu4wVz1p1ZG/QC4Eu0SbGhrg=="
},
"BepInEx.AutoPlugin": {
"type": "Direct",
Expand Down

0 comments on commit b0dcf9d

Please sign in to comment.