mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
Solution Cleanup + TChinese template file by 柚子
This commit is contained in:
1 parent
fd5240c0ee
commit
07a21e9935
468 files changed
+68826
-51464
No files matched your search
@@ -2,18 +2,23 @@ using System.Text.RegularExpressions;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EHR;
|
||||
|
||||
[HarmonyPatch(typeof(JoinGameButton), nameof(JoinGameButton.OnClick))]
|
||||
class JoinGameButtonPatch
|
||||
namespace EHR
|
||||
{
|
||||
public static void Prefix(JoinGameButton __instance)
|
||||
[HarmonyPatch(typeof(JoinGameButton), nameof(JoinGameButton.OnClick))]
|
||||
internal class JoinGameButtonPatch
|
||||
{
|
||||
if (__instance.GameIdText == null) return;
|
||||
if (__instance.GameIdText.text == "" && Regex.IsMatch(GUIUtility.systemCopyBuffer.Trim('\r', '\n'), @"^[A-Z]{6}$"))
|
||||
public static void Prefix(JoinGameButton __instance)
|
||||
{
|
||||
Logger.Info($"{GUIUtility.systemCopyBuffer}", "ClipBoard");
|
||||
__instance.GameIdText.SetText(GUIUtility.systemCopyBuffer.Trim('\r', '\n'));
|
||||
if (__instance.GameIdText == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (__instance.GameIdText.text == "" && Regex.IsMatch(GUIUtility.systemCopyBuffer.Trim('\r', '\n'), @"^[A-Z]{6}$"))
|
||||
{
|
||||
Logger.Info($"{GUIUtility.systemCopyBuffer}", "ClipBoard");
|
||||
__instance.GameIdText.SetText(GUIUtility.systemCopyBuffer.Trim('\r', '\n'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user