Decompiled source of AutoPickupRules v1.1.0

AutoPickupRules.dll

Decompiled 13 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Text;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using TMPro;
using UnityEngine;
using UnityEngine.Rendering;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("AutoPickupRules")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("AutoPickupRules")]
[assembly: AssemblyTitle("AutoPickupRules")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[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 PickupRules
{
	public class Menu : MonoBehaviour
	{
		private class Entree
		{
			public string Prefab;

			public string Nom;

			public string NomSimple;

			public string Detail;

			public Sprite Icone;

			public bool RamasseNormalement;
		}

		private class Section
		{
			public string Titre;

			public readonly List<Entree> Entrees = new List<Entree>();
		}

		private static int fermeA = -10;

		private static Menu instance;

		private readonly List<Section> sections = new List<Section>();

		private List<Entree> catalogue;

		private string langueCatalogue;

		private Dictionary<string, Regle> regles = new Dictionary<string, Regle>();

		private float rayon;

		private string recherche = "";

		private Vector2 defilement;

		private float prochaineListe;

		private string stylesLangue;

		private GUIStyle cadre;

		private GUIStyle titre;

		private GUIStyle texte;

		private GUIStyle petit;

		private GUIStyle entete;

		private GUIStyle bouton;

		private GUIStyle boutonActif;

		private GUIStyle champ;

		private GUIStyle ligne;

		private const float BarreDefilement = 26f;

		private static readonly (Regle choix, string cle, float minimum)[] Choix = new(Regle, string, float)[3]
		{
			(Regle.Normal, "etat_normal", 104f),
			(Regle.Toujours, "etat_toujours", 124f),
			(Regle.Jamais, "etat_jamais", 158f)
		};

		private static readonly Dictionary<string, string> PolicesParLangue = new Dictionary<string, string>
		{
			["Chinese"] = "NotoSansSC-Regular",
			["Chinese_Trad"] = "NotoSansSC-Regular",
			["Japanese"] = "NotoSansJP-Regular",
			["Korean"] = "NotoSansKR-Regular",
			["Hindi"] = "NotoSansDevanagari-Regular",
			["Thai"] = "NotoSansThai-Regular",
			["Georgian"] = "NotoSansGeorgian-Regular",
			["Greek"] = "NotoSans-Regular",
			["Macedonian"] = "NotoSans-Regular",
			["Polish"] = "NotoSans-Regular",
			["Czech"] = "NotoSans-Regular",
			["Slovak"] = "NotoSans-Regular",
			["Turkish"] = "NotoSans-Regular",
			["Romanian"] = "NotoSans-Regular",
			["Lithuanian"] = "NotoSans-Regular",
			["Latvian"] = "NotoSans-Regular",
			["Hungarian"] = "NotoSans-Regular",
			["Croatian"] = "NotoSans-Regular",
			["Serbian"] = "NotoSans-Regular"
		};

		public static Tableau Cible { get; private set; }

		public static bool Bloque
		{
			get
			{
				if (!((Object)(object)Cible != (Object)null))
				{
					return Time.frameCount <= fermeA + 1;
				}
				return true;
			}
		}

		private void Awake()
		{
			instance = this;
		}

		public static void Ouvrir(Tableau t)
		{
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)instance == (Object)null) && !((Object)(object)t == (Object)null))
			{
				Cible = t;
				instance.regles = new Dictionary<string, Regle>(t.Regles);
				instance.rayon = t.Rayon;
				instance.recherche = "";
				instance.defilement = Vector2.zero;
				instance.prochaineListe = 0f;
			}
		}

		public static void Fermer()
		{
			Cible = null;
			fermeA = Time.frameCount;
		}

		private void Update()
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)Cible == (Object)null))
			{
				Player localPlayer = Player.m_localPlayer;
				if ((Object)(object)localPlayer == (Object)null || ((Character)localPlayer).IsDead() || !Cible.Valide || Vector3.Distance(((Component)localPlayer).transform.position, ((Component)Cible).transform.position) > 8f)
				{
					Fermer();
				}
				else if (Time.unscaledTime >= prochaineListe)
				{
					Construire(localPlayer);
					prochaineListe = Time.unscaledTime + 0.5f;
				}
			}
		}

		private Entree Decrire(string prefab)
		{
			GameObject val = (((Object)(object)ObjectDB.instance != (Object)null) ? ObjectDB.instance.GetItemPrefab(prefab) : null);
			ItemDrop val2 = (((Object)(object)val != (Object)null) ? val.GetComponent<ItemDrop>() : null);
			if ((Object)(object)val2 == (Object)null)
			{
				return null;
			}
			string text = Localization.instance.Localize(val2.m_itemData.m_shared.m_name);
			return new Entree
			{
				Prefab = prefab,
				Nom = text,
				NomSimple = Simplifier(text + " " + prefab),
				Icone = ((val2.m_itemData.m_shared.m_icons != null && val2.m_itemData.m_shared.m_icons.Length != 0) ? val2.m_itemData.m_shared.m_icons[0] : null),
				RamasseNormalement = val2.m_autoPickup
			};
		}

		private void Construire(Player p)
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			sections.Clear();
			HashSet<string> deja = new HashSet<string>();
			Dictionary<string, int> auSol = new Dictionary<string, int>();
			Collider[] array = Physics.OverlapSphere(((Component)Cible).transform.position, rayon, LayerMask.GetMask(new string[1] { "item" }));
			foreach (Collider val in array)
			{
				ItemDrop val2 = (((Object)(object)val.attachedRigidbody != (Object)null) ? ((Component)val.attachedRigidbody).GetComponent<ItemDrop>() : null);
				if (!((Object)(object)val2 == (Object)null) && !(Utils.DistanceXZ(((Component)val2).transform.position, ((Component)Cible).transform.position) > rayon))
				{
					string key = Regles.NomObjet(val2);
					auSol.TryGetValue(key, out var value);
					auSol[key] = value + Math.Max(1, val2.m_itemData.m_stack);
				}
			}
			Ajouter(Textes.T("menu_regles"), regles.Keys.OrderBy(Tableau.NomAffiche));
			Ajouter(Textes.T("menu_sol"), from kv in auSol
				orderby kv.Value descending
				select kv.Key);
			Ajouter(Textes.T("menu_inventaire"), (from o in ((Humanoid)p).GetInventory().GetAllItems()
				where (Object)(object)o.m_dropPrefab != (Object)null
				select ((Object)o.m_dropPrefab).name).Distinct().OrderBy(Tableau.NomAffiche));
			string cherche = Simplifier(recherche.Trim());
			if (cherche.Length >= 2)
			{
				if (catalogue == null || langueCatalogue != Localization.instance.GetSelectedLanguage())
				{
					Cataloguer();
				}
				Ajouter(Textes.T("menu_resultats"), from e in catalogue.Where((Entree e) => e.NomSimple.Contains(cherche)).Take(40)
					select e.Prefab);
			}
			void Ajouter(string titre, IEnumerable<string> prefabs)
			{
				Section section = new Section
				{
					Titre = titre
				};
				foreach (string prefab in prefabs)
				{
					if (deja.Add(prefab))
					{
						Entree entree = Decrire(prefab);
						if (entree != null)
						{
							entree.Detail = Detail(entree);
							section.Entrees.Add(entree);
						}
					}
				}
				if (section.Entrees.Count > 0)
				{
					sections.Add(section);
				}
			}
			string Detail(Entree e)
			{
				string text = Textes.T(e.RamasseNormalement ? "normal_oui" : "normal_non");
				if (auSol.TryGetValue(e.Prefab, out var value2))
				{
					text = Textes.T("au_sol", value2) + " · " + text;
				}
				return text;
			}
		}

		private void Cataloguer()
		{
			langueCatalogue = Localization.instance.GetSelectedLanguage();
			catalogue = (from g in ObjectDB.instance.m_items
				where (Object)(object)g != (Object)null && (Object)(object)g.GetComponent<ItemDrop>() != (Object)null
				select Decrire(((Object)g).name) into e
				where e != null && (Object)(object)e.Icone != (Object)null && !e.Nom.StartsWith("$") && !e.Prefab.ToLowerInvariant().Contains("attack")
				group e by e.Prefab into g
				select g.First() into e
				orderby e.Nom
				select e).ToList();
		}

		private static string Simplifier(string s)
		{
			StringBuilder stringBuilder = new StringBuilder();
			string text = (s ?? "").ToLowerInvariant().Normalize(NormalizationForm.FormD);
			foreach (char c in text)
			{
				if (CharUnicodeInfo.GetUnicodeCategory(c) != UnicodeCategory.NonSpacingMark)
				{
					stringBuilder.Append(c);
				}
			}
			return stringBuilder.ToString();
		}

		private void Choisir(string prefab, Regle r)
		{
			if (r == Regle.Normal)
			{
				regles.Remove(prefab);
			}
			else
			{
				regles[prefab] = r;
			}
			Cible.Enregistrer(regles, rayon);
			prochaineListe = 0f;
		}

		private void ChangerRayon(float delta)
		{
			rayon = Mathf.Clamp(Mathf.Round((rayon + delta) / 5f) * 5f, 5f, Plugin.RayonMax.Value);
			Cible.Enregistrer(regles, rayon);
			prochaineListe = 0f;
		}

		private void OnGUI()
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Invalid comparison between Unknown and I4
			//IL_0050: 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_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: 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_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: 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_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Invalid comparison between Unknown and I4
			//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0314: Unknown result type (might be due to invalid IL or missing references)
			//IL_0319: Unknown result type (might be due to invalid IL or missing references)
			//IL_0494: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)Cible == (Object)null)
			{
				return;
			}
			Event current = Event.current;
			if ((int)current.type == 4 && (int)current.keyCode == 27)
			{
				Fermer();
				current.Use();
				return;
			}
			Styles();
			float num = Mathf.Max(0.6f, (float)Screen.height / 1080f);
			Matrix4x4 matrix = GUI.matrix;
			GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, new Vector3(num, num, 1f));
			float num2 = Mathf.Min(900f, (float)Screen.width / num - 40f);
			float num3 = Mathf.Min(900f, (float)Screen.height / num - 60f);
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(((float)Screen.width / num - num2) / 2f, ((float)Screen.height / num - num3) / 2f, num2, num3);
			GUI.Box(val, GUIContent.none, cadre);
			GUILayout.BeginArea(new Rect(((Rect)(ref val)).x + 28f, ((Rect)(ref val)).y + 20f, num2 - 56f, num3 - 48f));
			GUILayout.Label(Textes.T("menu_titre"), titre, Array.Empty<GUILayoutOption>());
			GUILayout.Label(Textes.T("menu_aide"), petit, Array.Empty<GUILayoutOption>());
			GUILayout.Space(8f);
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUILayout.Label(Textes.T("menu_zone", Mathf.RoundToInt(rayon)), texte, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(40f) });
			GUILayout.FlexibleSpace();
			if (GUILayout.Button("−", bouton, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Width(48f),
				GUILayout.Height(38f)
			}))
			{
				ChangerRayon(-5f);
			}
			if (GUILayout.Button("+", bouton, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Width(48f),
				GUILayout.Height(38f)
			}))
			{
				ChangerRayon(5f);
			}
			GUILayout.EndHorizontal();
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			string text = Textes.T("menu_recherche");
			GUILayout.Label(text, texte, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Width(Largeur(texte, text, 200f)),
				GUILayout.Height(40f)
			});
			string text2 = GUILayout.TextField(recherche, 40, champ, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(38f) });
			if (text2 != recherche)
			{
				recherche = text2;
				prochaineListe = 0f;
			}
			GUILayout.EndHorizontal();
			GUILayout.Space(6f);
			float num4 = num2 - 56f - 26f;
			defilement = GUILayout.BeginScrollView(defilement, false, true, GUIStyle.none, GUI.skin.verticalScrollbar, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandHeight(true) });
			GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(num4) });
			if (sections.Count == 0)
			{
				GUILayout.Label(Textes.T("menu_vide"), petit, Array.Empty<GUILayoutOption>());
			}
			foreach (Section section in sections)
			{
				GUILayout.Label(section.Titre, entete, Array.Empty<GUILayoutOption>());
				foreach (Entree entree in section.Entrees)
				{
					Ligne(entree, num4);
				}
				GUILayout.Space(6f);
			}
			GUILayout.EndVertical();
			GUILayout.EndScrollView();
			GUILayout.Space(6f);
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUILayout.Label(Textes.T("menu_echap"), petit, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(40f) });
			GUILayout.FlexibleSpace();
			string text3 = Textes.T("menu_fermer");
			if (GUILayout.Button(text3, bouton, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Width(Largeur(bouton, text3, 170f)),
				GUILayout.Height(40f)
			}))
			{
				Fermer();
			}
			GUILayout.EndHorizontal();
			GUILayout.EndArea();
			GUI.matrix = matrix;
		}

		private void Ligne(Entree e, float largeurLigne)
		{
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			float num = 0f;
			(Regle, string, float)[] choix = Choix;
			for (int i = 0; i < choix.Length; i++)
			{
				(Regle, string, float) tuple = choix[i];
				string item = tuple.Item2;
				float item2 = tuple.Item3;
				num += Largeur(bouton, Textes.T(item), item2) + (float)bouton.margin.horizontal;
			}
			float num2 = Mathf.Max(80f, largeurLigne - (float)ligne.padding.horizontal - 46f - 10f - num - 8f);
			GUILayout.BeginHorizontal(ligne, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Width(largeurLigne),
				GUILayout.Height(56f)
			});
			DessinerIcone(GUILayoutUtility.GetRect(46f, 46f, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Width(46f),
				GUILayout.Height(46f)
			}), e.Icone);
			GUILayout.Space(10f);
			GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(num2) });
			GUILayout.Label(e.Nom, texte, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(num2) });
			GUILayout.Label(e.Detail, petit, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(num2) });
			GUILayout.EndVertical();
			GUILayout.FlexibleSpace();
			Regle value;
			Regle regle = (regles.TryGetValue(e.Prefab, out value) ? value : Regle.Normal);
			choix = Choix;
			for (int i = 0; i < choix.Length; i++)
			{
				var (regle2, cle, minimum) = choix[i];
				if (GUILayout.Button(Textes.T(cle), (regle2 == regle) ? boutonActif : bouton, (GUILayoutOption[])(object)new GUILayoutOption[2]
				{
					GUILayout.Width(Largeur(bouton, Textes.T(cle), minimum)),
					GUILayout.Height(40f)
				}) && regle2 != regle)
				{
					Choisir(e.Prefab, regle2);
				}
			}
			GUILayout.EndHorizontal();
		}

		private static void DessinerIcone(Rect place, Sprite icone)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Invalid comparison between Unknown and I4
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)icone == (Object)null || (Object)(object)icone.texture == (Object)null || (int)Event.current.type != 7)
			{
				return;
			}
			Vector2[] uv = icone.uv;
			if (uv != null && uv.Length != 0)
			{
				float num = uv.Min((Vector2 u) => u.x);
				float num2 = uv.Max((Vector2 u) => u.x);
				float num3 = uv.Min((Vector2 u) => u.y);
				float num4 = uv.Max((Vector2 u) => u.y);
				GUI.DrawTextureWithTexCoords(place, (Texture)(object)icone.texture, new Rect(num, num3, num2 - num, num4 - num3));
			}
		}

		private void Styles()
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Expected O, but got Unknown
			//IL_00f8: Expected O, but got Unknown
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: 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_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Expected O, but got Unknown
			//IL_013d: Expected O, but got Unknown
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: 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)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Expected O, but got Unknown
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Expected O, but got Unknown
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Expected O, but got Unknown
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0208: Expected O, but got Unknown
			//IL_0208: 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_0217: Expected O, but got Unknown
			//IL_021c: Expected O, but got Unknown
			//IL_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: 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_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0247: Expected O, but got Unknown
			//IL_0247: Unknown result type (might be due to invalid IL or missing references)
			//IL_0261: Unknown result type (might be due to invalid IL or missing references)
			//IL_0275: Unknown result type (might be due to invalid IL or missing references)
			//IL_0285: Unknown result type (might be due to invalid IL or missing references)
			//IL_028b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0292: 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_02b1: 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_02cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0304: Unknown result type (might be due to invalid IL or missing references)
			//IL_0309: Unknown result type (might be due to invalid IL or missing references)
			//IL_0313: Expected O, but got Unknown
			//IL_0318: Expected O, but got Unknown
			//IL_031f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0324: Unknown result type (might be due to invalid IL or missing references)
			//IL_032a: Unknown result type (might be due to invalid IL or missing references)
			//IL_032c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0339: Unknown result type (might be due to invalid IL or missing references)
			//IL_034e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0358: Unknown result type (might be due to invalid IL or missing references)
			//IL_035e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0360: Unknown result type (might be due to invalid IL or missing references)
			//IL_036d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0382: Unknown result type (might be due to invalid IL or missing references)
			//IL_0391: Expected O, but got Unknown
			//IL_0392: Unknown result type (might be due to invalid IL or missing references)
			//IL_0397: Unknown result type (might be due to invalid IL or missing references)
			//IL_039e: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03be: Expected O, but got Unknown
			//IL_03be: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0402: Unknown result type (might be due to invalid IL or missing references)
			//IL_0409: Unknown result type (might be due to invalid IL or missing references)
			//IL_0423: Unknown result type (might be due to invalid IL or missing references)
			//IL_0428: Unknown result type (might be due to invalid IL or missing references)
			//IL_0435: Unknown result type (might be due to invalid IL or missing references)
			//IL_043b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0445: Unknown result type (might be due to invalid IL or missing references)
			//IL_044a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0454: Expected O, but got Unknown
			//IL_0459: Expected O, but got Unknown
			//IL_045a: Unknown result type (might be due to invalid IL or missing references)
			//IL_045f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0479: Unknown result type (might be due to invalid IL or missing references)
			//IL_0488: Unknown result type (might be due to invalid IL or missing references)
			//IL_048d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0497: Expected O, but got Unknown
			//IL_0497: Unknown result type (might be due to invalid IL or missing references)
			//IL_049c: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a6: Expected O, but got Unknown
			//IL_04ab: Expected O, but got Unknown
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			string langueDuJeu = Traductions.LangueDuJeu;
			if (stylesLangue == langueDuJeu)
			{
				return;
			}
			stylesLangue = langueDuJeu;
			Font val = Police("AveriaSerifLibre-Bold");
			Font font = Police("AveriaSerifLibre-Regular") ?? val;
			Font font2 = Police("Norsebold") ?? val;
			FontStyle fontStyle = (FontStyle)0;
			if (PolicesParLangue.TryGetValue(langueDuJeu, out var value))
			{
				Font val2 = Police(value);
				if (val2 != null)
				{
					val = (font = (font2 = val2));
					fontStyle = (FontStyle)1;
				}
			}
			Color val3 = default(Color);
			((Color)(ref val3))..ctor(0.86f, 0.69f, 0.3f);
			Color val4 = default(Color);
			((Color)(ref val4))..ctor(1f, 0.86f, 0.52f);
			Color textColor = default(Color);
			((Color)(ref textColor))..ctor(0.93f, 0.89f, 0.8f);
			GUIStyle val5 = new GUIStyle();
			val5.normal.background = Cadre(new Color(0.035f, 0.032f, 0.03f, 0.97f), val3, 3);
			val5.border = new RectOffset(6, 6, 6, 6);
			cadre = val5;
			GUIStyle val6 = new GUIStyle
			{
				font = font2,
				fontSize = 40,
				fontStyle = fontStyle,
				alignment = (TextAnchor)4
			};
			val6.normal.textColor = val3;
			val6.margin = new RectOffset(0, 0, 0, 6);
			titre = val6;
			GUIStyle val7 = new GUIStyle
			{
				font = val,
				fontSize = 22,
				alignment = (TextAnchor)3
			};
			val7.normal.textColor = textColor;
			val7.wordWrap = false;
			val7.clipping = (TextClipping)1;
			texte = val7;
			GUIStyle val8 = new GUIStyle
			{
				font = font,
				fontSize = 17,
				alignment = (TextAnchor)3
			};
			val8.normal.textColor = new Color(0.72f, 0.67f, 0.58f);
			val8.wordWrap = true;
			val8.clipping = (TextClipping)1;
			petit = val8;
			GUIStyle val9 = new GUIStyle
			{
				font = val,
				fontSize = 21
			};
			val9.normal.textColor = val3;
			val9.margin = new RectOffset(0, 0, 10, 4);
			val9.border = new RectOffset(0, 0, 0, 2);
			val9.padding = new RectOffset(2, 2, 2, 6);
			entete = val9;
			GUIStyle val10 = new GUIStyle
			{
				font = val,
				fontSize = 18,
				alignment = (TextAnchor)4,
				margin = new RectOffset(4, 4, 4, 4)
			};
			val10.normal.background = Cadre(new Color(0.09f, 0.08f, 0.07f, 1f), new Color(0.5f, 0.4f, 0.18f), 1);
			val10.normal.textColor = val3;
			val10.hover.background = Cadre(new Color(0.16f, 0.13f, 0.09f, 1f), val3, 1);
			val10.hover.textColor = val4;
			val10.active.background = Cadre(new Color(0.26f, 0.2f, 0.1f, 1f), val4, 1);
			val10.active.textColor = val4;
			val10.border = new RectOffset(3, 3, 3, 3);
			bouton = val10;
			GUIStyle val11 = new GUIStyle(bouton);
			val11.normal.background = Cadre(val3, val4, 1);
			val11.normal.textColor = new Color(0.08f, 0.06f, 0.03f);
			val11.hover.background = Cadre(val4, val4, 1);
			val11.hover.textColor = new Color(0.08f, 0.06f, 0.03f);
			boutonActif = val11;
			GUIStyle val12 = new GUIStyle
			{
				font = font,
				fontSize = 20,
				alignment = (TextAnchor)3,
				padding = new RectOffset(10, 10, 6, 6)
			};
			val12.normal.background = Cadre(new Color(0.06f, 0.055f, 0.05f, 1f), new Color(0.5f, 0.4f, 0.18f), 1);
			val12.normal.textColor = textColor;
			val12.focused.background = Cadre(new Color(0.08f, 0.07f, 0.06f, 1f), val3, 1);
			val12.focused.textColor = Color.white;
			val12.border = new RectOffset(3, 3, 3, 3);
			champ = val12;
			GUIStyle val13 = new GUIStyle();
			val13.normal.background = Uni(new Color(1f, 0.9f, 0.6f, 0.035f));
			val13.margin = new RectOffset(0, 0, 2, 2);
			val13.padding = new RectOffset(6, 6, 4, 4);
			ligne = val13;
		}

		private static Font Police(string nom)
		{
			Font val = ((IEnumerable<Font>)Resources.FindObjectsOfTypeAll<Font>()).FirstOrDefault((Func<Font, bool>)((Font p) => ((Object)p).name == nom));
			if ((Object)(object)val != (Object)null)
			{
				return val;
			}
			TMP_FontAsset val2 = ((IEnumerable<TMP_FontAsset>)Resources.FindObjectsOfTypeAll<TMP_FontAsset>()).FirstOrDefault((Func<TMP_FontAsset, bool>)((TMP_FontAsset p) => (Object)(object)p != (Object)null && ((Object)p).name.StartsWith(nom, StringComparison.OrdinalIgnoreCase) && (Object)(object)p.sourceFontFile != (Object)null));
			if (!((Object)(object)val2 != (Object)null))
			{
				return null;
			}
			return val2.sourceFontFile;
		}

		private static float Largeur(GUIStyle style, string texte, float minimum)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Expected O, but got Unknown
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			return Mathf.Max(minimum, style.CalcSize(new GUIContent(texte)).x + 24f);
		}

		private static Texture2D Uni(Color c)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			Texture2D val = new Texture2D(1, 1)
			{
				hideFlags = (HideFlags)61
			};
			val.SetPixel(0, 0, c);
			val.Apply();
			return val;
		}

		private static Texture2D Cadre(Color fond, Color bord, int epaisseur)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Expected O, but got Unknown
			//IL_003d: 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)
			Texture2D val = new Texture2D(12, 12)
			{
				hideFlags = (HideFlags)61,
				filterMode = (FilterMode)0
			};
			for (int i = 0; i < 12; i++)
			{
				for (int j = 0; j < 12; j++)
				{
					val.SetPixel(i, j, (i < epaisseur || j < epaisseur || i >= 12 - epaisseur || j >= 12 - epaisseur) ? bord : fond);
				}
			}
			val.Apply();
			return val;
		}
	}
	public static class Modele
	{
		public const float HauteurPanneau = 1.22f;

		public const float EchellePanneau = 1.3f;

		public static bool Construire(GameObject prefab, GameObject garde)
		{
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: 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_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: 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_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01db: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: 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_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0247: 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_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
			Transform transform = prefab.transform;
			Transform val = transform.Find("New");
			Transform val2 = transform.Find("Canvas");
			MeshFilter val3 = (((Object)(object)val != (Object)null) ? ((Component)val).GetComponentInChildren<MeshFilter>(true) : null);
			MeshRenderer val4 = (((Object)(object)val != (Object)null) ? ((Component)val).GetComponentInChildren<MeshRenderer>(true) : null);
			if ((Object)(object)val2 == (Object)null || (Object)(object)val3 == (Object)null || (Object)(object)val4 == (Object)null || (Object)(object)val3.sharedMesh == (Object)null)
			{
				return false;
			}
			Transform val5 = transform.Find("collider");
			int num = (((Object)(object)val5 != (Object)null) ? ((Component)val5).gameObject.layer : prefab.layer);
			if ((Object)(object)val5 != (Object)null)
			{
				Object.DestroyImmediate((Object)(object)((Component)val5).gameObject);
			}
			Transform transform2 = new GameObject("Panneau").transform;
			transform2.SetParent(transform, false);
			transform2.localPosition = new Vector3(0f, 1.22f, 0f);
			transform2.localScale = Vector3.one * 1.3f;
			val.SetParent(transform2, false);
			val2.SetParent(transform2, false);
			Transform transform3 = new GameObject("Montants").transform;
			transform3.SetParent(transform, false);
			Mesh sharedMesh = val3.sharedMesh;
			Material sharedMaterial = ((Renderer)val4).sharedMaterial;
			float num2 = 0.65f;
			Bloc(transform3, "Poteau_G", sharedMesh, sharedMaterial, new Vector3(0f - num2 - 0.06f, 0.875f, 0f), new Vector3(0.11f, 1.75f, 0.11f), num);
			Bloc(transform3, "Poteau_D", sharedMesh, sharedMaterial, new Vector3(num2 + 0.06f, 0.875f, 0f), new Vector3(0.11f, 1.75f, 0.11f), num);
			Bloc(transform3, "Traverse", sharedMesh, sharedMaterial, new Vector3(0f, 0.86f, 0f), new Vector3(1.4f, 0.07f, 0.07f), num);
			Bloc(transform3, "Chapeau", sharedMesh, sharedMaterial, new Vector3(0f, 1.79f, 0f), new Vector3(1.66f, 0.08f, 0.28f), num);
			GameObject val6 = new GameObject("collider")
			{
				layer = num
			};
			val6.transform.SetParent(transform, false);
			BoxCollider obj = val6.AddComponent<BoxCollider>();
			obj.center = new Vector3(0f, 0.915f, 0f);
			obj.size = new Vector3(1.66f, 1.83f, 0.28f);
			Transform val7 = (((Object)(object)garde != (Object)null) ? garde.transform.Find("AreaMarker") : null);
			if ((Object)(object)val7 != (Object)null)
			{
				GameObject obj2 = Object.Instantiate<GameObject>(((Component)val7).gameObject, transform, false);
				((Object)obj2).name = "AreaMarker";
				obj2.transform.localPosition = Vector3.zero;
				obj2.SetActive(false);
			}
			LODGroup component = prefab.GetComponent<LODGroup>();
			if ((Object)(object)component != (Object)null)
			{
				LOD[] lODs = component.GetLODs();
				if (lODs.Length != 0)
				{
					lODs[0].renderers = ((IEnumerable<Transform>)(object)new Transform[2] { val, transform3 }).SelectMany((Transform t) => ((Component)t).GetComponentsInChildren<MeshRenderer>(true)).Cast<Renderer>().ToArray();
					component.SetLODs(lODs);
					component.RecalculateBounds();
				}
			}
			TMP_Text val8 = ((Component)val2).GetComponentsInChildren<TMP_Text>(true).FirstOrDefault();
			if ((Object)(object)val8 != (Object)null)
			{
				val8.enableAutoSizing = true;
				val8.fontSizeMax = val8.fontSize;
				val8.fontSizeMin = val8.fontSize / 5f;
				val8.alignment = (TextAlignmentOptions)514;
				val8.text = "<b>" + Textes.T("tableau_titre") + "</b>";
			}
			return true;
		}

		private static void Bloc(Transform parent, string nom, Mesh maillage, Material materiau, Vector3 centre, Vector3 taille, int calque)
		{
			//IL_0001: 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_000e: 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_0027: Unknown result type (might be due to invalid IL or missing references)
			//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_003c: 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_0050: 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_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: 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_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: 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_009d: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject(nom)
			{
				layer = calque
			};
			val.transform.SetParent(parent, false);
			val.AddComponent<MeshFilter>().sharedMesh = maillage;
			((Renderer)val.AddComponent<MeshRenderer>()).sharedMaterial = materiau;
			Bounds bounds = maillage.bounds;
			Vector3 val2 = default(Vector3);
			((Vector3)(ref val2))..ctor(taille.x / ((Bounds)(ref bounds)).size.x, taille.y / ((Bounds)(ref bounds)).size.y, taille.z / ((Bounds)(ref bounds)).size.z);
			val.transform.localScale = val2;
			val.transform.localPosition = centre - Vector3.Scale(((Bounds)(ref bounds)).center, val2);
		}
	}
	internal sealed class EclairageNeutre : IDisposable
	{
		private static readonly int SunColor = Shader.PropertyToID("_SunColor");

		private static readonly int AmbientColor = Shader.PropertyToID("_AmbientColor");

		private static readonly int SunFogColor = Shader.PropertyToID("_SunFogColor");

		private static readonly int SunDir = Shader.PropertyToID("_SunDir");

		private static readonly int Wet = Shader.PropertyToID("_Wet");

		public static readonly Color Ambiance = new Color(0.6f, 0.6f, 0.6f);

		private readonly AmbientMode mode;

		private readonly Color ambiance;

		private readonly Color soleil;

		private readonly Color ambianceShader;

		private readonly Color brumeSoleil;

		private readonly float intensite;

		private readonly float mouille;

		private readonly bool brouillard;

		private readonly Vector4 direction;

		private readonly List<KeyValuePair<Light, int>> lumieres = new List<KeyValuePair<Light, int>>();

		public EclairageNeutre(int calque, Vector3 versLeSoleil, params Light[] miennes)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: 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_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: 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_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: 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_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			mode = RenderSettings.ambientMode;
			ambiance = RenderSettings.ambientLight;
			intensite = RenderSettings.ambientIntensity;
			brouillard = RenderSettings.fog;
			soleil = Shader.GetGlobalColor(SunColor);
			ambianceShader = Shader.GetGlobalColor(AmbientColor);
			brumeSoleil = Shader.GetGlobalColor(SunFogColor);
			direction = Shader.GetGlobalVector(SunDir);
			mouille = Shader.GetGlobalFloat(Wet);
			RenderSettings.ambientMode = (AmbientMode)3;
			RenderSettings.ambientLight = Ambiance;
			RenderSettings.ambientIntensity = 1f;
			RenderSettings.fog = false;
			Shader.SetGlobalColor(SunColor, new Color(1.05f, 1.02f, 0.97f));
			Shader.SetGlobalColor(AmbientColor, Ambiance);
			Shader.SetGlobalColor(SunFogColor, Ambiance);
			Shader.SetGlobalVector(SunDir, Vector4.op_Implicit(((Vector3)(ref versLeSoleil)).normalized));
			Shader.SetGlobalFloat(Wet, 0f);
			Light[] array = Object.FindObjectsByType<Light>((FindObjectsSortMode)0);
			foreach (Light val in array)
			{
				if (!miennes.Contains(val) && (val.cullingMask & (1 << calque)) != 0)
				{
					lumieres.Add(new KeyValuePair<Light, int>(val, val.cullingMask));
					val.cullingMask &= ~(1 << calque);
				}
			}
		}

		public void Dispose()
		{
			//IL_0001: 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)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			RenderSettings.ambientMode = mode;
			RenderSettings.ambientLight = ambiance;
			RenderSettings.ambientIntensity = intensite;
			RenderSettings.fog = brouillard;
			Shader.SetGlobalColor(SunColor, soleil);
			Shader.SetGlobalColor(AmbientColor, ambianceShader);
			Shader.SetGlobalColor(SunFogColor, brumeSoleil);
			Shader.SetGlobalVector(SunDir, direction);
			Shader.SetGlobalFloat(Wet, mouille);
			foreach (KeyValuePair<Light, int> lumiere in lumieres)
			{
				if ((Object)(object)lumiere.Key != (Object)null)
				{
					lumiere.Key.cullingMask = lumiere.Value;
				}
			}
		}
	}
	public static class Photo
	{
		private const int Calque = 31;

		public static Sprite Icone(IEnumerable<Transform> parties, Vector3 directionVue, int taille, float cadrage)
		{
			//IL_0001: 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_003b: Unknown result type (might be due to invalid IL or missing references)
			Texture2D val = Rendre(parties, directionVue, taille, cadrage);
			if (!((Object)(object)val == (Object)null))
			{
				return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f), 100f);
			}
			return null;
		}

		public static Texture2D Rendre(IEnumerable<Transform> parties, Vector3 directionVue, int taille, float cadrage)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected O, but got Unknown
			//IL_002b: 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_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: 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_011d: Expected O, but got Unknown
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: 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_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Expected O, but got Unknown
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: 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_01d1: 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_01e6: Expected O, but got Unknown
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0251: Unknown result type (might be due to invalid IL or missing references)
			//IL_025b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0260: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: Unknown result type (might be due to invalid IL or missing references)
			//IL_036b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0376: Unknown result type (might be due to invalid IL or missing references)
			//IL_0386: Unknown result type (might be due to invalid IL or missing references)
			//IL_0391: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_041d: Unknown result type (might be due to invalid IL or missing references)
			//IL_042e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0561: Unknown result type (might be due to invalid IL or missing references)
			//IL_0566: Unknown result type (might be due to invalid IL or missing references)
			//IL_04eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0592: Unknown result type (might be due to invalid IL or missing references)
			//IL_0597: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b2: Expected O, but got Unknown
			//IL_030d: Unknown result type (might be due to invalid IL or missing references)
			//IL_030f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0314: Unknown result type (might be due to invalid IL or missing references)
			//IL_0318: Unknown result type (might be due to invalid IL or missing references)
			//IL_0328: Unknown result type (might be due to invalid IL or missing references)
			//IL_0338: Unknown result type (might be due to invalid IL or missing references)
			//IL_0348: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = null;
			GameObject val2 = null;
			GameObject val3 = null;
			GameObject val4 = null;
			RenderTexture val5 = null;
			try
			{
				val = new GameObject("PickupRules_Photo");
				val.transform.position = new Vector3(0f, -4000f, 0f);
				foreach (Transform item in parties.Where((Transform p) => (Object)(object)p != (Object)null))
				{
					Object.Instantiate<GameObject>(((Component)item).gameObject, val.transform, false).SetActive(true);
				}
				Transform[] componentsInChildren = val.GetComponentsInChildren<Transform>(true);
				for (int num = 0; num < componentsInChildren.Length; num++)
				{
					((Component)componentsInChildren[num]).gameObject.layer = 31;
				}
				Renderer[] componentsInChildren2 = val.GetComponentsInChildren<Renderer>(true);
				if (componentsInChildren2.Length == 0)
				{
					return null;
				}
				Bounds bounds = componentsInChildren2[0].bounds;
				Renderer[] array = componentsInChildren2;
				foreach (Renderer val6 in array)
				{
					((Bounds)(ref bounds)).Encapsulate(val6.bounds);
				}
				val3 = new GameObject("PickupRules_PhotoLumiere");
				Light val7 = val3.AddComponent<Light>();
				val7.type = (LightType)1;
				val7.intensity = 1.25f;
				val7.cullingMask = int.MinValue;
				val3.transform.rotation = Quaternion.LookRotation(-directionVue + Vector3.down * 1.2f + Vector3.left * 0.6f);
				val4 = new GameObject("PickupRules_PhotoAppoint");
				Light val8 = val4.AddComponent<Light>();
				val8.type = (LightType)1;
				val8.intensity = 0.55f;
				val8.cullingMask = int.MinValue;
				val4.transform.rotation = Quaternion.LookRotation(directionVue + Vector3.down * 0.3f);
				val2 = new GameObject("PickupRules_PhotoCamera");
				Camera val9 = val2.AddComponent<Camera>();
				((Behaviour)val9).enabled = false;
				val9.cullingMask = int.MinValue;
				val9.clearFlags = (CameraClearFlags)2;
				val9.orthographic = true;
				val9.renderingPath = (RenderingPath)1;
				val9.allowHDR = false;
				val9.allowMSAA = false;
				val9.nearClipPlane = 0.01f;
				val9.farClipPlane = 30f;
				val2.transform.position = ((Bounds)(ref bounds)).center + ((Vector3)(ref directionVue)).normalized * 6f;
				val2.transform.LookAt(((Bounds)(ref bounds)).center);
				float num2 = float.MaxValue;
				float num3 = float.MinValue;
				float num4 = float.MaxValue;
				float num5 = float.MinValue;
				Vector3 val10 = default(Vector3);
				for (int num6 = 0; num6 < 8; num6++)
				{
					((Vector3)(ref val10))..ctor(((num6 & 1) == 0) ? ((Bounds)(ref bounds)).min.x : ((Bounds)(ref bounds)).max.x, ((num6 & 2) == 0) ? ((Bounds)(ref bounds)).min.y : ((Bounds)(ref bounds)).max.y, ((num6 & 4) == 0) ? ((Bounds)(ref bounds)).min.z : ((Bounds)(ref bounds)).max.z);
					Vector3 val11 = val2.transform.InverseTransformPoint(val10);
					num2 = Mathf.Min(num2, val11.x);
					num3 = Mathf.Max(num3, val11.x);
					num4 = Mathf.Min(num4, val11.y);
					num5 = Mathf.Max(num5, val11.y);
				}
				Transform transform = val2.transform;
				transform.position += val2.transform.right * ((num2 + num3) / 2f) + val2.transform.up * ((num4 + num5) / 2f);
				val9.orthographicSize = Mathf.Max(num5 - num4, num3 - num2) / 2f * cadrage;
				val5 = RenderTexture.GetTemporary(taille, taille, 24, (RenderTextureFormat)0);
				val5.antiAliasing = 1;
				val9.targetTexture = val5;
				Color32[] array2;
				Color32[] array3;
				using (new EclairageNeutre(31, -val3.transform.forward, val7, val8))
				{
					array2 = Rendu(val9, val5, Color.black, taille);
					array3 = Rendu(val9, val5, Color.white, taille);
				}
				val9.targetTexture = null;
				Color32[] array4 = (Color32[])(object)new Color32[array2.Length];
				int num7 = 0;
				for (int num8 = 0; num8 < array4.Length; num8++)
				{
					int num9 = (array3[num8].r - array2[num8].r + (array3[num8].g - array2[num8].g) + (array3[num8].b - array2[num8].b)) / 3;
					float num10 = Mathf.Clamp01(1f - (float)num9 / 255f);
					if (num10 < 0.02f)
					{
						array4[num8] = new Color32((byte)0, (byte)0, (byte)0, (byte)0);
						continue;
					}
					num7++;
					array4[num8] = new Color32((byte)Mathf.Min(255f, (float)(int)array2[num8].r / num10), (byte)Mathf.Min(255f, (float)(int)array2[num8].g / num10), (byte)Mathf.Min(255f, (float)(int)array2[num8].b / num10), (byte)(num10 * 255f));
				}
				if (num7 < taille * taille / 40)
				{
					return null;
				}
				Texture2D val12 = new Texture2D(taille, taille, (TextureFormat)4, false)
				{
					name = "PickupRules_Icone"
				};
				val12.SetPixels32(array4);
				val12.Apply();
				return val12;
			}
			catch (Exception ex)
			{
				ManualLogSource journal = Plugin.Journal;
				if (journal != null)
				{
					journal.LogWarning((object)Textes.T("journal_icone", ex.Message));
				}
				return null;
			}
			finally
			{
				if ((Object)(object)val5 != (Object)null)
				{
					RenderTexture.ReleaseTemporary(val5);
				}
				GameObject[] array5 = (GameObject[])(object)new GameObject[4] { val, val2, val3, val4 };
				foreach (GameObject val13 in array5)
				{
					if ((Object)(object)val13 != (Object)null)
					{
						Object.DestroyImmediate((Object)(object)val13);
					}
				}
			}
		}

		private static Color32[] Rendu(Camera c, RenderTexture rt, Color fond, int taille)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Expected O, but got Unknown
			c.backgroundColor = fond;
			c.Render();
			RenderTexture.active = rt;
			Texture2D val = new Texture2D(taille, taille, (TextureFormat)4, false);
			val.ReadPixels(new Rect(0f, 0f, (float)taille, (float)taille), 0, 0);
			val.Apply();
			RenderTexture.active = null;
			Color32[] pixels = val.GetPixels32();
			Object.DestroyImmediate((Object)val);
			return pixels;
		}
	}
	[BepInPlugin("com.Azura.pickuprules", "AutoPickupRules", "1.1.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		public const string PluginGUID = "com.Azura.pickuprules";

		public const string PluginName = "AutoPickupRules";

		public const string PluginVersion = "1.1.0";

		public const string NomPrefab = "piece_pickuprules_board";

		public static ConfigEntry<float> RayonDefaut;

		public static ConfigEntry<float> RayonMax;

		internal static ManualLogSource Journal;

		public static GameObject Prefab;

		private static bool creationTentee;

		private static GameObject conteneur;

		private void Awake()
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Expected O, but got Unknown
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Expected O, but got Unknown
			//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_0095: Expected O, but got Unknown
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			Journal = ((BaseUnityPlugin)this).Logger;
			RayonDefaut = ((BaseUnityPlugin)this).Config.Bind<float>("General", "DefaultRadius", 30f, new ConfigDescription("Area covered by a new pickup board, in meters (it can then be changed on each board, 5 m at a time).\nZone couverte par un nouveau tableau de ramassage, en mètres (réglable ensuite sur chaque tableau, de 5 m en 5 m).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(5f, 200f), Array.Empty<object>()));
			RayonMax = ((BaseUnityPlugin)this).Config.Bind<float>("General", "MaxRadius", 100f, new ConfigDescription("Largest area a board can cover, in meters.\nZone maximale qu'un tableau peut couvrir, en mètres.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(5f, 200f), Array.Empty<object>()));
			GameObject val = new GameObject("PickupRules_Menu");
			Object.DontDestroyOnLoad((Object)val);
			val.AddComponent<Menu>();
			new Harmony("com.Azura.pickuprules").PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)Textes.T("journal_charge", "AutoPickupRules", "1.1.0"));
		}

		private static Transform Conteneur()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			if ((Object)(object)conteneur == (Object)null)
			{
				conteneur = new GameObject("PickupRules_Prefabs");
				conteneur.SetActive(false);
				Object.DontDestroyOnLoad((Object)(object)conteneur);
			}
			return conteneur.transform;
		}

		public static void Enregistrer(ZNetScene scene)
		{
			if ((Object)(object)scene == (Object)null)
			{
				return;
			}
			if ((Object)(object)Prefab == (Object)null && !creationTentee)
			{
				creationTentee = true;
				try
				{
					Prefab = Creer(scene);
				}
				catch (Exception ex)
				{
					Debug.LogError((object)("[AutoPickupRules] " + Textes.T("journal_piece", ex)));
				}
			}
			if ((Object)(object)Prefab == (Object)null)
			{
				return;
			}
			if (!scene.m_prefabs.Contains(Prefab))
			{
				scene.m_prefabs.Add(Prefab);
			}
			AccessTools.FieldRefAccess<ZNetScene, Dictionary<int, GameObject>>("m_namedPrefabs").Invoke(scene)[StringExtensionMethods.GetStableHashCode(((Object)Prefab).name)] = Prefab;
			GameObject val = (((Object)(object)ObjectDB.instance != (Object)null) ? ObjectDB.instance.GetItemPrefab("Hammer") : null);
			PieceTable val2 = (((Object)(object)val != (Object)null) ? val.GetComponent<ItemDrop>().m_itemData.m_shared.m_buildPieces : null);
			if (!((Object)(object)val2 == (Object)null))
			{
				Piece component = Prefab.GetComponent<Piece>();
				if ((component.m_resources == null || component.m_resources.Length == 0) && (Object)(object)ObjectDB.instance.GetItemPrefab("Wood") != (Object)null)
				{
					component.m_resources = Couts();
				}
				if (!val2.m_pieces.Contains(Prefab))
				{
					val2.m_pieces.Add(Prefab);
				}
			}
		}

		private static GameObject Creer(ZNetScene scene)
		{
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			GameObject prefab = scene.GetPrefab("sign");
			if ((Object)(object)prefab == (Object)null)
			{
				return null;
			}
			GameObject val = Object.Instantiate<GameObject>(prefab, Conteneur(), false);
			((Object)val).name = "piece_pickuprules_board";
			Object.DestroyImmediate((Object)(object)val.GetComponent<Sign>());
			if (!Modele.Construire(val, scene.GetPrefab("guard_stone")))
			{
				Object.DestroyImmediate((Object)(object)val);
				return null;
			}
			Piece component = val.GetComponent<Piece>();
			component.m_name = Textes.Jeton("nom");
			component.m_description = Textes.Jeton("desc");
			component.m_category = (PieceCategory)0;
			GameObject prefab2 = scene.GetPrefab("piece_workbench");
			component.m_craftingStation = (((Object)(object)prefab2 != (Object)null) ? prefab2.GetComponent<CraftingStation>() : null);
			component.m_resources = (Requirement[])(((Object)(object)ObjectDB.instance != (Object)null && (Object)(object)ObjectDB.instance.GetItemPrefab("Wood") != (Object)null) ? ((Array)Couts()) : ((Array)new Requirement[0]));
			component.m_icon = Photo.Icone((IEnumerable<Transform>)(object)new Transform[2]
			{
				val.transform.Find("Panneau"),
				val.transform.Find("Montants")
			}, new Vector3(0.75f, 0.35f, 1.6f), 128, 1.04f) ?? component.m_icon;
			val.AddComponent<Tableau>();
			return val;
		}

		private static Requirement[] Couts()
		{
			return (from i in new(string, int)[3]
				{
					("Wood", 6),
					("Resin", 2),
					("Coal", 1)
				}.Select(delegate((string, int) i)
				{
					ObjectDB instance = ObjectDB.instance;
					return (prefab: (instance != null) ? instance.GetItemPrefab(i.Item1) : null, nombre: i.Item2);
				})
				where (Object)(object)i.prefab != (Object)null
				select i).Select<(GameObject, int), Requirement>((Func<(GameObject, int), Requirement>)(((GameObject prefab, int nombre) i) => new Requirement
			{
				m_resItem = i.prefab.GetComponent<ItemDrop>(),
				m_amount = i.nombre,
				m_recover = true
			})).ToArray();
		}
	}
	[HarmonyPatch(typeof(ZNetScene), "Awake")]
	public static class ZNetScene_Awake_Patch
	{
		public static void Postfix(ZNetScene __instance)
		{
			Plugin.Enregistrer(__instance);
		}
	}
	[HarmonyPatch(typeof(ObjectDB), "Awake")]
	public static class ObjectDB_Awake_Patch
	{
		public static void Postfix()
		{
			Plugin.Enregistrer(ZNetScene.instance);
		}
	}
	public enum Regle
	{
		Normal,
		Toujours,
		Jamais
	}
	public static class Regles
	{
		public static string NomObjet(ItemDrop objet)
		{
			GameObject val = objet.m_itemData?.m_dropPrefab;
			if (!((Object)(object)val != (Object)null))
			{
				return Utils.GetPrefabName(((Component)objet).gameObject);
			}
			return ((Object)val).name;
		}

		public static Regle En(ItemDrop objet)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)objet == (Object)null || Tableau.Tous.Count == 0)
			{
				return Regle.Normal;
			}
			return En(NomObjet(objet), ((Component)objet).transform.position);
		}

		public static Regle En(string nom, Vector3 position)
		{
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			Regle result = Regle.Normal;
			float num = float.MaxValue;
			foreach (Tableau tou in Tableau.Tous)
			{
				if (!((Object)(object)tou == (Object)null) && tou.Valide && tou.Regles.TryGetValue(nom, out var value))
				{
					float num2 = Utils.DistanceXZ(((Component)tou).transform.position, position);
					if (num2 <= tou.Rayon && num2 < num)
					{
						num = num2;
						result = value;
					}
				}
			}
			return result;
		}
	}
	[HarmonyPatch(typeof(Player), "AutoPickup")]
	public static class Ramassage_Patch
	{
		private static readonly FieldRef<Player, int> Masque = AccessTools.FieldRefAccess<Player, int>("m_autoPickupMask");

		private static readonly Collider[] Tampon = (Collider[])(object)new Collider[256];

		private static readonly List<KeyValuePair<ItemDrop, bool>> Modifies = new List<KeyValuePair<ItemDrop, bool>>();

		public static void Prefix(Player __instance)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			Modifies.Clear();
			if ((Object)(object)__instance != (Object)(object)Player.m_localPlayer || Tableau.Tous.Count == 0)
			{
				return;
			}
			int num = Physics.OverlapSphereNonAlloc(((Component)__instance).transform.position + Vector3.up, __instance.m_autoPickupRange, Tampon, Masque.Invoke(__instance));
			for (int i = 0; i < num; i++)
			{
				Rigidbody attachedRigidbody = Tampon[i].attachedRigidbody;
				ItemDrop val = (((Object)(object)attachedRigidbody != (Object)null) ? ((Component)attachedRigidbody).GetComponent<ItemDrop>() : null);
				if ((Object)(object)val == (Object)null)
				{
					continue;
				}
				Regle regle = Regles.En(val);
				if (regle != Regle.Normal)
				{
					bool flag = regle == Regle.Toujours;
					if (val.m_autoPickup != flag)
					{
						Modifies.Add(new KeyValuePair<ItemDrop, bool>(val, val.m_autoPickup));
						val.m_autoPickup = flag;
					}
				}
			}
		}

		public static void Finalizer()
		{
			foreach (KeyValuePair<ItemDrop, bool> modify in Modifies)
			{
				if ((Object)(object)modify.Key != (Object)null)
				{
					modify.Key.m_autoPickup = modify.Value;
				}
			}
			Modifies.Clear();
		}
	}
	[HarmonyPatch]
	public static class OttoStash_Patch
	{
		private static bool annonce;

		private static MethodBase Cible()
		{
			Type type = AccessTools.TypeByName("OttoStash.Util.Functions");
			if (!(type != null))
			{
				return null;
			}
			return AccessTools.Method(type, "CheckItemDropInstanceAndStore", new Type[1] { typeof(ItemDrop) }, (Type[])null);
		}

		public static bool Prepare()
		{
			bool num = Cible() != null;
			if (num && !annonce)
			{
				annonce = true;
				ManualLogSource journal = Plugin.Journal;
				if (journal == null)
				{
					return num;
				}
				journal.LogInfo((object)Textes.T("journal_ottostash"));
			}
			return num;
		}

		public static MethodBase TargetMethod()
		{
			return Cible();
		}

		public static bool Prefix(ItemDrop itemDrop)
		{
			return Regles.En(itemDrop) != Regle.Jamais;
		}
	}
	[HarmonyPatch(typeof(TextInput), "IsVisible")]
	public static class SaisieTexte_Patch
	{
		public static void Postfix(ref bool __result)
		{
			__result |= Menu.Bloque;
		}
	}
	[HarmonyPatch]
	public static class Touches_Patch
	{
		public static IEnumerable<MethodBase> TargetMethods()
		{
			yield return AccessTools.Method(typeof(ZInput), "GetButtonDown", new Type[1] { typeof(string) }, (Type[])null);
			yield return AccessTools.Method(typeof(ZInput), "GetButton", new Type[1] { typeof(string) }, (Type[])null);
			yield return AccessTools.Method(typeof(ZInput), "GetButtonUp", new Type[1] { typeof(string) }, (Type[])null);
			yield return AccessTools.Method(typeof(ZInput), "GetKeyDown", new Type[2]
			{
				typeof(KeyCode),
				typeof(bool)
			}, (Type[])null);
			yield return AccessTools.Method(typeof(ZInput), "GetKey", new Type[2]
			{
				typeof(KeyCode),
				typeof(bool)
			}, (Type[])null);
		}

		public static void Postfix(ref bool __result)
		{
			if (__result && Menu.Bloque)
			{
				__result = false;
			}
		}
	}
	public class Tableau : MonoBehaviour, Hoverable, Interactable
	{
		public const string RpcRegler = "PickupRules_Regler";

		private const string CleRegles = "pickuprules_regles";

		private const string CleRayon = "pickuprules_rayon";

		public static readonly List<Tableau> Tous = new List<Tableau>();

		private ZNetView nview;

		private uint revision = uint.MaxValue;

		private TMP_Text texte;

		private CircleProjector cercle;

		private float cercleJusqua;

		private string ecrit;

		public float Rayon { get; private set; }

		public Dictionary<string, Regle> Regles { get; private set; } = new Dictionary<string, Regle>();

		public bool Valide
		{
			get
			{
				if ((Object)(object)nview != (Object)null)
				{
					return nview.IsValid();
				}
				return false;
			}
		}

		private void Awake()
		{
			nview = ((Component)this).GetComponent<ZNetView>();
			texte = ((Component)this).GetComponentsInChildren<TMP_Text>(true).FirstOrDefault();
			cercle = ((Component)this).GetComponentsInChildren<CircleProjector>(true).FirstOrDefault();
			if ((Object)(object)cercle != (Object)null)
			{
				((Component)cercle).gameObject.SetActive(false);
			}
			if ((Object)(object)nview == (Object)null || nview.GetZDO() == null)
			{
				((Behaviour)this).enabled = false;
				return;
			}
			nview.Register<string, float>("PickupRules_Regler", (Action<long, string, float>)RPC_Regler);
			Lire();
		}

		private void OnEnable()
		{
			if ((Object)(object)nview != (Object)null && nview.GetZDO() != null)
			{
				Tous.Add(this);
			}
		}

		private void OnDisable()
		{
			Tous.Remove(this);
		}

		private void Update()
		{
			Lire();
			if ((Object)(object)cercle != (Object)null)
			{
				bool flag = Time.time < cercleJusqua || (Object)(object)Menu.Cible == (Object)(object)this;
				if (((Component)cercle).gameObject.activeSelf != flag)
				{
					((Component)cercle).gameObject.SetActive(flag);
				}
				if (flag && !Mathf.Approximately(cercle.m_radius, Rayon))
				{
					cercle.m_radius = Rayon;
					cercle.m_nrOfSegments = Mathf.Clamp(Mathf.RoundToInt(Rayon * 2.5f), 20, 250);
				}
			}
		}

		private void Lire()
		{
			ZDO val = (Valide ? nview.GetZDO() : null);
			if (val != null && val.DataRevision != revision)
			{
				revision = val.DataRevision;
				Rayon = Mathf.Clamp(val.GetFloat("pickuprules_rayon", Plugin.RayonDefaut.Value), 5f, Plugin.RayonMax.Value);
				Regles = Decoder(val.GetString("pickuprules_regles", ""));
				Ecrire();
			}
		}

		public void Enregistrer(Dictionary<string, Regle> regles, float rayon)
		{
			if (Valide)
			{
				nview.InvokeRPC("PickupRules_Regler", new object[2]
				{
					Encoder(regles),
					Mathf.Clamp(rayon, 5f, Plugin.RayonMax.Value)
				});
				Regles = new Dictionary<string, Regle>(regles);
				Rayon = Mathf.Clamp(rayon, 5f, Plugin.RayonMax.Value);
				Ecrire();
			}
		}

		private void RPC_Regler(long expediteur, string regles, float rayon)
		{
			if (nview.IsOwner())
			{
				ZDO zDO = nview.GetZDO();
				zDO.Set("pickuprules_regles", regles);
				zDO.Set("pickuprules_rayon", Mathf.Clamp(rayon, 5f, Plugin.RayonMax.Value));
			}
		}

		private static string Encoder(Dictionary<string, Regle> regles)
		{
			return string.Join(";", from kv in regles
				where kv.Value != Regle.Normal
				orderby kv.Key
				select kv.Key + ":" + ((kv.Value == Regle.Jamais) ? "-" : "+"));
		}

		private static Dictionary<string, Regle> Decoder(string texte)
		{
			Dictionary<string, Regle> dictionary = new Dictionary<string, Regle>();
			string[] array = (texte ?? "").Split(';');
			foreach (string text in array)
			{
				int num = text.LastIndexOf(':');
				if (num > 0 && num != text.Length - 1)
				{
					dictionary[text.Substring(0, num)] = ((text[num + 1] != '-') ? Regle.Toujours : Regle.Jamais);
				}
			}
			return dictionary;
		}

		public static string NomAffiche(string prefab)
		{
			GameObject val = (((Object)(object)ObjectDB.instance != (Object)null) ? ObjectDB.instance.GetItemPrefab(prefab) : null);
			ItemDrop val2 = (((Object)(object)val != (Object)null) ? val.GetComponent<ItemDrop>() : null);
			if (!((Object)(object)val2 != (Object)null))
			{
				return prefab;
			}
			return Localization.instance.Localize(val2.m_itemData.m_shared.m_name);
		}

		private string Liste(Regle r)
		{
			return string.Join(", ", from kv in Regles
				where kv.Value == r
				select NomAffiche(kv.Key) into n
				orderby n
				select n);
		}

		private void Ecrire()
		{
			if (!((Object)(object)texte == (Object)null))
			{
				string text = Liste(Regle.Jamais);
				string text2 = Liste(Regle.Toujours);
				List<string> list = new List<string> { "<b>" + Textes.T("tableau_titre") + "</b>" };
				if (text.Length > 0)
				{
					list.Add("<size=80%>" + Textes.T("tableau_jamais") + " :</size>\n" + text);
				}
				if (text2.Length > 0)
				{
					list.Add("<size=80%>" + Textes.T("tableau_toujours") + " :</size>\n" + text2);
				}
				if (text.Length == 0 && text2.Length == 0)
				{
					list.Add("<size=80%>" + Textes.T("tableau_aucune") + "</size>");
				}
				string text3 = string.Join("\n", list);
				if (text3 != ecrit)
				{
					ecrit = text3;
					texte.text = text3;
				}
			}
		}

		public string GetHoverText()
		{
			cercleJusqua = Time.time + 0.3f;
			if (!Valide)
			{
				return "";
			}
			string text = Liste(Regle.Jamais);
			string text2 = Liste(Regle.Toujours);
			string text3 = Localization.instance.Localize(Textes.Jeton("nom")) + "\n[<color=yellow><b>" + Localization.instance.Localize("$KEY_Use") + "</b></color>] " + Textes.T("survol_regler") + "\n" + Textes.T("survol_zone", Mathf.RoundToInt(Rayon));
			if (text.Length > 0)
			{
				text3 = text3 + "\n" + Textes.T("survol_jamais", text);
			}
			if (text2.Length > 0)
			{
				text3 = text3 + "\n" + Textes.T("survol_toujours", text2);
			}
			if (text.Length == 0 && text2.Length == 0)
			{
				text3 = text3 + "\n" + Textes.T("survol_aucune");
			}
			return text3;
		}

		public string GetHoverName()
		{
			return Localization.instance.Localize(Textes.Jeton("nom"));
		}

		public float GetHoverOffset()
		{
			return 0f;
		}

		public bool Interact(Humanoid user, bool hold, bool alt)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			if (hold || !Valide || (Object)(object)user != (Object)(object)Player.m_localPlayer)
			{
				return false;
			}
			if (!PrivateArea.CheckAccess(((Component)this).transform.position, 0f, true, false))
			{
				return true;
			}
			Menu.Ouvrir(this);
			return true;
		}

		public bool UseItem(Humanoid user, ItemData item)
		{
			return false;
		}
	}
	public static class Textes
	{
		private const string Prefixe = "laivy_ramassage_";

		private static readonly Action<Localization, string, string> AjouterMot = AccessTools.MethodDelegate<Action<Localization, string, string>>(AccessTools.Method(typeof(Localization), "AddWord", (Type[])null, (Type[])null), (object)null, true);

		private static string langueEnregistree;

		public static string T(string cle, params object[] valeurs)
		{
			return Traductions.Format(cle, null, valeurs);
		}

		public static string Jeton(string cle)
		{
			if (langueEnregistree == null && Localization.instance != null)
			{
				Enregistrer(Localization.instance, Localization.instance.GetSelectedLanguage());
			}
			return "$laivy_ramassage_" + cle;
		}

		public static void Enregistrer(Localization traduction, string langue)
		{
			if (traduction == null)
			{
				return;
			}
			foreach (string key in Traductions.Textes.Keys)
			{
				if (!key.StartsWith("journal_"))
				{
					AjouterMot(traduction, "laivy_ramassage_" + key, Traductions.Texte(key, langue));
				}
			}
			langueEnregistree = langue;
		}
	}
	[HarmonyPatch(typeof(Localization), "SetupLanguage")]
	public static class Textes_Langue_Patch
	{
		public static void Postfix(Localization __instance, string language)
		{
			Textes.Enregistrer(__instance, language);
		}
	}
	internal static class Traductions
	{
		internal static readonly string[] Langues = new string[36]
		{
			"English", "Swedish", "French", "Italian", "German", "Spanish", "Russian", "Romanian", "Bulgarian", "Macedonian",
			"Finnish", "Danish", "Norwegian", "Icelandic", "Turkish", "Lithuanian", "Czech", "Hungarian", "Slovak", "Polish",
			"Dutch", "Portuguese_European", "Portuguese_Brazilian", "Chinese", "Chinese_Trad", "Japanese", "Korean", "Hindi", "Thai", "Abenaki",
			"Croatian", "Georgian", "Greek", "Serbian", "Ukrainian", "Latvian"
		};

		private static readonly string[] Cultures = new string[36]
		{
			"en-US", "sv-SE", "fr-FR", "it-IT", "de-DE", "es-ES", "ru-RU", "ro-RO", "bg-BG", "mk-MK",
			"fi-FI", "da-DK", "nb-NO", "is-IS", "tr-TR", "lt-LT", "cs-CZ", "hu-HU", "sk-SK", "pl-PL",
			"nl-NL", "pt-PT", "pt-BR", "zh-CN", "zh-TW", "ja-JP", "ko-KR", "hi-IN", "th-TH", "en-US",
			"hr-HR", "ka-GE", "el-GR", "sr-Latn-RS", "uk-UA", "lv-LV"
		};

		internal static readonly Dictionary<string, string[]> Textes;

		internal static string LangueDuJeu
		{
			get
			{
				if (Localization.instance == null)
				{
					return "English";
				}
				return Localization.instance.GetSelectedLanguage();
			}
		}

		internal static string Texte(string cle, string langue = null)
		{
			if (!Textes.TryGetValue(cle, out var value))
			{
				return cle;
			}
			int num = Array.IndexOf(Langues, langue ?? LangueDuJeu);
			if (num <= 0 || num >= value.Length || string.IsNullOrEmpty(value[num]))
			{
				return value[0];
			}
			return value[num];
		}

		internal static string Format(string cle, string langue, object[] valeurs)
		{
			string text = Texte(cle, langue);
			if (valeurs != null && valeurs.Length != 0)
			{
				return string.Format(Culture(langue), text, valeurs);
			}
			return text;
		}

		internal static CultureInfo Culture(string langue = null)
		{
			int num = Array.IndexOf(Langues, langue ?? LangueDuJeu);
			try
			{
				return CultureInfo.GetCultureInfo((num >= 0) ? Cultures[num] : "en-US");
			}
			catch
			{
				return CultureInfo.InvariantCulture;
			}
		}

		static Traductions()
		{
			Dictionary<string, string[]> dictionary = new Dictionary<string, string[]>
			{
				["nom"] = new string[36]
				{
					"Pickup board", "Upplockningstavla", "Tableau de ramassage", "Bacheca di raccolta", "Aufsammeltafel", "Tablón de recogida", "Доска подбора", "Panou de colectare", "Табло за събиране", "Табла за собирање",
					"Keruutaulu", "Opsamlingstavle", "Plukketavle", "Söfnunartafla", "Toplama panosu", "Rinkimo lenta", "Sběrná tabule", "Gyűjtőtábla", "Zberná tabuľa", "Tablica zbierania",
					"Opraapbord", "Quadro de recolha", "Quadro de coleta", "拾取告示牌", "拾取告示牌", "拾得ルール掲示板", "줍기 게시판", "उठ\u093eन\u0947 क\u093e ब\u094bर\u094dड", "ป\u0e49ายเก\u0e47บของ", null,
					"Ploča za skupljanje", "აკრეფის დაფა", "Πίνακας συλλογής", "Tabla za skupljanje", "Дошка підбирання", "Savākšanas dēlis"
				},
				["desc"] = new string[36]
				{
					"Sets which items are picked up automatically around it: by players walking past, and by chests that pull items from the ground (OttoStash). Press E on it to choose item by item, for instance to leave eggs on the ground.", "Bestämmer vilka föremål som plockas upp automatiskt runt den: av spelare som går förbi och av kistor som drar till sig föremål från marken (OttoStash). Tryck E på den för att välja föremål för föremål, till exempel för att lämna ägg på marken.", "Règle quels objets sont ramassés automatiquement autour de lui : par les joueurs qui passent, et par les coffres qui aspirent les objets au sol (OttoStash). Appuie sur E pour choisir objet par objet, par exemple laisser les œufs au sol.", "Stabilisce quali oggetti vengono raccolti automaticamente nei dintorni: dai giocatori che passano e dagli scrigni che attirano gli oggetti da terra (OttoStash). Premi E su di essa per scegliere oggetto per oggetto, ad esempio per lasciare le uova a terra.", "Legt fest, welche Gegenstände in ihrer Umgebung automatisch aufgesammelt werden: von Spielern, die vorbeigehen, und von Truhen, die Gegenstände vom Boden anziehen (OttoStash). Drücke E an ihr, um Gegenstand für Gegenstand zu wählen, zum Beispiel um Eier auf dem Boden liegen zu lassen.", "Decide qué objetos se recogen automáticamente a su alrededor: los jugadores que pasan y los cofres que atraen objetos del suelo (OttoStash). Pulsa E sobre él para elegir objeto por objeto, por ejemplo para dejar los huevos en el suelo.", "Определяет, какие предметы подбираются автоматически вокруг неё: игроками, проходящими мимо, и сундуками, притягивающими предметы с земли (OttoStash). Нажмите E на ней, чтобы выбрать предмет за предметом, например, оставлять яйца на земле.", "Stabilește ce obiecte sunt colectate automat în jurul lui: de jucătorii care trec pe acolo și de cuferele care atrag obiectele de pe jos (OttoStash). Apasă E pe el ca să alegi obiect cu obiect, de exemplu ca să lași ouăle pe jos.", "Определя кои предмети се събират автоматично около него: от играчите, които минават, и от сандъците, които привличат предмети от земята (OttoStash). Натисни E върху него, за да избереш предмет по предмет, например да оставяш яйцата на земята.", "Одредува кои предмети автоматски се собираат околу неа: од играчите што минуваат и од ковчезите што ги привлекуваат предметите од земјата (OttoStash). Притисни E на неа за да избираш предмет по предмет, на пример за да ги оставиш јајцата на земја.",
					"Määrää, mitkä esineet kerätään automaattisesti sen ympäriltä: ohi kulkevat pelaajat ja maasta esineitä imevät arkut (OttoStash). Paina taulussa E valitaksesi esine kerrallaan, esimerkiksi jättääksesi munat maahan.", "Bestemmer, hvilke genstande der samles automatisk op omkring den: af spillere, der går forbi, og af kister, der trækker genstande til sig fra jorden (OttoStash). Tryk E på den for at vælge genstand for genstand, for eksempel for at lade æg ligge på jorden.", "Bestemmer hvilke gjenstander som plukkes opp automatisk rundt den: av spillere som går forbi, og av kister som trekker til seg gjenstander fra bakken (OttoStash). Trykk E på den for å velge gjenstand for gjenstand, for eksempel for å la egg ligge på bakken.", "Ræður hvaða hlutir eru teknir upp sjálfkrafa í kringum hana: af spilurum sem ganga hjá og af kistum sem draga til sín hluti af jörðinni (OttoStash). Ýttu á E á henni til að velja hlut fyrir hlut, til dæmis til að skilja egg eftir á jörðinni.", "Çevresinde hangi eşyaların otomatik olarak toplanacağını belirler: yanından geçen oyuncular ve yerdeki eşyaları çeken sandıklar tarafından (OttoStash). Eşya eşya seçmek için üzerinde E'ye bas; örneğin yumurtaları yerde bırakmak için.", "Nustato, kurie daiktai aplink ją renkami automatiškai: pro šalį einančių žaidėjų ir skrynių, traukiančių daiktus nuo žemės (OttoStash). Paspausk ant jos E, kad pasirinktum daiktą po daikto, pavyzdžiui, kad kiaušiniai liktų ant žemės.", "Určuje, které předměty se v jejím okolí sbírají automaticky: hráči, kteří jdou kolem, a truhlami, které přitahují předměty ze země (OttoStash). Stiskni na ní E a vyber předmět po předmětu, například aby vejce zůstala ležet na zemi.", "Meghatározza, mely tárgyakat szedik fel automatikusan körülötte: az arra járó játékosok és a tárgyakat a földről magukhoz vonzó ládák (OttoStash). Nyomd meg rajta az E-t, hogy tárgyanként válassz, például hogy a tojások a földön maradjanak.", "Určuje, ktoré predmety sa v jej okolí zbierajú automaticky: hráčmi, ktorí idú okolo, a truhlicami, ktoré priťahujú predmety zo zeme (OttoStash). Stlač na nej E a vyber predmet po predmete, napríklad aby vajcia zostali ležať na zemi.", "Określa, które przedmioty są zbierane automatycznie wokół niej: przez przechodzących graczy i przez skrzynie, które przyciągają przedmioty z ziemi (OttoStash). Naciśnij na niej E, aby wybierać przedmiot po przedmiocie, na przykład by zostawiać jajka na ziemi.",
					"Bepaalt welke voorwerpen er in de buurt automatisch worden opgeraapt: door spelers die voorbijlopen en door kisten die voorwerpen van de grond aantrekken (OttoStash). Druk er op E om voorwerp voor voorwerp te kiezen, bijvoorbeeld om eieren op de grond te laten liggen.", "Define que objetos são apanhados automaticamente à sua volta: pelos jogadores que passam e pelos baús que atraem objetos do chão (OttoStash). Prime E nele para escolher objeto a objeto, por exemplo para deixar os ovos no chão.", "Define quais itens são coletados automaticamente ao redor dele: pelos jogadores que passam e pelos baús que puxam itens do chão (OttoStash). Aperte E nele para escolher item por item, por exemplo para deixar os ovos no chão.", "决定它周围哪些物品会被自动拾取:路过的玩家,以及从地上吸取物品的箱子(OttoStash)。对着它按 E 可以逐个物品进行选择,例如让鸡蛋留在地上。", "決定它周圍哪些物品會被自動拾取:路過的玩家,以及從地上吸取物品的箱子(OttoStash)。對著它按 E 可以逐個物品進行選擇,例如讓雞蛋留在地上。", "周囲で自動的に拾われるアイテムを決めます。対象は通りがかったプレイヤーと、地面のアイテムを吸い寄せるチェスト(OttoStash)です。掲示板に向かってEを押すと、アイテムごとに選べます。たとえば卵を地面に残しておけます。", "주변에서 어떤 아이템을 자동으로 주울지 정합니다. 지나가는 플레이어와 땅에서 아이템을 끌어당기는 상자(OttoStash)에 적용됩니다. 게시판에서 E를 눌러 아이템별로 선택하세요. 예를 들어 달걀을 땅에 남겨 둘 수 있습니다.", "तय करत\u093e ह\u0948 क\u093f इसक\u0947 आस-प\u093eस क\u094cन-स\u0940 च\u0940ज\u093c\u0947\u0902 अपन\u0947-आप उठ\u093eई ज\u093eए\u0901: प\u093eस स\u0947 ग\u0941ज\u093cरत\u0947 ख\u093fल\u093eड\u093c\u093fय\u094b\u0902 द\u094dव\u093eर\u093e, और ज\u093cम\u0940न स\u0947 च\u0940ज\u093c\u0947\u0902 ख\u0940\u0902चन\u0947 व\u093eल\u0947 स\u0902द\u0942क\u094b\u0902 द\u094dव\u093eर\u093e (OttoStash)। हर च\u0940ज\u093c अलग स\u0947 च\u0941नन\u0947 क\u0947 ल\u093fए इस पर E दब\u093eए\u0901, ज\u0948स\u0947 अ\u0902ड\u0947 ज\u093cम\u0940न पर ह\u0940 छ\u094bड\u093cन\u0947 क\u0947 ल\u093fए।", "กำหนดว\u0e48าส\u0e34\u0e48งของใดรอบๆ ป\u0e49ายจะถ\u0e39กเก\u0e47บอ\u0e31ตโนม\u0e31ต\u0e34: โดยผ\u0e39\u0e49เล\u0e48นท\u0e35\u0e48เด\u0e34นผ\u0e48าน และโดยห\u0e35บท\u0e35\u0e48ด\u0e39ดส\u0e34\u0e48งของจากพ\u0e37\u0e49น (OttoStash) กด E ท\u0e35\u0e48ป\u0e49ายเพ\u0e37\u0e48อเล\u0e37อกท\u0e35ละอย\u0e48าง เช\u0e48น ปล\u0e48อยไข\u0e48ไว\u0e49บนพ\u0e37\u0e49น", null,
					"Određuje koji se predmeti oko nje automatski skupljaju: igrači koji prolaze i škrinje koje privlače predmete s tla (OttoStash). Pritisni E na njoj da biraš predmet po predmet, na primjer da jaja ostanu na tlu.", "განსაზღვრავს, რომელი ნივთები აიკრიფება ავტომატურად მის გარშემო: გამვლელი მოთამაშეების მიერ და სკივრების მიერ, რომლებიც მიწიდან ნივთებს იზიდავენ (OttoStash). დააჭირე E-ს დაფაზე, რომ ნივთ-ნივთ აირჩიო, მაგალითად, კვერცხები მიწაზე დატოვო.", "Ορίζει ποια αντικείμενα μαζεύονται αυτόματα γύρω του: από τους παίκτες που περνούν και από τα σεντούκια που τραβούν αντικείμενα από το έδαφος (OttoStash). Πάτησε E πάνω του για να διαλέξεις αντικείμενο προς αντικείμενο, για παράδειγμα να αφήνεις τα αυγά στο έδαφος.", "Određuje koji se predmeti oko nje automatski skupljaju: igrači koji prolaze i kovčezi koji privlače predmete sa zemlje (OttoStash). Pritisni E na njoj da biraš predmet po predmet, na primer da jaja ostanu na zemlji.", "Визначає, які предмети автоматично підбираються навколо неї: гравцями, що проходять повз, і скринями, які притягують предмети з землі (OttoStash). Натисни на ній E, щоб вибирати предмет за предметом, наприклад, залишати яйця на землі.", "Nosaka, kuri priekšmeti ap to tiek savākti automātiski: garām ejošie spēlētāji un lādes, kas pievelk priekšmetus no zemes (OttoStash). Nospied uz tā E, lai izvēlētos priekšmetu pa priekšmetam, piemēram, lai olas paliktu uz zemes."
				},
				["survol_regler"] = new string[36]
				{
					"Set automatic pickup", "Ställ in automatisk upplockning", "Régler le ramassage automatique", "Imposta la raccolta automatica", "Automatisches Aufsammeln einstellen", "Ajustar la recogida automática", "Настроить автоподбор", "Setează colectarea automată", "Настрой автоматичното събиране", "Постави автоматско собирање",
					"Säädä automaattista keruuta", "Indstil automatisk opsamling", "Still inn automatisk plukking", "Stilla sjálfvirka söfnun", "Otomatik toplamayı ayarla", "Nustatyti automatinį rinkimą", "Nastavit automatický sběr", "Automatikus felvétel beállítása", "Nastaviť automatický zber", "Ustaw automatyczne zbieranie",
					"Automatisch oprapen instellen", "Definir a recolha automática", "Ajustar a coleta automática", "设置自动拾取", "設定自動拾取", "自動拾得を設定", "자동 줍기 설정", "अपन\u0947-आप उठ\u093eन\u093e स\u0947ट कर\u0947\u0902", "ต\u0e31\u0e49งค\u0e48าการเก\u0e47บอ\u0e31ตโนม\u0e31ต\u0e34", null,
					"Postavi automatsko skupljanje", "ავტომატური აკრეფის მორგება", "Ρύθμιση αυτόματης συλλογής", "Podesi automatsko skupljanje", "Налаштувати автопідбирання", "Iestatīt automātisko savākšanu"
				},
				["survol_zone"] = new string[36]
				{
					"Area: {0} m", "Område: {0} m", "Zone : {0} m", "Area: {0} m", "Bereich: {0} m", "Zona: {0} m", "Зона: {0} м", "Zonă: {0} m", "Зона: {0} м", "Зона: {0} м",
					"Alue: {0} m", "Område: {0} m", "Område: {0} m", "Svæði: {0} m", "Alan: {0} m", "Zona: {0} m", "Oblast: {0} m", "Terület: {0} m", "Oblasť: {0} m", "Obszar: {0} m",
					"Gebied: {0} m", "Zona: {0} m", "Área: {0} m", "范围:{0} 米", "範圍:{0} 公尺", "範囲:{0} m", "범위: {0}m", "क\u094dष\u0947त\u094dर: {0} म\u0940", "พ\u0e37\u0e49นท\u0e35\u0e48: {0} ม.", null,
					"Područje: {0} m", "ზონა: {0} მ", "Περιοχή: {0} μ.", "Oblast: {0} m", "Зона: {0} м", "Zona: {0} m"
				},
				["survol_aucune"] = new string[36]
				{
					"No rule: everything is picked up as usual.", "Ingen regel: allt plockas upp som vanligt.", "Aucune règle : tout est ramassé comme d'habitude.", "Nessuna regola: tutto viene raccolto come al solito.", "Keine Regel: Alles wird wie gewohnt aufgesammelt.", "Ninguna regla: todo se recoge como siempre.", "Нет правил: всё подбирается как обычно.", "Nicio regulă: totul se colectează ca de obicei.", "Няма правила: всичко се събира както обикновено.", "Нема правила: сè се собира како обично.",
					"Ei sääntöjä: kaikki kerätään tavalliseen tapaan.", "Ingen regel: alt samles op som sædvanligt.", "Ingen regel: alt plukkes opp som vanlig.", "Engin regla: allt er tekið upp eins og venjulega.", "Kural yok: her şey her zamanki gibi toplanır.", "Taisyklių nėra: viskas renkama kaip įprasta.", "Žádné pravidlo: vše se sbírá jako obvykle.", "Nincs szabály: minden a szokásos módon felvehető.", "Žiadne pravidlo: všetko sa zbiera ako zvyčajne.", "Brak reguł: wszystko jest zbierane jak zwykle.",
					"Geen regel: alles wordt zoals gewoonlijk opgeraapt.", "Nenhuma regra: tudo é apanhado como de costume.", "Nenhuma regra: tudo é coletado como sempre.", "没有规则:一切照常拾取。", "沒有規則:一切照常拾取。", "ルールなし:すべていつも通り拾われます。", "규칙 없음: 모든 것을 평소처럼 줍습니다.", "क\u094bई न\u093fयम नह\u0940\u0902: सब क\u0941छ हम\u0947श\u093e क\u0940 तरह उठ\u093eय\u093e ज\u093eत\u093e ह\u0948।", "ไม\u0e48ม\u0e35กฎ: ท\u0e38กอย\u0e48างถ\u0e39กเก\u0e47บตามปกต\u0e34", null,
					"Nema pravila: sve se skuplja kao inače.", "წესი არ არის: ყველაფერი ჩვეულებრივად აიკრიფება.", "Κανένας κανόνας: όλα μαζεύονται όπως συνήθως.", "Nema pravila: sve se skuplja kao i obično.", "Немає правил: усе підбирається як завжди.", "Nav noteikumu: viss tiek savākts kā parasti."
				},
				["survol_jamais"] = new string[36]
				{
					"Left on the ground: {0}", "Lämnas på marken: {0}", "Laissés au sol : {0}", "Lasciati a terra: {0}", "Bleiben liegen: {0}", "Se quedan en el suelo: {0}", "Остаются на земле: {0}", "Lăsate pe jos: {0}", "Остават на земята: {0}", "Остануваат на земја: {0}",
					"Jätetään maahan: {0}", "Bliver liggende: {0}", "Blir liggende: {0}", "Skilið eftir á jörðinni: {0}", "Yerde bırakılanlar: {0}", "Paliekami ant žemės: {0}", "Zůstávají na zemi: {0}", "A földön maradnak: {0}", "Zostávajú na zemi: {0}", "Zostają na ziemi: {0}",
					"Blijven liggen: {0}", "Ficam no chão: {0}", "Ficam no chão: {0}", "留在地上:{0}", "留在地上:{0}", "地面に残す:{0}", "땅에 남김: {0}", "ज\u093cम\u0940न पर छ\u094bड\u093c\u0947 ज\u093eत\u0947 ह\u0948\u0902: {0}", "ปล\u0e48อยไว\u0e49บนพ\u0e37\u0e49น: {0}", null,
					"Ostaju na tlu: {0}", "რჩება მიწაზე: {0}", "Μένουν στο έδαφος: {0}", "Ostaju na zemlji: {0}", "Залишаються на землі: {0}", "Paliek uz zemes: {0}"
				},
				["survol_toujours"] = new string[36]
				{
					"Always picked up: {0}", "Plockas alltid upp: {0}", "Toujours ramassés : {0}", "Sempre raccolti: {0}", "Immer aufgesammelt: {0}", "Siempre recogidos: {0}", "Всегда подбираются: {0}", "Colectate mereu: {0}", "Винаги се събират: {0}", "Секогаш се собираат: {0}",
					"Kerätään aina: {0}", "Samles altid op: {0}", "Plukkes alltid opp: {0}", "Alltaf tekið upp: {0}", "Her zaman toplananlar: {0}", "Visada renkami: {0}", "Vždy sbírané: {0}", "Mindig felvett: {0}", "Vždy zbierané: {0}", "Zawsze zbierane: {0}",
					"Altijd opgeraapt: {0}", "Sempre apanhados: {0}", "Sempre coletados: {0}", "总是拾取:{0}", "總是拾取:{0}", "常に拾う:{0}", "항상 주움: {0}", "हम\u0947श\u093e उठ\u093eए ज\u093eत\u0947 ह\u0948\u0902: {0}", "เก\u0e47บเสมอ: {0}", null,
					"Uvijek se skupljaju: {0}", "ყოველთვის აიკრიფება: {0}", "Μαζεύονται πάντα: {0}", "Uvek se skupljaju: {0}", "Завжди підбираються: {0}", "Vienmēr savākti: {0}"
				},
				["tableau_titre"] = new string[36]
				{
					"PICKUP", "UPPLOCKNING", "RAMASSAGE", "RACCOLTA", "AUFSAMMELN", "RECOGIDA", "ПОДБОР", "COLECTARE", "СЪБИРАНЕ", "СОБИРАЊЕ",
					"KERUU", "OPSAMLING", "PLUKKING", "SÖFNUN", "TOPLAMA", "RINKIMAS", "SBĚR", "FELVÉTEL", "ZBER", "ZBIERANIE",
					"OPRAPEN", "RECOLHA", "COLETA", "拾取", "拾取", "拾得", "줍기", "उठ\u093eन\u093e", "เก\u0e47บของ", null,
					"SKUPLJANJE", "აკრეფა", "ΣΥΛΛΟΓΗ", "SKUPLJANJE", "ПІДБИРАННЯ", "SAVĀKŠANA"
				},
				["tableau_jamais"] = new string[36]
				{
					"Left on the ground", "Lämnas på marken", "Laissés au sol", "Lasciati a terra", "Bleiben liegen", "Se quedan en el suelo", "Остаются на земле", "Lăsate pe jos", "Остават на земята", "Остануваат на земја",
					"Jätetään maahan", "Bliver liggende", "Blir liggende", "Skilið eftir á jörðinni", "Yerde bırakılanlar", "Paliekami ant žemės", "Zůstávají na zemi", "A földön maradnak", "Zostávajú na zemi", "Zostają na ziemi",
					"Blijven liggen", "Ficam no chão", "Ficam no chão", "留在地上", "留在地上", "地面に残す", "땅에 남김", "ज\u093cम\u0940न पर छ\u094bड\u093c\u0947 ज\u093eत\u0947 ह\u0948\u0902", "ปล\u0e48อยไว\u0e49บนพ\u0e37\u0e49น", null,
					"Ostaju na tlu", "რჩება მიწაზე", "Μένουν στο έδαφος", "Ostaju na zemlji", "Залишаються на землі", "Paliek uz zemes"
				},
				["tableau_toujours"] = new string[36]
				{
					"Always picked up", "Plockas alltid upp", "Toujours ramassés", "Sempre raccolti", "Immer aufgesammelt", "Siempre recogidos", "Всегда подбираются", "Colectate mereu", "Винаги се събират", "Секогаш се собираат",
					"Kerätään aina", "Samles altid op", "Plukkes alltid opp", "Alltaf tekið upp", "Her zaman toplananlar", "Visada renkami", "Vždy sbírané", "Mindig felvett", "Vždy zbierané", "Zawsze zbierane",
					"Altijd opgeraapt", "Sempre apanhados", "Sempre coletados", "总是拾取", "總是拾取", "常に拾う", "항상 주움", "हम\u0947श\u093e उठ\u093eए ज\u093eत\u0947 ह\u0948\u0902", "เก\u0e47บเสมอ", null,
					"Uvijek se skupljaju", "ყოველთვის აიკრიფება", "Μαζεύονται πάντα", "Uvek se skupljaju", "Завжди підбираються", "Vienmēr savākti"
				},
				["tableau_aucune"] = new string[36]
				{
					"Everything as usual", "Allt som vanligt", "Tout comme d'habitude", "Tutto come al solito", "Alles wie gewohnt", "Todo como siempre", "Всё как обычно", "Totul ca de obicei", "Всичко както обикновено", "Сè како обично",
					"Kaikki tavalliseen tapaan", "Alt som sædvanligt", "Alt som vanlig", "Allt eins og venjulega", "Her şey her zamanki gibi", "Viskas kaip įprasta", "Vše jako obvykle", "Minden a szokásos", "Všetko ako zvyčajne", "Wszystko jak zwykle",
					"Alles zoals gewoonlijk", "Tudo como de costume", "Tudo como sempre", "一切照常", "一切照常", "すべていつも通り", "모두 평소대로", "सब क\u0941छ हम\u0947श\u093e क\u0940 तरह", "ท\u0e38กอย\u0e48างตามปกต\u0e34", null,
					"Sve kao inače", "ყველაფერი