mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
Add files via upload
This commit is contained in:
1 parent
a99a551a24
commit
e329f5e6e0
45 files changed
+12128
No files matched your search
@@ -0,0 +1,19 @@
|
||||
using HarmonyLib;
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEngine;
|
||||
|
||||
namespace TOHE;
|
||||
|
||||
[HarmonyPatch(typeof(JoinGameButton), nameof(JoinGameButton.OnClick))]
|
||||
class JoinGameButtonPatch
|
||||
{
|
||||
public static void Prefix(JoinGameButton __instance)
|
||||
{
|
||||
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