Decompiled source of DadsHunting v1.0.5

DadsHunting.dll

Decompiled 2 weeks ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Splatform;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyCompany("DadsHunting")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.5.0")]
[assembly: AssemblyInformationalVersion("1.0.5+fd3d07f505c390c7d425acf12f5d9608e8531a4c")]
[assembly: AssemblyProduct("DadsHunting")]
[assembly: AssemblyTitle("DadsHunting")]
[assembly: AssemblyVersion("1.0.5.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace DadsHunting
{
	[BepInPlugin("com.dadisbored.dadshunting", "DadsHunting", "1.0.5")]
	[BepInProcess("valheim.exe")]
	public sealed class DadsHuntingPlugin : BaseUnityPlugin
	{
		public const string Guid = "com.dadisbored.dadshunting";

		public const string Name = "DadsHunting";

		public const string Version = "1.0.5";

		private const string SelectionKey = "DadsHunting.SelectedQuarry";

		private Harmony? _harmony;

		private ConfigEntry<float> _detectionRange;

		private ConfigEntry<float> _circleDiameter;

		private float _nextScan;

		private Player? _player;

		private string _selection = "";

		private ZDOID _targetId = ZDOID.None;

		private readonly Dictionary<ZDOID, Vector3> _completed = new Dictionary<ZDOID, Vector3>();

		private readonly List<ZDOID> _releaseCompleted = new List<ZDOID>();

		private readonly List<ZDO> _nearObjects = new List<ZDO>();

		private readonly List<ZDO> _farObjects = new List<ZDO>();

		private static readonly FieldInfo? PinUpdateRequired = AccessTools.Field(typeof(Minimap), "m_pinUpdateRequired");

		private PinData? _pin;

		private Minimap? _pinMap;

		private Vector3 _circleCenter;

		private float _enteredAt = -1f;

		internal static DadsHuntingPlugin? Instance { get; private set; }

		internal string Selection => _selection;

		private void Awake()
		{
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Expected O, but got Unknown
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Expected O, but got Unknown
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Expected O, but got Unknown
			Instance = this;
			_detectionRange = ((BaseUnityPlugin)this).Config.Bind<float>("Radar", "Detection Range", 50f, new ConfigDescription("Distance in meters at which selected quarry appears on the map.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 1000f), Array.Empty<object>()));
			_circleDiameter = ((BaseUnityPlugin)this).Config.Bind<float>("Radar", "Circle Diameter", 25f, new ConfigDescription("Diameter in meters of the hunting area.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(2f, 500f), Array.Empty<object>()));
			_harmony = new Harmony("com.dadisbored.dadshunting");
			_harmony.PatchAll(typeof(DadsHuntingPlugin).Assembly);
		}

		internal void Select(Quarry? quarry)
		{
			string text = quarry?.Prefab ?? "";
			if (!(_selection == text))
			{
				_selection = text;
				_completed.Clear();
				ClearTarget();
				if ((Object)(object)_player != (Object)null)
				{
					_player.m_customData["DadsHunting.SelectedQuarry"] = _selection;
				}
			}
		}

		private void Update()
		{
			Player localPlayer = Player.m_localPlayer;
			if ((Object)(object)localPlayer != (Object)(object)_player)
			{
				ClearTarget();
				_completed.Clear();
				_player = localPlayer;
				_selection = (((Object)(object)localPlayer != (Object)null && localPlayer.m_customData.TryGetValue("DadsHunting.SelectedQuarry", out var value) && QuarryCatalog.Find(value) != null) ? value : "");
			}
			if ((Object)(object)localPlayer == (Object)null || (Object)(object)Minimap.instance == (Object)null || string.IsNullOrEmpty(_selection))
			{
				ClearTarget();
			}
			else if (!(Time.time < _nextScan))
			{
				_nextScan = Time.time + 0.5f;
				Scan(localPlayer, Minimap.instance);
			}
		}

		private void Scan(Player player, Minimap map)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_02be: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_030e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0310: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_035c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0362: Unknown result type (might be due to invalid IL or missing references)
			Quarry quarry = QuarryCatalog.Find(_selection);
			if (quarry == null || !QuarryCatalog.Unlocked(quarry))
			{
				ClearTarget();
				return;
			}
			Vector3 position = ((Component)player).transform.position;
			float num = _detectionRange.Value * _detectionRange.Value;
			float num2 = _circleDiameter.Value * _circleDiameter.Value * 0.25f;
			ZDOMan instance = ZDOMan.instance;
			ZNetScene instance2 = ZNetScene.instance;
			if (instance == null || (Object)(object)instance2 == (Object)null || (Object)(object)ZoneSystem.instance == (Object)null)
			{
				ClearTarget();
				return;
			}
			_nearObjects.Clear();
			_farObjects.Clear();
			instance.FindSectorObjects(ZoneSystem.GetZone(position), SimulationDistance.OriginalDistance, _nearObjects, _farObjects);
			int stableHashCode = StringExtensionMethods.GetStableHashCode(_selection);
			_releaseCompleted.Clear();
			foreach (KeyValuePair<ZDOID, Vector3> item in _completed)
			{
				ZDO zDO = instance.GetZDO(item.Key);
				if (zDO == null || !TryGetLivePosition(zDO, instance2, stableHashCode, out var position2) || DistanceXZ(position, position2) > num2)
				{
					_releaseCompleted.Add(item.Key);
				}
			}
			foreach (ZDOID item2 in _releaseCompleted)
			{
				_completed.Remove(item2);
			}
			ZDO val = ((_targetId == ZDOID.None) ? null : instance.GetZDO(_targetId));
			Vector3 position3 = default(Vector3);
			if (val != null && (!TryGetLivePosition(val, instance2, stableHashCode, out position3) || DistanceXZ(position, position3) > num))
			{
				val = null;
			}
			if (val == null)
			{
				ClearTarget();
			}
			if (val == null)
			{
				float num3 = num;
				foreach (ZDO nearObject in _nearObjects)
				{
					if (!_completed.ContainsKey(nearObject.m_uid) && TryGetLivePosition(nearObject, instance2, stableHashCode, out var position4))
					{
						float num4 = DistanceXZ(position, position4);
						if (!(num4 > num3))
						{
							num3 = num4;
							val = nearObject;
							position3 = position4;
						}
					}
				}
				if (val != null)
				{
					_targetId = val.m_uid;
					_enteredAt = -1f;
				}
			}
			if (val != null)
			{
				_circleCenter = position3;
				if (_pin == null || (Object)(object)_pinMap != (Object)(object)map)
				{
					ClearPin();
					_pinMap = map;
					_pin = map.AddPin(_circleCenter, (PinType)13, "", false, false, 0L, default(PlatformUserID));
				}
				_pin.m_pos = _circleCenter;
				_pin.m_worldSize = _circleDiameter.Value;
				PinUpdateRequired?.SetValue(map, true);
				if (DistanceXZ(position, _circleCenter) <= num2 && _enteredAt < 0f)
				{
					_enteredAt = Time.time;
				}
				if (_enteredAt >= 0f && Time.time - _enteredAt >= 30f)
				{
					_completed[_targetId] = _circleCenter;
					ClearTarget();
				}
			}
		}

		private static float DistanceXZ(Vector3 a, Vector3 b)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			float num = a.x - b.x;
			float num2 = a.z - b.z;
			return num * num + num2 * num2;
		}

		private static bool TryGetLivePosition(ZDO zdo, ZNetScene scene, int prefabHash, out Vector3 position)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			position = default(Vector3);
			if (!zdo.IsValid() || zdo.GetPrefab() != prefabHash || zdo.GetBool(ZDOVars.s_dead, false))
			{
				return false;
			}
			ZNetView val = scene.FindInstance(zdo);
			if ((Object)(object)val == (Object)null || !val.IsValid())
			{
				return false;
			}
			Character component = ((Component)val).GetComponent<Character>();
			if ((Object)(object)component != (Object)null && component.GetHealth() <= 0f)
			{
				return false;
			}
			position = ((Component)val).transform.position;
			return true;
		}

		private void ClearTarget()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			ClearPin();
			_targetId = ZDOID.None;
			_enteredAt = -1f;
		}

		private void ClearPin()
		{
			if (_pin != null && (Object)(object)_pinMap != (Object)null)
			{
				_pinMap.RemovePin(_pin);
			}
			_pin = null;
			_pinMap = null;
		}

		private void OnDestroy()
		{
			ClearTarget();
			Harmony? harmony = _harmony;
			if (harmony != null)
			{
				harmony.UnpatchSelf();
			}
			if ((Object)(object)Instance == (Object)(object)this)
			{
				Instance = null;
			}
		}
	}
	[HarmonyPatch(typeof(InventoryGui), "Awake")]
	internal static class HuntingInventoryPatch
	{
		private static void Postfix(InventoryGui __instance)
		{
			((Component)__instance).gameObject.AddComponent<HuntingMenu>();
		}
	}
	[HarmonyPatch(typeof(InventoryGui), "Update")]
	internal static class HuntingInventoryClosePatch
	{
		private static bool Prefix(InventoryGui __instance)
		{
			HuntingMenu component = ((Component)__instance).GetComponent<HuntingMenu>();
			if ((Object)(object)component == (Object)null || !component.IsOpen)
			{
				return true;
			}
			if (!ZInput.GetButtonDown("JoyButtonB") && !ZInput.GetKeyDown((KeyCode)27, true))
			{
				return true;
			}
			component.Close();
			return false;
		}
	}
	[HarmonyPatch(typeof(Destructible), "Destroy", new Type[] { typeof(HitData) })]
	internal static class HuntingDestructiblePatch
	{
		private static void Prefix(Destructible __instance, HitData hit)
		{
			if (!((Object)(object)((hit != null) ? hit.GetAttacker() : null) != (Object)(object)Player.m_localPlayer) && !((Object)(object)Player.m_localPlayer == (Object)null))
			{
				string prefabName = Utils.GetPrefabName(((Component)__instance).gameObject);
				if (QuarryCatalog.Find(prefabName) != null)
				{
					Player.m_localPlayer.m_customData["DadsHunting.Killed." + prefabName] = "1";
				}
			}
		}
	}
	internal sealed class HuntingMenu : MonoBehaviour
	{
		private InventoryGui _gui;

		private Button _emblem;

		private GameObject _panel;

		private SkillsDialog _nativeDialog;

		private RectTransform _listRoot;

		private ScrollRect _scroll;

		private TMP_Text _nativeRowText;

		private Image? _nativeRowBackground;

		private TMP_Text? _title;

		private Sprite? _arrowSprite;

		private Texture2D? _arrowTexture;

		private float _baseListHeight;

		internal bool IsOpen
		{
			get
			{
				if ((Object)(object)_panel != (Object)null)
				{
					return _panel.activeSelf;
				}
				return false;
			}
		}

		private void Awake()
		{
			_gui = ((Component)this).GetComponent<InventoryGui>();
			if (!((Object)(object)_gui == (Object)null) && !((Object)(object)_gui.m_pvp == (Object)null) && !((Object)(object)_gui.m_skillsDialog == (Object)null))
			{
				Transform parent = ((Component)_gui.m_pvp).transform.parent;
				RectTransform val = (RectTransform)(object)((parent is RectTransform) ? parent : null);
				if (!((Object)(object)val == (Object)null))
				{
					ExpandHeader();
					CreateEmblem(val);
					CreateNativePanel();
				}
			}
		}

		private void ExpandHeader()
		{
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)_gui.m_info == (Object)null || !((Component)_gui.m_pvp).transform.IsChildOf((Transform)(object)_gui.m_info))
			{
				return;
			}
			RectTransform info = _gui.m_info;
			info.offsetMax = new Vector2(info.offsetMax.x + 20f, info.offsetMax.y);
			string[] array = new string[5] { "Texts", "Skills", "Trophies", "Achievements", "PVP" };
			float[] array2 = new float[5] { -200f, -108f, -16f, 76f, 168f };
			Transform parent = ((Component)_gui.m_pvp).transform.parent;
			for (int i = 0; i < array.Length; i++)
			{
				Transform obj = parent.Find(array[i]);
				RectTransform val = (RectTransform)(object)((obj is RectTransform) ? obj : null);
				if (!((Object)(object)val == (Object)null))
				{
					val.anchoredPosition = new Vector2(array2[i], val.anchoredPosition.y);
				}
			}
		}

		private void CreateEmblem(RectTransform host)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected O, but got Unknown
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Expected O, but got Unknown
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			RectTransform val = (RectTransform)((Component)_gui.m_pvp).transform;
			RectTransform val2 = NewRect("DadsHunting_Emblem", (Transform)(object)host);
			val2.anchorMin = val.anchorMin;
			val2.anchorMax = val.anchorMax;
			val2.pivot = val.pivot;
			val2.anchoredPosition = val.anchoredPosition + new Vector2(92f, 0f);
			val2.sizeDelta = val.sizeDelta;
			((Component)val2).gameObject.AddComponent<LayoutElement>().ignoreLayout = true;
			_emblem = ((Component)val2).gameObject.AddComponent<Button>();
			Button emblem = _emblem;
			Navigation navigation = default(Navigation);
			((Navigation)(ref navigation)).mode = (Mode)0;
			((Selectable)emblem).navigation = navigation;
			((UnityEvent)_emblem.onClick).AddListener(new UnityAction(Toggle));
			_arrowTexture = CreateArrowTexture();
			_arrowSprite = Sprite.Create(_arrowTexture, new Rect(0f, 0f, 128f, 128f), new Vector2(0.5f, 0.5f));
			RectTransform obj = NewRect("HuntingArrow", (Transform)(object)val2);
			obj.anchorMin = Vector2.zero;
			obj.anchorMax = Vector2.one;
			obj.offsetMin = new Vector2(17f, 17f);
			obj.offsetMax = new Vector2(-17f, -17f);
			Image val3 = ((Component)obj).gameObject.AddComponent<Image>();
			val3.sprite = _arrowSprite;
			((Graphic)val3).color = new Color(0.95f, 0.69f, 0.32f, 1f);
			((Graphic)val3).raycastTarget = true;
			((Selectable)_emblem).targetGraphic = (Graphic)(object)val3;
		}

		private void CreateNativePanel()
		{
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0289: Unknown result type (might be due to invalid IL or missing references)
			//IL_028e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Expected O, but got Unknown
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			SkillsDialog skillsDialog = _gui.m_skillsDialog;
			_panel = Object.Instantiate<GameObject>(((Component)skillsDialog).gameObject, ((Component)skillsDialog).transform.parent, false);
			((Object)_panel).name = "DadsHunting_QuarryDialog";
			_panel.SetActive(false);
			_nativeDialog = _panel.GetComponent<SkillsDialog>();
			((Behaviour)_nativeDialog).enabled = false;
			_listRoot = _nativeDialog.m_listRoot;
			Rect rect = _listRoot.rect;
			_baseListHeight = ((Rect)(ref rect)).height;
			_scroll = _panel.GetComponentInChildren<ScrollRect>(true);
			foreach (Transform item in (Transform)_listRoot)
			{
				((Component)item).gameObject.SetActive(false);
				Object.Destroy((Object)(object)((Component)item).gameObject);
			}
			_nativeRowText = FindRowText(skillsDialog.m_elementPrefab);
			Transform obj = skillsDialog.m_elementPrefab.transform.Find("bkg");
			_nativeRowBackground = ((obj != null) ? ((Component)obj).GetComponent<Image>() : null);
			if ((Object)(object)_nativeDialog.m_totalSkillText != (Object)null)
			{
				((Component)_nativeDialog.m_totalSkillText).gameObject.SetActive(false);
			}
			Transform obj2 = _panel.transform.Find("SkillsFrame/topic");
			_title = ((obj2 != null) ? ((Component)obj2).GetComponent<TMP_Text>() : null);
			if ((Object)(object)_title == (Object)null)
			{
				float num = float.NegativeInfinity;
				TMP_Text[] componentsInChildren = _panel.GetComponentsInChildren<TMP_Text>(true);
				foreach (TMP_Text val2 in componentsInChildren)
				{
					if (!val2.transform.IsChildOf((Transform)(object)_listRoot) && !((Object)(object)val2 == (Object)(object)_nativeDialog.m_totalSkillText) && !((Object)(object)((Component)val2).GetComponentInParent<Button>() != (Object)null) && !(val2.transform.position.y <= num))
					{
						num = val2.transform.position.y;
						_title = val2;
					}
				}
			}
			if ((Object)(object)_title != (Object)null)
			{
				_title.text = "Select your Quarry";
				_title.enableAutoSizing = true;
				_title.fontSizeMin = 15f;
			}
			Button[] componentsInChildren2 = _panel.GetComponentsInChildren<Button>(true);
			foreach (Button val3 in componentsInChildren2)
			{
				if (((Component)val3).transform.IsChildOf((Transform)(object)_listRoot))
				{
					continue;
				}
				rect = ((Component)val3).GetComponent<RectTransform>().rect;
				if (!(((Rect)(ref rect)).width < 100f))
				{
					TMP_Text componentInChildren = ((Component)val3).GetComponentInChildren<TMP_Text>(true);
					if (((Object)val3).name.IndexOf("close", StringComparison.OrdinalIgnoreCase) >= 0 || (!((Object)(object)componentInChildren == (Object)null) && componentInChildren.text.IndexOf("close", StringComparison.OrdinalIgnoreCase) >= 0))
					{
						((UnityEvent)val3.onClick).AddListener(new UnityAction(Close));
						break;
					}
				}
			}
		}

		private static TMP_Text FindRowText(GameObject element)
		{
			TMP_Text[] componentsInChildren = element.GetComponentsInChildren<TMP_Text>(true);
			foreach (TMP_Text val in componentsInChildren)
			{
				if (((Object)val).name.Equals("name", StringComparison.OrdinalIgnoreCase))
				{
					return val;
				}
			}
			return element.GetComponentInChildren<TMP_Text>(true);
		}

		private void Toggle()
		{
			if (IsOpen)
			{
				Close();
			}
			else if (!((Object)(object)_panel == (Object)null))
			{
				((Component)_gui.m_skillsDialog).gameObject.SetActive(false);
				_gui.m_trophiesPanel.SetActive(false);
				((Component)_gui.m_achievementsPanel).gameObject.SetActive(false);
				((Component)_gui.m_textsDialog).gameObject.SetActive(false);
				_panel.transform.SetAsLastSibling();
				_panel.SetActive(true);
				if ((Object)(object)_title != (Object)null)
				{
					_title.text = "Select your Quarry";
				}
				Refresh();
			}
		}

		internal void Close()
		{
			if ((Object)(object)_panel != (Object)null)
			{
				_panel.SetActive(false);
			}
		}

		private void Refresh()
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			foreach (Transform item in (Transform)_listRoot)
			{
				((Component)item).gameObject.SetActive(false);
				Object.Destroy((Object)(object)((Component)item).gameObject);
			}
			DadsHuntingPlugin instance = DadsHuntingPlugin.Instance;
			if ((Object)(object)instance == (Object)null)
			{
				return;
			}
			Dictionary<string, List<Quarry>> dictionary = new Dictionary<string, List<Quarry>>();
			List<string> list = new List<string>();
			Quarry[] all = QuarryCatalog.All;
			foreach (Quarry quarry in all)
			{
				if (QuarryCatalog.Unlocked(quarry))
				{
					if (!dictionary.TryGetValue(quarry.Biome, out var value))
					{
						value = new List<Quarry>();
						dictionary.Add(quarry.Biome, value);
						list.Add(quarry.Biome);
					}
					value.Add(quarry);
				}
			}
			float num = 0f;
			if (list.Count == 0)
			{
				AddHeading("No quarry recorded yet", num);
				num += 48f;
			}
			else
			{
				AddChoice("Clear selection", num, string.IsNullOrEmpty(instance.Selection), null);
				num += 52f;
				foreach (string item2 in list)
				{
					AddHeading(item2, num);
					num += 36f;
					foreach (Quarry item3 in dictionary[item2])
					{
						AddChoice(item3.Name, num, instance.Selection == item3.Prefab, item3);
						num += 48f;
					}
					num += 8f;
				}
			}
			_listRoot.SetSizeWithCurrentAnchors((Axis)1, Mathf.Max(_baseListHeight, num));
			_scroll.verticalNormalizedPosition = 1f;
		}

		private void AddHeading(string label, float top)
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			RectTransform parent = NewRow("Biome_" + label, top, 32f);
			TMP_Text obj = NewNativeText(parent, label);
			obj.fontSize = 22f;
			((Graphic)obj).color = new Color(1f, 0.72f, 0.36f, 1f);
		}

		private void AddChoice(string label, float top, bool selected, Quarry? quarry)
		{
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Expected O, but got Unknown
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			RectTransform val = NewRow("Quarry_" + label, top, 44f);
			Image val2 = ((Component)val).gameObject.AddComponent<Image>();
			if ((Object)(object)_nativeRowBackground != (Object)null)
			{
				val2.sprite = _nativeRowBackground.sprite;
				val2.type = _nativeRowBackground.type;
			}
			((Graphic)val2).color = (Color)(selected ? new Color(0.8f, 0.42f, 0.08f, 0.85f) : (((Object)(object)_nativeRowBackground != (Object)null) ? ((Graphic)_nativeRowBackground).color : new Color(0f, 0f, 0f, 0.4f)));
			Button obj = ((Component)val).gameObject.AddComponent<Button>();
			((Selectable)obj).targetGraphic = (Graphic)(object)val2;
			((UnityEvent)obj.onClick).AddListener((UnityAction)delegate
			{
				DadsHuntingPlugin.Instance?.Select(quarry);
				Refresh();
			});
			AddCheckBox(val, selected);
			if (quarry != null)
			{
				AddQuarryIcon(val, quarry);
			}
			TMP_Text obj2 = NewNativeText(val, label);
			obj2.fontSize = 22f;
			((Graphic)obj2).color = (selected ? Color.black : Color.white);
			((Graphic)obj2).raycastTarget = false;
			obj2.rectTransform.offsetMin = new Vector2((quarry == null) ? 55f : 101f, 0f);
		}

		private void AddCheckBox(RectTransform row, bool selected)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			RectTransform val = NewRect("SelectionBox", (Transform)(object)row);
			val.anchorMin = new Vector2(0f, 0.5f);
			val.anchorMax = new Vector2(0f, 0.5f);
			val.pivot = new Vector2(0.5f, 0.5f);
			val.anchoredPosition = new Vector2(27f, 0f);
			val.sizeDelta = new Vector2(30f, 30f);
			Image obj = ((Component)val).gameObject.AddComponent<Image>();
			Image? nativeRowBackground = _nativeRowBackground;
			obj.sprite = ((nativeRowBackground != null) ? nativeRowBackground.sprite : null);
			Image? nativeRowBackground2 = _nativeRowBackground;
			obj.type = (Type)((nativeRowBackground2 != null) ? ((int)nativeRowBackground2.type) : 0);
			((Graphic)obj).color = new Color(0.1f, 0.1f, 0.1f, 0.75f);
			((Graphic)obj).raycastTarget = false;
			Minimap instance = Minimap.instance;
			object obj2;
			if (instance == null)
			{
				obj2 = null;
			}
			else
			{
				GameObject pinPrefab = instance.m_pinPrefab;
				obj2 = ((pinPrefab != null) ? pinPrefab.transform.Find("Checked") : null);
			}
			Transform val2 = (Transform)obj2;
			if (!((Object)(object)val2 == (Object)null))
			{
				GameObject val3 = Object.Instantiate<GameObject>(((Component)val2).gameObject, (Transform)(object)val, false);
				((Object)val3).name = "MapCheckedMark";
				Transform transform = val3.transform;
				RectTransform val4 = (RectTransform)(object)((transform is RectTransform) ? transform : null);
				if ((Object)(object)val4 != (Object)null)
				{
					val4.anchorMin = new Vector2(0.5f, 0.5f);
					val4.anchorMax = new Vector2(0.5f, 0.5f);
					val4.pivot = new Vector2(0.5f, 0.5f);
					val4.anchoredPosition = Vector2.zero;
					val4.sizeDelta = new Vector2(28f, 28f);
				}
				Graphic[] componentsInChildren = val3.GetComponentsInChildren<Graphic>(true);
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					componentsInChildren[i].raycastTarget = false;
				}
				val3.SetActive(selected);
			}
		}

		private static void AddQuarryIcon(RectTransform row, Quarry quarry)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			Sprite val = QuarryIcon(quarry);
			if (!((Object)(object)val == (Object)null))
			{
				RectTransform obj = NewRect("QuarryIcon", (Transform)(object)row);
				obj.anchorMin = new Vector2(0f, 0.5f);
				obj.anchorMax = new Vector2(0f, 0.5f);
				obj.pivot = new Vector2(0.5f, 0.5f);
				obj.anchoredPosition = new Vector2(71f, 0f);
				obj.sizeDelta = new Vector2(36f, 36f);
				Image obj2 = ((Component)obj).gameObject.AddComponent<Image>();
				obj2.sprite = val;
				obj2.preserveAspect = true;
				((Graphic)obj2).raycastTarget = false;
			}
		}

		private static Sprite? QuarryIcon(Quarry quarry)
		{
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Invalid comparison between Unknown and I4
			ObjectDB instance = ObjectDB.instance;
			if ((Object)(object)instance == (Object)null)
			{
				return null;
			}
			bool flag;
			switch (quarry.Prefab)
			{
			case "Crow":
			case "Seagal":
			case "AshCrow":
			case "Volture":
				flag = true;
				break;
			default:
				flag = false;
				break;
			}
			if (flag)
			{
				return ItemIcon(instance.GetItemPrefab("Feathers"));
			}
			ZNetScene instance2 = ZNetScene.instance;
			GameObject obj = ((instance2 != null) ? instance2.GetPrefab(quarry.Prefab) : null);
			CharacterDrop val = ((obj != null) ? obj.GetComponent<CharacterDrop>() : null);
			if ((Object)(object)val != (Object)null)
			{
				foreach (Drop drop in val.m_drops)
				{
					GameObject prefab = drop.m_prefab;
					ItemDrop val2 = ((prefab != null) ? prefab.GetComponent<ItemDrop>() : null);
					if (val2 != null && (int)(val2.m_itemData?.m_shared?.m_itemType).GetValueOrDefault() == 13)
					{
						Sprite icon = val2.m_itemData.GetIcon();
						if ((Object)(object)icon != (Object)null)
						{
							return icon;
						}
					}
				}
			}
			string prefab2 = quarry.Prefab;
			string text = ((prefab2 == "Moose_calf") ? "TrophyMoose" : ((!(prefab2 == "Seal_Pup")) ? ("Trophy" + quarry.Prefab) : "TrophySeal"));
			string text2 = text;
			Sprite val3 = ItemIcon(instance.GetItemPrefab(text2));
			if ((Object)(object)val3 != (Object)null)
			{
				return val3;
			}
			if ((Object)(object)val != (Object)null)
			{
				foreach (Drop drop2 in val.m_drops)
				{
					Sprite val4 = ItemIcon(drop2.m_prefab);
					if ((Object)(object)val4 != (Object)null)
					{
						return val4;
					}
				}
			}
			return null;
		}

		private static Sprite? ItemIcon(GameObject? prefab)
		{
			if (prefab == null)
			{
				return null;
			}
			ItemDrop component = prefab.GetComponent<ItemDrop>();
			if (component == null)
			{
				return null;
			}
			return component.m_itemData.GetIcon();
		}

		private RectTransform NewRow(string name, float top, float height)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			RectTransform obj = NewRect(name, (Transform)(object)_listRoot);
			obj.anchorMin = new Vector2(0f, 1f);
			obj.anchorMax = new Vector2(1f, 1f);
			obj.pivot = new Vector2(0.5f, 1f);
			obj.anchoredPosition = new Vector2(0f, 0f - top);
			obj.sizeDelta = new Vector2(-14f, height);
			return obj;
		}

		private TMP_Text NewNativeText(RectTransform parent, string value)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			TMP_Text obj = Object.Instantiate<TMP_Text>(_nativeRowText, (Transform)(object)parent, false);
			((Component)obj).gameObject.SetActive(true);
			obj.text = value;
			obj.enableAutoSizing = false;
			obj.textWrappingMode = (TextWrappingModes)0;
			obj.overflowMode = (TextOverflowModes)1;
			RectTransform rectTransform = obj.rectTransform;
			rectTransform.anchorMin = Vector2.zero;
			rectTransform.anchorMax = Vector2.one;
			rectTransform.offsetMin = new Vector2(18f, 0f);
			rectTransform.offsetMax = new Vector2(-18f, 0f);
			obj.alignment = (TextAlignmentOptions)4097;
			return obj;
		}

		private static RectTransform NewRect(string name, Transform parent)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Expected O, but got Unknown
			RectTransform val = (RectTransform)new GameObject(name, new Type[1] { typeof(RectTransform) }).transform;
			((Transform)val).SetParent(parent, false);
			return val;
		}

		private static bool InsideTriangle(Vector2 p, Vector2 a, Vector2 b, Vector2 c)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			float num = (p.x - b.x) * (a.y - b.y) - (a.x - b.x) * (p.y - b.y);
			float num2 = (p.x - c.x) * (b.y - c.y) - (b.x - c.x) * (p.y - c.y);
			float num3 = (p.x - a.x) * (c.y - a.y) - (c.x - a.x) * (p.y - a.y);
			if (!(num >= 0f) || !(num2 >= 0f) || !(num3 >= 0f))
			{
				if (num <= 0f && num2 <= 0f)
				{
					return num3 <= 0f;
				}
				return false;
			}
			return true;
		}

		private static Texture2D CreateArrowTexture()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			Texture2D val = new Texture2D(128, 128, (TextureFormat)5, false);
			((Texture)val).filterMode = (FilterMode)1;
			Vector2 val2 = default(Vector2);
			((Vector2)(ref val2))..ctor(19f, 19f);
			Vector2 val3 = new Vector2(88f, 88f) - val2;
			Vector2 val4 = default(Vector2);
			for (int i = 0; i < 128; i++)
			{
				for (int j = 0; j < 128; j++)
				{
					((Vector2)(ref val4))..ctor((float)j + 0.5f, (float)i + 0.5f);
					float num = Mathf.Clamp01(Vector2.Dot(val4 - val2, val3) / ((Vector2)(ref val3)).sqrMagnitude);
					bool flag = Vector2.Distance(val4, val2 + val3 * num) <= 6f || InsideTriangle(val4, new Vector2(69f, 105f), new Vector2(109f, 109f), new Vector2(105f, 69f)) || InsideTriangle(val4, new Vector2(17f, 17f), new Vector2(12f, 47f), new Vector2(39f, 25f)) || InsideTriangle(val4, new Vector2(17f, 17f), new Vector2(47f, 12f), new Vector2(25f, 39f));
					val.SetPixel(j, i, flag ? Color.white : Color.clear);
				}
			}
			val.Apply();
			return val;
		}

		private void Update()
		{
			if (IsOpen && !InventoryGui.IsVisible())
			{
				Close();
			}
		}

		private void OnDestroy()
		{
			if ((Object)(object)_arrowSprite != (Object)null)
			{
				Object.Destroy((Object)(object)_arrowSprite);
			}
			if ((Object)(object)_arrowTexture != (Object)null)
			{
				Object.Destroy((Object)(object)_arrowTexture);
			}
		}
	}
	internal sealed class Quarry
	{
		internal readonly string Name;

		internal readonly string Prefab;

		internal readonly string Biome;

		internal Quarry(string name, string prefab, string biome)
		{
			Name = name;
			Prefab = prefab;
			Biome = biome;
		}
	}
	internal static class QuarryCatalog
	{
		internal static readonly Quarry[] All = new Quarry[19]
		{
			new Quarry("Boar", "Boar", "Meadows"),
			new Quarry("Deer", "Deer", "Meadows / Black Forest"),
			new Quarry("Bear", "Bjorn", "Black Forest"),
			new Quarry("Wolf", "Wolf", "Mountains"),
			new Quarry("Lox", "Lox", "Plains"),
			new Quarry("Hare", "Hare", "Mistlands"),
			new Quarry("Asksvin", "Asksvin", "Ashlands"),
			new Quarry("Moose", "Moose", "Deep North"),
			new Quarry("Moose Calf", "Moose_calf", "Deep North"),
			new Quarry("Seal", "Seal", "Deep North"),
			new Quarry("Baby Seal", "Seal_Pup", "Deep North"),
			new Quarry("Crow", "Crow", "Various"),
			new Quarry("Gull / Seagull", "Seagal", "Coastal areas"),
			new Quarry("Ash Crow", "AshCrow", "Ashlands"),
			new Quarry("Neck", "Neck", "Meadows"),
			new Quarry("Drake", "Hatchling", "Mountains"),
			new Quarry("Volture", "Volture", "Ashlands"),
			new Quarry("Bonemaw Serpent", "BonemawSerpent", "Ashlands"),
			new Quarry("Sea Serpent", "Serpent", "Ocean")
		};

		internal static Quarry? Find(string prefab)
		{
			Quarry[] all = All;
			foreach (Quarry quarry in all)
			{
				if (string.Equals(quarry.Prefab, prefab, StringComparison.Ordinal))
				{
					return quarry;
				}
			}
			return null;
		}

		internal static bool Unlocked(Quarry quarry)
		{
			if ((Object)(object)Game.instance == (Object)null || (Object)(object)ZNetScene.instance == (Object)null)
			{
				return false;
			}
			PlayerProfile playerProfile = Game.instance.GetPlayerProfile();
			GameObject prefab = ZNetScene.instance.GetPrefab(quarry.Prefab);
			if (playerProfile == null || (Object)(object)prefab == (Object)null || playerProfile.m_playerStats.Length == 0)
			{
				return false;
			}
			Character component = prefab.GetComponent<Character>();
			if ((Object)(object)component != (Object)null && playerProfile.m_playerStats[0].m_enemyStats[0].TryGetValue(component.m_name, out var value) && value > 0f)
			{
				return true;
			}
			if ((Object)(object)Player.m_localPlayer != (Object)null)
			{
				return Player.m_localPlayer.m_customData.ContainsKey("DadsHunting.Killed." + quarry.Prefab);
			}
			return false;
		}
	}
}