Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard/GatheringIDInput.cs
gamer147 0455ff649e feat(battle-engine): EffectType full enum + collection/card/vfx extension copies
Replaces partial EffectMgr.EffectType with all 226 decomp values; copies the
IsNotNullOrEmpty/EquelsID/FindFromCardId/GetAllFuncVfxResults extension files +
UI extensions; adds Renderer/MeshFilter shared-material/mesh/sortingOrder. Compile
loop then closed the revealed deps (3242 files). 9.1k -> 18 errors.
2026-06-05 20:38:56 -04:00

72 lines
1.7 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Text.RegularExpressions;
using Cute;
using UnityEngine;
namespace Wizard;
public class GatheringIDInput : MonoBehaviour
{
[SerializeField]
private UIButton _searchButton;
[SerializeField]
private UIButton _pasteButton;
[SerializeField]
private UIInputWizard _idInput;
public Action<GatheringGetInfoTask> OnGetInfo { get; set; }
private void Start()
{
_searchButton.onClick.Add(new EventDelegate(delegate
{
OnClickSearchButton();
}));
_idInput.onChange.Add(new EventDelegate(delegate
{
OnChangeInputId();
}));
_pasteButton.onClick.Add(new EventDelegate(delegate
{
Paste();
}));
UIManager.SetObjectToGrey(_searchButton.gameObject, b: true);
}
private void OnChangeInputId()
{
UIManager.SetObjectToGrey(_searchButton.gameObject, !UIUtil.IsValidIdDigits(_idInput.value, 6));
}
private void OnClickSearchButton()
{
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE);
GatheringGetInfoTask task = new GatheringGetInfoTask();
task.SetParameter(_idInput.value);
StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate
{
OnSuccessGetGatheringInfo(task);
}));
}
private void OnSuccessGetGatheringInfo(GatheringGetInfoTask task)
{
OnGetInfo(task);
}
private void Paste()
{
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE);
string clipboard = ClipboardHelper.Clipboard;
clipboard = Regex.Replace(clipboard, "[-]", (Match match) => ((char)(match.Value[0] - 65296 + 48)).ToString());
clipboard = Regex.Replace(clipboard, "\\s", "");
if (UIUtil.IsValidIdDigits(clipboard, 6))
{
_idInput.value = clipboard;
OnChangeInputId();
}
}
}