Decompiled source of SailorsKeepsakes v1.0.0
plugins/AdornosMod.dll
Decompiled an hour ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Text; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using UnityEngine; using UnityEngine.Rendering; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("AdornosMod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("AdornosMod")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("68a186c9-6f8d-4d00-aa85-d09293e7fb6d")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace AdornosMod; [BepInPlugin("com.vikingdmike.adornosmod", "Sailor's Keepsakes", "1.0.0")] public class Plugin : BaseUnityPlugin { private class Adorno { public string nombre; public string nombreObjeto; public int indice; public GameObject prefab; public Transform puesto; public bool delJuego; public bool noVender; public int fila; public ConfigEntry<float> separacion; public TipoEscudo tipo; public ConfigEntry<string> isla; public ConfigEntry<float> escala; public ConfigEntry<float> detalle; public ConfigEntry<int> precio; public ConfigEntry<float> peso; public ConfigEntry<bool> invertir; public ConfigEntry<string> clavar; public ConfigEntry<Vector3> giroModelo; public ConfigEntry<Vector3> colgarPos; public ConfigEntry<Vector3> colgarGiro; public ConfigEntry<Vector3> tiendaPos; public ConfigEntry<Vector3> tiendaGiro; } private class Escondido { public string nombre; public Adorno adorno; public ConfigEntry<bool> activo; public ConfigEntry<string> raiz; public ConfigEntry<string> encontrado; public ConfigEntry<Vector3> sitio; public ConfigEntry<Vector3> giro; public float hundir; public AdornoItem puesto; public Vector3 giroPuesto; public bool poniendo; public string revisadoEn; } private class Constructor { public List<Vector3> v = new List<Vector3>(); public List<Vector2> uv = new List<Vector2>(); public List<int>[] sub = new List<int>[8] { new List<int>(), new List<int>(), new List<int>(), new List<int>(), new List<int>(), new List<int>(), new List<int>(), new List<int>() }; public int Punto(Vector3 p, Vector2 t) { //IL_0006: 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) v.Add(p); uv.Add(t); return v.Count - 1; } public void Tri(int m, int a, int b, int c, Vector3 fuera) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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) //IL_0040: 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_0051: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.Cross(v[b] - v[a], v[c] - v[a]); if (!(((Vector3)(ref val)).sqrMagnitude < 1E-16f)) { if (Vector3.Dot(val, fuera) < 0f) { int num = b; b = c; c = num; } sub[m].Add(a); sub[m].Add(b); sub[m].Add(c); } } } private class TipoEscudo { public string nombre; public string forma; public ConfigEntry<string> isla; public ConfigEntry<float> separacion; public readonly List<ConfigEntry<int>> cuantos = new List<ConfigEntry<int>>(); public readonly List<ConfigEntry<Vector3>> sitio = new List<ConfigEntry<Vector3>>(); public readonly List<ConfigEntry<Vector3>> giro = new List<ConfigEntry<Vector3>>(); } [HarmonyPatch(typeof(PrefabsDirectory), "Start")] private static class ParcheDirectorio { private static void Prefix(PrefabsDirectory __instance) { if ((Object)(object)yo != (Object)null) { yo.InsertarEnDirectorio(__instance, rehacerItems: false); } } } [HarmonyPatch(typeof(LookUI), "ShowLookText")] private static class ParcheMirar { private static FieldInfo fPuntero; private static FieldInfo fTexto; private static MethodInfo mIzq; private static MethodInfo mDer; private static MethodInfo mEnMano; private static void Postfix(LookUI __instance, GoPointerButton __0) { try { if ((Object)(object)__0 == (Object)null) { return; } if (fPuntero == null) { Type? typeFromHandle = typeof(LookUI); BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; fPuntero = typeFromHandle.GetField("pointer", bindingAttr); fTexto = typeFromHandle.GetField("controlsText", bindingAttr); mIzq = typeFromHandle.GetMethod("ShowLicon", bindingAttr); mDer = typeFromHandle.GetMethod("ShowRicon", bindingAttr); } if (fPuntero == null || fTexto == null || mIzq == null || mDer == null) { return; } object value = fPuntero.GetValue(__instance); if (value == null) { return; } if (mEnMano == null) { mEnMano = value.GetType().GetMethod("GetHeldItem", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); } ShipItem val = (ShipItem)((mEnMano != null) ? /*isinst with value type is only supported in some contexts*/: null); object? value2 = fTexto.GetValue(__instance); TextMesh val2 = (TextMesh)((value2 is TextMesh) ? value2 : null); if ((Object)(object)val2 == (Object)null) { return; } if ((Object)(object)val != (Object)null) { EspaderoItem espaderoItem = EspaderoItem.Apuntado(__0); if ((Object)(object)espaderoItem != (Object)null && espaderoItem.Admite(val)) { mIzq.Invoke(__instance, null); val2.text = "place sword\n"; } SoporteItem soporteItem = __0 as SoporteItem; if ((Object)(object)soporteItem != (Object)null && !(soporteItem is SoporteLamparaItem) && soporteItem.Admite(val)) { mIzq.Invoke(__instance, null); val2.text = "place\n"; } } else { IncensoItem component = ((Component)__0).GetComponent<IncensoItem>(); if (!((Object)(object)component == (Object)null) && ((ShipItem)component).sold && !(val2.text == "")) { mIzq.Invoke(__instance, null); mDer.Invoke(__instance, null); val2.text = "pick up\nuse"; } } } catch { } } } private class Piedra { public int n; public ConfigEntry<string> raiz; public ConfigEntry<string> encontrado; public ConfigEntry<string> texto; public ConfigEntry<Vector3> sitio; public ConfigEntry<Vector3> giro; public GameObject obj; public Collider col; public TextMesh rotulo; public float verHasta; } private const int indiceMjolnir = 20460; private const string escenaTienda = "island 17 M (Mount Malefic)"; private const string raizTienda = "island 17 M (mount malefic) scenery"; private readonly List<Adorno> adornos = new List<Adorno>(); private ConfigEntry<bool> generarActivo; private ConfigEntry<string> generarCual; private ConfigEntry<KeyCode> generarTecla; private static readonly Dictionary<string, object> fabrica = new Dictionary<string, object> { { "Bonsai arce|Tienda isla", "island 13 E (sage hills) scenery" }, { "Bonsai arce|Tienda sitio", (object)new Vector3(-16.55f, 19.26f, 36.43f) }, { "Bonsai cerezo|Tienda isla", "island 13 E (sage hills) scenery" }, { "Bonsai cerezo|Tienda sitio", (object)new Vector3(-16.98f, 19.26f, 36.87f) }, { "Bonsai pino|Tienda isla", "island 13 E (sage hills) scenery" }, { "Bonsai pino|Tienda sitio", (object)new Vector3(-16.09f, 19.26f, 35.94f) }, { "Casco|Tienda sitio", (object)new Vector3(-412.51f, 3.28f, 284.53f) }, { "Cimitarra|Clavar con martillo", "floor" }, { "Cimitarra|Tienda isla", "island 20 A (oasis) scenery" }, { "Cimitarra|Colgar posicion", (object)new Vector3(-0.01f, 0.04f, -0.13f) }, { "Cimitarra|Tienda sitio", (object)new Vector3(55.83f, 14.81f, -53.64f) }, { "Cimitarra|Tienda giro", (object)new Vector3(90f, 45f, 5f) }, { "Escudos cometa|Fila 2 sitio", (object)new Vector3(-413.74f, 5.52f, 281.47f) }, { "Escudos cometa|Fila 2 giro", (object)new Vector3(1f, 10f, 0f) }, { "Escudos cometa|Fila 3 sitio", (object)new Vector3(-413.74f, 7.02f, 281.47f) }, { "Escudos cometa|Fila 3 giro", (object)new Vector3(1f, 10f, 0f) }, { "Espada|Tienda sitio", (object)new Vector3(-412.08f, 4f, 281.11f) }, { "Espada|Tienda giro", Vector3.zero }, { "Espadero|Tienda isla", "island 15 M (Fort) scenery" }, { "Espadero|Tienda sitio", (object)new Vector3(-123.94f, 3.03f, 31.99f) }, { "Espadero|Tienda giro", (object)new Vector3(0f, 90f, 0f) }, { "Incensario|Tienda isla", "island 10 E (sanctuary) scenery" }, { "Incensario|Tienda sitio", (object)new Vector3(135.63f, 9.19f, 5.5f) }, { "Incensario colgante|Tienda isla", "island 7 A (alchemist's hut) scenery" }, { "Incensario colgante|Colgar posicion", (object)new Vector3(0f, -0.55f, -0.13f) }, { "Incensario colgante|Tienda sitio", (object)new Vector3(-81.93f, 12f, -140.44f) }, { "Incensario de pared|Tienda isla", "island 7 A (alchemist's hut) scenery" }, { "Incensario de pared|Tienda sitio", (object)new Vector3(-86.3f, 12.25f, -141.8f) }, { "Incensario de pared|Tienda giro", (object)new Vector3(0f, -45f, 0f) }, { "Kabuto|Clavar con martillo", "floor" }, { "Katana|Clavar con martillo", "floor" }, { "Katana|Tienda isla", "island 9 E (dragon cliffs) scenery" }, { "Katana|Colgar posicion", (object)new Vector3(-0.01f, -0.04f, -0.14f) }, { "Katana|Colgar giro", (object)new Vector3(0f, 0f, -90f) }, { "Katana|Tienda sitio", (object)new Vector3(-69.13f, 3.39f, -534.68f) }, { "Katana|Tienda giro", (object)new Vector3(90f, 35f, 0f) }, { "Soporte casco|Tienda isla", "island 16 M (sunspire) scenery" }, { "Soporte casco|Tienda sitio", (object)new Vector3(-438.65f, 7.73f, -304.73f) }, { "Soporte katana|Tienda isla", "island 9 E (dragon cliffs) scenery" }, { "Soporte katana|Tienda sitio", (object)new Vector3(-69.83f, 3.38f, -534.27f) }, { "Soporte katana|Tienda giro", (object)new Vector3(0f, 20f, 0f) }, { "Soporte lampara|Tienda isla", "island 33 M (cave)|scenery" }, { "Soporte lampara|Tienda sitio", (object)new Vector3(-107f, 3.11f, -1041.21f) }, { "Soporte lampara|Tienda giro", (object)new Vector3(0f, -75f, 0f) }, { "Yelmo cruzado|Clavar con martillo", "floor" }, { "Yelmo cruzado|Tienda isla", "island 16 M (sunspire) scenery" }, { "Yelmo cruzado|Tienda sitio", (object)new Vector3(-438.67f, 7.71f, -305.12f) }, { "Yelmo cruzado|Tienda giro", (object)new Vector3(0f, 180f, 0f) }, { "Yelmo cruzado negro|Clavar con martillo", "floor" }, { "Yelmo cruzado negro|Tienda isla", "island 16 M (sunspire) scenery" }, { "Yelmo cruzado negro|Tienda sitio", (object)new Vector3(-438.94f, 7.69f, -305.39f) }, { "Yelmo cruzado negro|Tienda giro", (object)new Vector3(0f, 180f, 0f) }, { "Zweihander|Clavar con martillo", "floor" }, { "Zweihander|Tienda isla", "island 15 M (Fort) scenery" }, { "Zweihander|Tienda sitio", (object)new Vector3(-124.83f, 3.03f, 32.29f) }, { "Zweihander|Tienda giro", (object)new Vector3(90f, -45f, 0f) } }; public static readonly Dictionary<string, string> ingles = new Dictionary<string, string> { { "Bonsai arce", "Maple bonsai" }, { "Bonsai cerezo", "Cherry bonsai" }, { "Bonsai pino", "Pine bonsai" }, { "Casco", "Viking helmet" }, { "Espada", "Viking sword" }, { "Cimitarra", "Scimitar" }, { "Katana", "Katana" }, { "Zweihander", "Zweihander" }, { "Kabuto", "Kabuto" }, { "Mjolnir", "Mjolnir" }, { "Escudos", "Round shields" }, { "Escudos caballero", "Knight shields" }, { "Escudos cometa", "Kite shields" }, { "Escudos cometa sin umbo", "Kite shields without boss" }, { "Escudo redondo", "Round shield" }, { "Escudo caballero", "Knight shield" }, { "Escudo cometa", "Kite shield" }, { "Escudo cometa sin umbo", "Kite shield without boss" }, { "Espadero", "Sword rack" }, { "Gancho", "Hook" }, { "General", "General" }, { "Generar objeto", "Spawn item" }, { "Gincana", "Runestone trail" }, { "Rumores", "Rumors" }, { "Incensario", "Incense burner" }, { "Incensario colgante", "Hanging incense burner" }, { "Incensario de pared", "Wall incense burner" }, { "Soporte casco", "Helmet stand" }, { "Soporte katana", "Katana stand" }, { "Soporte lampara", "Lamp bracket" }, { "Yelmo cruzado", "Crusader helm" }, { "Yelmo cruzado negro", "Black crusader helm" } }; private static readonly Dictionary<string, string> inglesClaves = new Dictionary<string, string> { { "Activa", "Enabled" }, { "Activo", "Enabled" }, { "Activos", "Enabled" }, { "Alto", "Height" }, { "Diametro", "Diameter" }, { "Altura de las piedras", "Stone height" }, { "Altura del acertijo", "Riddle height" }, { "Brillo metal", "Metal shine" }, { "Clavar con martillo", "Hammer fixing" }, { "Colgar giro", "Hook rotation" }, { "Colgar posicion", "Hook position" }, { "Coloca con la tecla del tesoro", "Treasure key places" }, { "Minutos encendido", "Burn minutes" }, { "Nombre del gancho", "Hook name" }, { "Objeto", "Item" }, { "Peso", "Weight" }, { "Precio", "Price" }, { "Probabilidad (%)", "Chance (%)" }, { "Segundos levantando", "Raise seconds" }, { "Tamano", "Size" }, { "Tecla", "Key" }, { "Tecla activar (reserva)", "Activate key (spare)" }, { "Tecla colocar", "Place key" }, { "Tecla encender", "Light key" }, { "Tecla tesoro", "Treasure key" }, { "Tesoro", "Treasure" }, { "Tesoro encontrado en partidas", "Treasure found in saves" }, { "Tesoro giro", "Treasure rotation" }, { "Tesoro isla", "Treasure island" }, { "Tesoro sitio", "Treasure position" }, { "Textos", "Texts" }, { "Tienda giro", "Shop rotation" }, { "Tienda isla", "Shop island" }, { "Tienda separacion", "Shop spacing" }, { "Tienda sitio", "Shop position" }, { "Tormenta", "Storm" }, { "Tormenta distancia", "Storm distance" }, { "Tormenta espera (minutos)", "Storm cooldown (minutes)" }, { "Vender de noche", "Sell at night" }, { "Vender en la tienda", "Sell in shop" }, { "Vender gancho", "Sell hook" }, { "Ver todas (pruebas)", "Show all (testing)" }, { "Adorno a colocar con F10", "Item to place (dev)" }, { "Color adornos", "Color trim" }, { "Color bandas", "Color bands" }, { "Color boca", "Color mouth" }, { "Color bronce", "Color bronze" }, { "Color calados", "Color cutouts" }, { "Color clavos", "Color nails" }, { "Color cordon", "Color cord" }, { "Color cordones", "Color cords" }, { "Color cuero", "Color leather" }, { "Color dientes", "Color teeth" }, { "Color dorados", "Color gold" }, { "Color empunadura", "Color grip" }, { "Color flores", "Color flowers" }, { "Color flores claras", "Color light flowers" }, { "Color guarda y pomo", "Color guard and pommel" }, { "Color guarda y remates", "Color guard and fittings" }, { "Color hierro", "Color iron" }, { "Color hoja", "Color blade" }, { "Color hojas", "Color leaves" }, { "Color hojitas", "Color small leaves" }, { "Color huecos", "Color holes" }, { "Color interior", "Color inside" }, { "Color laca", "Color lacquer" }, { "Color laton", "Color brass" }, { "Color maceta", "Color pot" }, { "Color madera", "Color wood" }, { "Color madera y cuero", "Color wood and leather" }, { "Color marca delante", "Color front mark" }, { "Color mascara", "Color mask" }, { "Color metal", "Color metal" }, { "Color musgo", "Color moss" }, { "Color patina", "Color patina" }, { "Color piedra", "Color stone" }, { "Color piedras", "Color gems" }, { "Color piel del puno", "Color grip skin" }, { "Color rendijas", "Color slits" }, { "Color tierra", "Color soil" }, { "Color tronco", "Color trunk" } }; private ConfigEntry<string> aColocar; private ConfigEntry<string> nombreGancho; private ConfigEntry<bool> rumoresActivos; private ConfigEntry<string> rumores; private ConfigEntry<float> probRumor; private ConfigEntry<bool> tesoroActivo; private ConfigEntry<bool> gincanaActiva; private ConfigEntry<bool> verTodas; private ConfigEntry<string> tesoroRaiz; private ConfigEntry<string> tesoroEncontrado; private ConfigEntry<string> colocaConF9; private ConfigEntry<Vector3> tesoroSitio; private ConfigEntry<Vector3> tesoroGiro; private ConfigEntry<KeyCode> teclaTesoro; private readonly List<Escondido> escondidos = new List<Escondido>(); private ConfigEntry<KeyCode> teclaColocar; private ConfigEntry<bool> venderDeNoche; private GameObject almacen; private bool registrado; private readonly List<TipoEscudo> tiposEscudo = new List<TipoEscudo>(); private const int maxEscudos = 20; private Color colorEscudoMadera; private Color colorEscudoMetal; private const int indiceBonsai = 20530; private static Random azar = new Random(7); private const int indiceKatana = 20534; public static string carpetaMod = ""; private const float KR = 0.115f; private const float KHB = 0.135f; private const float KFZ = 1.1f; private static readonly Vector3 MD = new Vector3(0f, -0.035f, 0.052f); private static readonly float[] MXS = new float[5] { 0f, 0.028f, 0.052f, 0.072f, 0.086f }; private static readonly float[] MZB = new float[5] { 0.075f, 0.068f, 0.05f, 0.025f, -0.005f }; private static readonly float[][] MFY = new float[6][] { new float[5] { -0.004f, -0.03f, -0.042f, -0.03f, -0.004f }, new float[5] { -0.046f, -0.05f, -0.05f, -0.044f, -0.032f }, new float[5] { -0.068f, -0.07f, -0.074f, -0.07f, -0.062f }, new float[5] { -0.108f, -0.108f, -0.106f, -0.096f, -0.088f }, new float[5] { -0.118f, -0.117f, -0.114f, -0.108f, -0.102f }, new float[5] { -0.138f, -0.137f, -0.135f, -0.132f, -0.128f } }; private static readonly float[][] MFZ = new float[6][] { new float[5], new float[5] { 0f, 0.006f, 0.01f, 0.004f, 0f }, new float[5] { 0.012f, 0.012f, 0.008f, 0.003f, 0f }, new float[5] { 0.012f, 0.01f, 0.007f, 0.002f, 0f }, new float[5] { 0.008f, 0.006f, 0.004f, 0f, 0f }, new float[5] { 0.006f, 0.004f, 0f, -0.004f, -0.006f } }; private static readonly float[] MANCHO = new float[6] { 1f, 1f, 1f, 1f, 0.78f, 0.38f }; public const float KSubir = 0.21f; public const float EscalaColgante = 1.4f; public const float EspAncho = 0.5f; public const float EspAlto = 0.78f; public static readonly float[] EspHuecos = new float[4] { 0.15f, 0.31f, 0.47f, 0.63f }; public const float EspFondo = -0.067f; private const float YH = 0.3f; private const float YRX = 0.105f; private const float YRZ = 0.125f; private const float YOJOS = 0.165f; private const float YARRIBA = 0.62f; private const int indiceIncensario = 20533; public static float escalaIncensario = 1.6f; private static Plugin yo; private float relojTienda; private Dictionary<string, float> pesoAntes = new Dictionary<string, float>(); private Type tipoColgable; private Dictionary<string, Vector3[]> colgadoAntes = new Dictionary<string, Vector3[]>(); private static readonly bool teclasPruebas = false; private ConfigEntry<KeyCode> teclaIncienso; private readonly List<TavernRumorsDude> marineros = new List<TavernRumorsDude>(); private readonly Dictionary<TavernRumorsDude, bool> botonAntes = new Dictionary<TavernRumorsDude, bool>(); private float relojRumores; private static readonly string[] islasSerie = new string[5] { "island 21 M (Siren Song)", "island 41 (mirage mountain)", "island 9 E (dragon cliffs)", "island 26 Lagoon Temple", "island 25 (chronos)" }; private static readonly Vector3[] sitiosSerie = (Vector3[])(object)new Vector3[5] { new Vector3(-62.83f, 1.21f, -12.8f), new Vector3(49.28564f, 39.08909f, -20.81482f), new Vector3(-143.4772f, 21.36119f, -582.7357f), new Vector3(-70.32089f, 7.573862f, -21.66592f), new Vector3(417.0016f, 61.56003f, 363.5776f) }; private static readonly float[] girosSerie = new float[5] { 12.11f, -9.411242f, 8.237075f, -97.69967f, -129.7919f }; private static readonly string[] acertijosSerie = new string[5] { "Not all you see is truly there. Climb the mountain that lies to the eye.", "Where the dragons of stone watch over the sea, the third stone waits between the cliffs.", "Surtur's embers fell into the sea and swam away as fish of fire. Seek the town that bears their name.", "Time itself keeps the last stone. Find the place named after the lord of time.", "Here Thor struck down Surtur, the fire giant. The mountain split and a crater remains. The hammer still waits in its heart. Climb, and do not stop jumping." }; private readonly List<Piedra> piedras = new List<Piedra>(); private Mesh[] mallasPiedra = (Mesh[])(object)new Mesh[6]; private Material[] matsPiedra = (Material[])(object)new Material[6]; private Material matPiedraCanto; private ConfigEntry<float> tamPiedra; private ConfigEntry<float> altoAcertijo; private ConfigEntry<KeyCode> teclaActivar; private float ultimaActivacion = -1f; private float segundosEnPartida; private float relojTesoro; private static byte[] Recurso(string nombre) { using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("AdornosMod.Recursos." + nombre); if (stream == null) { return null; } using MemoryStream memoryStream = new MemoryStream(); stream.CopyTo(memoryStream); return memoryStream.ToArray(); } public static string Ingles(string es) { if (es == null || !ingles.TryGetValue(es, out var value)) { return es; } return value; } private static string ClaveIngles(string es) { if (inglesClaves.TryGetValue(es, out var value)) { return value; } return es.Replace("Fila ", "Row ").Replace("Piedra ", "Stone ").Replace(" cuantos", " count") .Replace(" sitio", " position") .Replace(" giro", " rotation") .Replace(" isla", " island") .Replace(" encontrada en partidas", " found in saves") .Replace(" texto", " text"); } private static bool Bloqueada(string clave) { switch (clave) { case "Tesoro isla": case "Tesoro sitio": case "Tesoro giro": case "Ver todas (pruebas)": return true; default: if (clave.StartsWith("Fila ") && clave.EndsWith(" cuantos")) { return true; } if (clave.StartsWith("Piedra ")) { if (!clave.EndsWith(" texto") && !clave.EndsWith(" isla") && !clave.EndsWith(" sitio")) { return clave.EndsWith(" giro"); } return true; } return false; } } private ConfigEntry<T> B<T>(string sec, string clave, T valor, string desc) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown return B(sec, clave, valor, new ConfigDescription(desc, (AcceptableValueBase)null, Array.Empty<object>())); } private ConfigEntry<T> B<T>(string sec, string clave, T valor, ConfigDescription desc) { if (fabrica.TryGetValue(sec + "|" + clave, out var value) && value is T) { valor = (T)value; } ConfigEntry<T> val = ((BaseUnityPlugin)this).Config.Bind<T>(Ingles(sec), ClaveIngles(clave), valor, desc); if (!teclasPruebas && Bloqueada(clave) && !object.Equals(val.Value, valor)) { val.Value = valor; } return val; } private void OcultarAvanzado() { //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Expected O, but got Unknown FieldInfo field = typeof(ConfigEntryBase).GetField("<Description>k__BackingField", BindingFlags.Instance | BindingFlags.NonPublic); if (field == null) { ((BaseUnityPlugin)this).Logger.LogWarning((object)"F1: no puedo ordenar las opciones"); return; } foreach (ConfigDefinition item in new List<ConfigDefinition>(((BaseUnityPlugin)this).Config.Keys)) { if (!(item.Section == Ingles("Generar objeto"))) { ConfigEntryBase val = ((BaseUnityPlugin)this).Config[item]; ConfigDescription val2 = val.Description ?? ConfigDescription.Empty; List<object> list = new List<object>(val2.Tags ?? new object[0]); if ((item.Key == "Item to place (dev)" || item.Key == "Place key" || item.Key == "Treasure key" || item.Key == "Treasure key places" || item.Key == "Show all (testing)" || item.Key == "Treasure island" || item.Key == "Treasure position" || item.Key == "Treasure rotation" || (item.Key.StartsWith("Row ") && item.Key.EndsWith(" count")) || (item.Key.StartsWith("Stone ") && (item.Key.EndsWith(" text") || item.Key.EndsWith(" island") || item.Key.EndsWith(" position") || item.Key.EndsWith(" rotation")))) && !teclasPruebas) { list.Add(new ConfigurationManagerAttributes { Browsable = false }); } else { list.Add(new ConfigurationManagerAttributes { IsAdvanced = true }); } field.SetValue(val, (object?)new ConfigDescription(val2.Description, val2.AcceptableValues, list.ToArray())); } } } private void Generar() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: 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_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) if (generarActivo == null || !generarActivo.Value || !Input.GetKeyDown(generarTecla.Value) || (Object)(object)Camera.main == (Object)null || !registrado) { return; } string value = generarCual.Value; GameObject val = null; if (value == Ingles("Gancho")) { GameObject[] directory = PrefabsDirectory.instance.directory; foreach (GameObject val2 in directory) { if ((Object)(object)val2 != (Object)null && ((Object)val2).name.ToLower().Contains("lamp hanger")) { val = val2; break; } } } else { foreach (Adorno adorno in adornos) { if (!adorno.delJuego && !((Object)(object)adorno.prefab == (Object)null) && Ingles((adorno.tipo == null) ? adorno.nombre : ((adorno.tipo.nombre == "Cometa sin umbo") ? "Escudo cometa sin umbo" : ("Escudo " + adorno.tipo.forma))) == value) { val = adorno.prefab; break; } } } if ((Object)(object)val == (Object)null) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("GENERAR: no encuentro '" + value + "'")); return; } Transform transform = ((Component)Camera.main).transform; Vector3 val3 = Vector3.ProjectOnPlane(transform.forward, Vector3.up); if (((Vector3)(ref val3)).sqrMagnitude < 0.01f) { val3 = Vector3.forward; } GameObject obj = Object.Instantiate<GameObject>(val, transform.position + transform.forward * 1.2f, Quaternion.LookRotation(((Vector3)(ref val3)).normalized, Vector3.up)); ((Object)obj).name = ((Object)val).name; obj.SetActive(true); ShipItem component = obj.GetComponent<ShipItem>(); if ((Object)(object)component != (Object)null) { component.sold = true; } SaveablePrefab component2 = obj.GetComponent<SaveablePrefab>(); if ((Object)(object)component2 != (Object)null) { component2.RegisterToSave(); } ((BaseUnityPlugin)this).Logger.LogInfo((object)("GENERAR: " + value)); } private void Awake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0108: 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_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //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_0161: 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_017a: 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_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: 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_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0343: 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) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_039c: 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_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_040d: 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_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_053f: Unknown result type (might be due to invalid IL or missing references) //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_055a: Unknown result type (might be due to invalid IL or missing references) //IL_055f: Unknown result type (might be due to invalid IL or missing references) //IL_0575: Unknown result type (might be due to invalid IL or missing references) //IL_057a: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05c2: Unknown result type (might be due to invalid IL or missing references) //IL_067d: Unknown result type (might be due to invalid IL or missing references) //IL_0682: Unknown result type (might be due to invalid IL or missing references) //IL_0698: Unknown result type (might be due to invalid IL or missing references) //IL_069d: Unknown result type (might be due to invalid IL or missing references) //IL_06b3: Unknown result type (might be due to invalid IL or missing references) //IL_06b8: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_06e5: Unknown result type (might be due to invalid IL or missing references) //IL_0842: Unknown result type (might be due to invalid IL or missing references) //IL_0847: Unknown result type (might be due to invalid IL or missing references) //IL_085d: Unknown result type (might be due to invalid IL or missing references) //IL_0862: Unknown result type (might be due to invalid IL or missing references) //IL_0878: Unknown result type (might be due to invalid IL or missing references) //IL_087d: Unknown result type (might be due to invalid IL or missing references) //IL_0893: Unknown result type (might be due to invalid IL or missing references) //IL_0898: Unknown result type (might be due to invalid IL or missing references) //IL_08ae: Unknown result type (might be due to invalid IL or missing references) //IL_08b3: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_08d6: Unknown result type (might be due to invalid IL or missing references) //IL_08ea: Unknown result type (might be due to invalid IL or missing references) //IL_08ef: Unknown result type (might be due to invalid IL or missing references) //IL_0af9: Unknown result type (might be due to invalid IL or missing references) //IL_0afe: Unknown result type (might be due to invalid IL or missing references) //IL_0b14: Unknown result type (might be due to invalid IL or missing references) //IL_0b19: Unknown result type (might be due to invalid IL or missing references) //IL_0b2f: Unknown result type (might be due to invalid IL or missing references) //IL_0b34: Unknown result type (might be due to invalid IL or missing references) //IL_0b52: Unknown result type (might be due to invalid IL or missing references) //IL_0b66: Unknown result type (might be due to invalid IL or missing references) //IL_0b7a: Unknown result type (might be due to invalid IL or missing references) //IL_0b7f: Unknown result type (might be due to invalid IL or missing references) //IL_0be5: Unknown result type (might be due to invalid IL or missing references) //IL_0bea: Unknown result type (might be due to invalid IL or missing references) //IL_0c00: Unknown result type (might be due to invalid IL or missing references) //IL_0c05: Unknown result type (might be due to invalid IL or missing references) //IL_0c1b: Unknown result type (might be due to invalid IL or missing references) //IL_0c20: Unknown result type (might be due to invalid IL or missing references) //IL_0c36: Unknown result type (might be due to invalid IL or missing references) //IL_0c3b: Unknown result type (might be due to invalid IL or missing references) //IL_0c59: Unknown result type (might be due to invalid IL or missing references) //IL_0c6d: Unknown result type (might be due to invalid IL or missing references) //IL_0c81: Unknown result type (might be due to invalid IL or missing references) //IL_0c86: Unknown result type (might be due to invalid IL or missing references) //IL_0db8: Unknown result type (might be due to invalid IL or missing references) //IL_0dbd: Unknown result type (might be due to invalid IL or missing references) //IL_0dd3: Unknown result type (might be due to invalid IL or missing references) //IL_0dd8: Unknown result type (might be due to invalid IL or missing references) //IL_0dee: Unknown result type (might be due to invalid IL or missing references) //IL_0df3: Unknown result type (might be due to invalid IL or missing references) //IL_0e11: Unknown result type (might be due to invalid IL or missing references) //IL_0e16: Unknown result type (might be due to invalid IL or missing references) //IL_0e2a: Unknown result type (might be due to invalid IL or missing references) //IL_0e3e: Unknown result type (might be due to invalid IL or missing references) //IL_0e7d: Unknown result type (might be due to invalid IL or missing references) //IL_0e82: Unknown result type (might be due to invalid IL or missing references) //IL_0e98: Unknown result type (might be due to invalid IL or missing references) //IL_0e9d: Unknown result type (might be due to invalid IL or missing references) //IL_0eb3: Unknown result type (might be due to invalid IL or missing references) //IL_0eb8: Unknown result type (might be due to invalid IL or missing references) //IL_0ed6: Unknown result type (might be due to invalid IL or missing references) //IL_0edb: Unknown result type (might be due to invalid IL or missing references) //IL_0eef: Unknown result type (might be due to invalid IL or missing references) //IL_0f03: Unknown result type (might be due to invalid IL or missing references) //IL_104a: Unknown result type (might be due to invalid IL or missing references) //IL_104f: Unknown result type (might be due to invalid IL or missing references) //IL_1065: Unknown result type (might be due to invalid IL or missing references) //IL_106a: Unknown result type (might be due to invalid IL or missing references) //IL_1085: Unknown result type (might be due to invalid IL or missing references) //IL_108a: Unknown result type (might be due to invalid IL or missing references) //IL_108f: Unknown result type (might be due to invalid IL or missing references) //IL_1094: Unknown result type (might be due to invalid IL or missing references) //IL_11ba: Unknown result type (might be due to invalid IL or missing references) //IL_11bf: Unknown result type (might be due to invalid IL or missing references) //IL_11d5: Unknown result type (might be due to invalid IL or missing references) //IL_11da: Unknown result type (might be due to invalid IL or missing references) //IL_11f0: Unknown result type (might be due to invalid IL or missing references) //IL_11f5: Unknown result type (might be due to invalid IL or missing references) //IL_120b: Unknown result type (might be due to invalid IL or missing references) //IL_1210: Unknown result type (might be due to invalid IL or missing references) //IL_1226: Unknown result type (might be due to invalid IL or missing references) //IL_122b: Unknown result type (might be due to invalid IL or missing references) //IL_1241: Unknown result type (might be due to invalid IL or missing references) //IL_1246: Unknown result type (might be due to invalid IL or missing references) //IL_125c: Unknown result type (might be due to invalid IL or missing references) //IL_1261: Unknown result type (might be due to invalid IL or missing references) //IL_127f: Unknown result type (might be due to invalid IL or missing references) //IL_1284: Unknown result type (might be due to invalid IL or missing references) //IL_1298: Unknown result type (might be due to invalid IL or missing references) //IL_12ac: Unknown result type (might be due to invalid IL or missing references) //IL_1394: Unknown result type (might be due to invalid IL or missing references) //IL_1399: Unknown result type (might be due to invalid IL or missing references) //IL_13af: Unknown result type (might be due to invalid IL or missing references) //IL_13b4: Unknown result type (might be due to invalid IL or missing references) //IL_13ca: Unknown result type (might be due to invalid IL or missing references) //IL_13cf: Unknown result type (might be due to invalid IL or missing references) //IL_1409: Unknown result type (might be due to invalid IL or missing references) //IL_140e: Unknown result type (might be due to invalid IL or missing references) //IL_1422: Unknown result type (might be due to invalid IL or missing references) //IL_1427: Unknown result type (might be due to invalid IL or missing references) //IL_146e: Unknown result type (might be due to invalid IL or missing references) //IL_1473: Unknown result type (might be due to invalid IL or missing references) //IL_1478: Unknown result type (might be due to invalid IL or missing references) //IL_147d: Unknown result type (might be due to invalid IL or missing references) //IL_159f: Unknown result type (might be due to invalid IL or missing references) //IL_15a4: Unknown result type (might be due to invalid IL or missing references) //IL_15ba: Unknown result type (might be due to invalid IL or missing references) //IL_15bf: Unknown result type (might be due to invalid IL or missing references) //IL_15dd: Unknown result type (might be due to invalid IL or missing references) //IL_15f1: Unknown result type (might be due to invalid IL or missing references) //IL_15f6: Unknown result type (might be due to invalid IL or missing references) //IL_15fb: Unknown result type (might be due to invalid IL or missing references) //IL_1728: Unknown result type (might be due to invalid IL or missing references) //IL_172d: Unknown result type (might be due to invalid IL or missing references) //IL_1748: Unknown result type (might be due to invalid IL or missing references) //IL_175c: Unknown result type (might be due to invalid IL or missing references) //IL_1761: Unknown result type (might be due to invalid IL or missing references) //IL_1766: Unknown result type (might be due to invalid IL or missing references) //IL_1933: Unknown result type (might be due to invalid IL or missing references) //IL_1954: Unknown result type (might be due to invalid IL or missing references) //IL_09a6: Unknown result type (might be due to invalid IL or missing references) //IL_09ab: Unknown result type (might be due to invalid IL or missing references) //IL_09c1: Unknown result type (might be due to invalid IL or missing references) //IL_09c6: Unknown result type (might be due to invalid IL or missing references) //IL_09e4: Unknown result type (might be due to invalid IL or missing references) //IL_09e9: Unknown result type (might be due to invalid IL or missing references) //IL_09ee: Unknown result type (might be due to invalid IL or missing references) //IL_09f3: Unknown result type (might be due to invalid IL or missing references) //IL_1103: Unknown result type (might be due to invalid IL or missing references) //IL_111c: Unknown result type (might be due to invalid IL or missing references) //IL_166e: Unknown result type (might be due to invalid IL or missing references) //IL_1673: Unknown result type (might be due to invalid IL or missing references) //IL_1678: Unknown result type (might be due to invalid IL or missing references) //IL_1684: Unknown result type (might be due to invalid IL or missing references) //IL_1693: Unknown result type (might be due to invalid IL or missing references) //IL_169f: Unknown result type (might be due to invalid IL or missing references) //IL_16ab: Unknown result type (might be due to invalid IL or missing references) //IL_16ba: Unknown result type (might be due to invalid IL or missing references) //IL_0a62: Unknown result type (might be due to invalid IL or missing references) //IL_0a7b: Unknown result type (might be due to invalid IL or missing references) //IL_1b63: Unknown result type (might be due to invalid IL or missing references) //IL_1b6d: Expected O, but got Unknown almacen = new GameObject("AdornosMod almacen"); almacen.SetActive(false); Object.DontDestroyOnLoad((Object)(object)almacen); string text = (carpetaMod = Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location)); try { string text2 = Path.Combine(text, "Shields"); if (!Directory.Exists(text2)) { text2 = Path.Combine(text, "Escudos"); } CargarEscudos(text2); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)("ESCUDOS: " + ex)); } try { CargarMjolnir(text); } catch (Exception ex2) { ((BaseUnityPlugin)this).Logger.LogError((object)("MJOLNIR: " + ex2)); } try { CrearObjeto("Casco", "viking helmet", 20461, HacerMallaCasco(), new string[3] { "Color interior", "Color hierro", "Color bandas" }, (Color[])(object)new Color[3] { new Color(0.3f, 0.2f, 0.13f), new Color(0.42f, 0.42f, 0.44f), new Color(0.3f, 0.29f, 0.28f) }, 350, 2f, new Vector3(-412.89f, 3.29f, 285.45f), Vector3.zero, new Vector3(0f, -0.05f, -0.2f), new Vector3(50f, 180f, 0f)); } catch (Exception ex3) { ((BaseUnityPlugin)this).Logger.LogError((object)("CASCO: " + ex3)); } try { CrearObjeto("Espada", "viking sword", 20462, HacerMallaEspada(), new string[3] { "Color hoja", "Color empunadura", "Color guarda y pomo" }, (Color[])(object)new Color[3] { new Color(0.55f, 0.55f, 0.58f), new Color(0.4f, 0.26f, 0.16f), new Color(0.62f, 0.48f, 0.22f) }, 450, 1.5f, new Vector3(-412.89f, 3.29f, 284f), new Vector3(90f, 0f, 0f), new Vector3(0f, 0.1f, -0.13f), Vector3.zero); } catch (Exception ex4) { ((BaseUnityPlugin)this).Logger.LogError((object)("ESPADA: " + ex4)); } try { string[] nombresColor = new string[4] { "Color maceta", "Color tierra", "Color tronco", "Color hojas" }; CrearObjeto("Bonsai pino", "pine bonsai", 20530, HacerBonsaiPino(), nombresColor, (Color[])(object)new Color[4] { new Color(0.55f, 0.28f, 0.2f), new Color(0.3f, 0.22f, 0.15f), new Color(0.36f, 0.27f, 0.2f), new Color(0.18f, 0.36f, 0.17f) }, 250, 3f, new Vector3(-412.2f, 3.29f, 285.45f), Vector3.zero, Vector3.zero, Vector3.zero, "floor", "island 17 M (mount malefic) scenery"); CrearObjeto("Bonsai arce", "maple bonsai", 20531, HacerBonsaiArce(), nombresColor, (Color[])(object)new Color[4] { new Color(0.55f, 0.42f, 0.38f), new Color(0.24f, 0.16f, 0.11f), new Color(0.4f, 0.32f, 0.26f), new Color(0.82f, 0.12f, 0.16f) }, 250, 3f, new Vector3(-411.6f, 3.29f, 285.45f), Vector3.zero, Vector3.zero, Vector3.zero, "floor", "island 17 M (mount malefic) scenery"); CrearObjeto("Bonsai cerezo", "cherry bonsai", 20532, HacerBonsaiCerezo(), new string[7] { "Color maceta", "Color tierra", "Color tronco", "Color flores", "Color flores claras", "Color musgo", "Color hojitas" }, (Color[])(object)new Color[7] { new Color(0.42f, 0.44f, 0.46f), new Color(0.3f, 0.22f, 0.15f), new Color(0.26f, 0.21f, 0.19f), new Color(0.96f, 0.6f, 0.72f), new Color(0.99f, 0.82f, 0.88f), new Color(0.33f, 0.47f, 0.22f), new Color(0.5f, 0.65f, 0.25f) }, 300, 4f, new Vector3(-411f, 3.29f, 285.45f), Vector3.zero, Vector3.zero, Vector3.zero, "floor", "island 17 M (mount malefic) scenery"); } catch (Exception ex5) { ((BaseUnityPlugin)this).Logger.LogError((object)("BONSAIS: " + ex5)); } try { escalaIncensario = Mathf.Clamp(B("Incensario", "Tamano", 1.6f, "Incense burner scale (1 = 14 cm tall, real size; 1.6 = game scale). Needs a game restart").Value, 0.5f, 4f); CrearObjeto("Incensario", "incense burner", 20533, HacerIncensario(), new string[3] { "Color bronce", "Color huecos", "Color patina" }, (Color[])(object)new Color[3] { new Color(0.55f, 0.37f, 0.17f), new Color(0.1f, 0.08f, 0.05f), new Color(0.3f, 0.46f, 0.36f) }, 220, 2f, new Vector3(-410.4f, 3.29f, 285.45f), Vector3.zero, Vector3.zero, Vector3.zero, "floor", "island 17 M (mount malefic) scenery"); Adorno adorno = adornos.Find((Adorno z) => z.nombre == "Incensario"); if (adorno != null && (Object)(object)adorno.prefab != (Object)null) { ConfigEntry<float> val = B("Incensario", "Brillo metal", 0.35f, "How shiny the bronze is (0 = matte, 0.6 = very polished). Needs a game restart"); Metalizar(((Renderer)adorno.prefab.GetComponent<MeshRenderer>()).sharedMaterials[0], 0.75f, Mathf.Clamp01(val.Value)); } teclaIncienso = B<KeyCode>("Incensario", "Tecla encender", (KeyCode)114, "Looking at an incense burner, lights it or puts it out (right click also works)"); IncensoItem.minutos = B("Incensario", "Minutos encendido", 10f, "How long it burns before going out by itself (0 = never)").Value; } catch (Exception ex6) { ((BaseUnityPlugin)this).Logger.LogError((object)("INCENSARIO: " + ex6)); } try { CrearObjeto("Katana", "katana", 20534, HacerKatana(), new string[5] { "Color hoja", "Color guarda y remates", "Color dorados", "Color piel del puno", "Color cordon" }, (Color[])(object)new Color[5] { new Color(0.74f, 0.76f, 0.79f), new Color(0.22f, 0.22f, 0.24f), new Color(0.8f, 0.62f, 0.26f), new Color(0.88f, 0.85f, 0.76f), new Color(0.07f, 0.06f, 0.06f) }, 600, 1.2f, new Vector3(-409.6f, 3.29f, 285.45f), Vector3.zero, new Vector3(0f, 0.02f, -0.12f), Vector3.zero, "wall", "island 17 M (mount malefic) scenery"); Adorno adorno2 = adornos.Find((Adorno z) => z.nombre == "Katana"); if (adorno2 != null && (Object)(object)adorno2.prefab != (Object)null) { Metalizar(((Renderer)adorno2.prefab.GetComponent<MeshRenderer>()).sharedMaterials[0], 0.8f, 0.5f); } CrearObjeto("Soporte katana", "katana stand", 20535, HacerSoporteKatana(), new string[2] { "Color madera", "Color adornos" }, (Color[])(object)new Color[2] { new Color(0.42f, 0.09f, 0.07f), new Color(0.8f, 0.62f, 0.26f) }, 150, 3f, new Vector3(-409.6f, 3.29f, 284.6f), Vector3.zero, Vector3.zero, Vector3.zero, "floor", "island 17 M (mount malefic) scenery"); Adorno adorno3 = adornos.Find((Adorno z) => z.nombre == "Soporte katana"); if (adorno3 != null && (Object)(object)adorno3.prefab != (Object)null) { BoxCollider component = adorno3.prefab.GetComponent<BoxCollider>(); component.center = new Vector3(0f, 0.012f, 0f); component.size = new Vector3(0.9f, 0.024f, 0.13f); } } catch (Exception ex7) { ((BaseUnityPlugin)this).Logger.LogError((object)("KATANA: " + ex7)); } string[] array; try { CrearObjeto("Zweihander", "zweihander", 20536, HacerZweihander(), new string[3] { "Color hoja", "Color guarda y pomo", "Color cuero" }, (Color[])(object)new Color[3] { new Color(0.74f, 0.76f, 0.79f), new Color(0.24f, 0.24f, 0.26f), new Color(0.33f, 0.2f, 0.12f) }, 900, 3.5f, new Vector3(-411.5f, 3.29f, 283.4f), new Vector3(90f, 0f, 0f), new Vector3(0f, 0.1f, -0.13f), Vector3.zero, "wall", "island 17 M (mount malefic) scenery"); CrearObjeto("Cimitarra", "scimitar", 20537, HacerCimitarra(), new string[4] { "Color hoja", "Color dorados", "Color cuero", "Color piedras" }, (Color[])(object)new Color[4] { new Color(0.74f, 0.76f, 0.79f), new Color(0.8f, 0.62f, 0.26f), new Color(0.33f, 0.2f, 0.12f), new Color(0.55f, 0.06f, 0.08f) }, 500, 1.4f, new Vector3(-412.2f, 3.32f, 285.45f), new Vector3(90f, 0f, 0f), new Vector3(0f, 0.1f, -0.13f), Vector3.zero, "wall", "island 17 M (mount malefic) scenery"); array = new string[2] { "Zweihander", "Cimitarra" }; foreach (string n in array) { Adorno adorno4 = adornos.Find((Adorno z) => z.nombre == n); if (adorno4 != null && !((Object)(object)adorno4.prefab == (Object)null)) { Material[] sharedMaterials = ((Renderer)adorno4.prefab.GetComponent<MeshRenderer>()).sharedMaterials; Metalizar(sharedMaterials[0], 0.8f, 0.5f); Metalizar(sharedMaterials[1], 0.7f, 0.35f); } } } catch (Exception ex8) { ((BaseUnityPlugin)this).Logger.LogError((object)("ESPADAS: " + ex8)); } try { Mesh malla = HacerYelmo(); string[] nombresColor2 = new string[3] { "Color metal", "Color dorados", "Color rendijas" }; CrearObjeto("Yelmo cruzado", "crusader helm", 20538, malla, nombresColor2, (Color[])(object)new Color[3] { new Color(0.62f, 0.64f, 0.67f), new Color(0.8f, 0.62f, 0.28f), new Color(0.03f, 0.03f, 0.03f) }, 450, 2.5f, new Vector3(-411.6f, 3.29f, 285.45f), Vector3.zero, new Vector3(0f, -0.05f, -0.2f), new Vector3(50f, 180f, 0f), "wall", "island 17 M (mount malefic) scenery"); CrearObjeto("Yelmo cruzado negro", "black crusader helm", 20539, malla, nombresColor2, (Color[])(object)new Color[3] { new Color(0.09f, 0.09f, 0.1f), new Color(0.95f, 0.74f, 0.28f), new Color(0f, 0f, 0f) }, 550, 2.5f, new Vector3(-411f, 3.29f, 285.45f), Vector3.zero, new Vector3(0f, -0.05f, -0.2f), new Vector3(50f, 180f, 0f), "wall", "island 17 M (mount malefic) scenery"); array = new string[2] { "Yelmo cruzado", "Yelmo cruzado negro" }; foreach (string n2 in array) { Adorno adorno5 = adornos.Find((Adorno z) => z.nombre == n2); if (adorno5 != null && !((Object)(object)adorno5.prefab == (Object)null)) { float brillo = Mathf.Clamp01(B(n2, "Brillo metal", 0.45f, "How shiny it is (0 = matte, 0.8 = mirror). Needs a game restart").Value); Material[] sharedMaterials2 = ((Renderer)adorno5.prefab.GetComponent<MeshRenderer>()).sharedMaterials; Metalizar(sharedMaterials2[0], 0.6f, brillo); Metalizar(sharedMaterials2[1], 0.6f, brillo); } } } catch (Exception ex9) { ((BaseUnityPlugin)this).Logger.LogError((object)("YELMOS: " + ex9)); } try { CrearObjeto("Soporte casco", "helmet stand", 20540, HacerSoporteCasco(), new string[2] { "Color madera", "Color marca delante" }, (Color[])(object)new Color[2] { new Color(0.22f, 0.13f, 0.08f), new Color(0.8f, 0.62f, 0.26f) }, 120, 2f, new Vector3(-410.4f, 3.29f, 285.45f), Vector3.zero, Vector3.zero, Vector3.zero, "floor", "island 17 M (mount malefic) scenery"); Adorno adorno6 = adornos.Find((Adorno z) => z.nombre == "Soporte casco"); if (adorno6 != null && (Object)(object)adorno6.prefab != (Object)null) { BoxCollider component2 = adorno6.prefab.GetComponent<BoxCollider>(); component2.center = new Vector3(0f, 0.016f, 0f); component2.size = new Vector3(0.2f, 0.032f, 0.2f); } } catch (Exception ex10) { ((BaseUnityPlugin)this).Logger.LogError((object)("SOPORTE CASCO: " + ex10)); } try { CrearObjeto("Kabuto", "kabuto", 20541, HacerKabuto(), new string[7] { "Color laca", "Color dorados", "Color cordones", "Color interior", "Color mascara", "Color dientes", "Color boca" }, (Color[])(object)new Color[7] { new Color(0.07f, 0.06f, 0.06f), new Color(0.92f, 0.72f, 0.28f), new Color(0.55f, 0.08f, 0.08f), new Color(0.02f, 0.02f, 0.02f), new Color(0.12f, 0.115f, 0.11f), new Color(0.9f, 0.87f, 0.78f), new Color(0.02f, 0.02f, 0.02f) }, 700, 3f, new Vector3(-409.8f, 3.29f, 285.45f), Vector3.zero, new Vector3(0f, -0.25f, -0.2f), new Vector3(50f, 180f, 0f), "wall", "island 17 M (mount malefic) scenery"); Adorno adorno7 = adornos.Find((Adorno z) => z.nombre == "Kabuto"); if (adorno7 != null && (Object)(object)adorno7.prefab != (Object)null) { Material[] sharedMaterials3 = ((Renderer)adorno7.prefab.GetComponent<MeshRenderer>()).sharedMaterials; Metalizar(sharedMaterials3[0], 0.1f, 0.7f); Metalizar(sharedMaterials3[1], 0.85f, 0.6f); } } catch (Exception ex11) { ((BaseUnityPlugin)this).Logger.LogError((object)("KABUTO: " + ex11)); } try { string[] nombresColor3 = new string[3] { "Color laton", "Color calados", "Color hierro" }; Color[] coloresSerie = (Color[])(object)new Color[3] { new Color(0.8f, 0.6f, 0.28f), new Color(0.05f, 0.04f, 0.03f), new Color(0.18f, 0.18f, 0.19f) }; CrearObjeto("Incensario colgante", "hanging incense burner", 20542, HacerIncensarioColgante(pared: false), nombresColor3, coloresSerie, 260, 2f, new Vector3(-409.2f, 3.29f, 285.45f), Vector3.zero, new Vector3(0f, -0.55f, -0.08f), Vector3.zero, "no", "island 17 M (mount malefic) scenery"); CrearObjeto("Incensario de pared", "wall incense burner", 20543, HacerIncensarioColgante(pared: true), nombresColor3, coloresSerie, 320, 3f, new Vector3(-408.6f, 3.85f, 285.45f), Vector3.zero, Vector3.zero, Vector3.zero, "wall", "island 17 M (mount malefic) scenery"); array = new string[2] { "Incensario colgante", "Incensario de pared" }; foreach (string n3 in array) { Adorno adorno8 = adornos.Find((Adorno z) => z.nombre == n3); if (adorno8 != null && !((Object)(object)adorno8.prefab == (Object)null)) { Material[] sharedMaterials4 = ((Renderer)adorno8.prefab.GetComponent<MeshRenderer>()).sharedMaterials; Metalizar(sharedMaterials4[0], 0.75f, 0.45f); Metalizar(sharedMaterials4[2], 0.5f, 0.2f); } } } catch (Exception ex12) { ((BaseUnityPlugin)this).Logger.LogError((object)("INCENSARIOS COLGANTES: " + ex12)); } try { CrearObjeto("Espadero", "sword rack", 20544, HacerEspadero(), new string[2] { "Color madera", "Color clavos" }, (Color[])(object)new Color[2] { new Color(0.55f, 0.38f, 0.2f), new Color(0.12f, 0.12f, 0.12f) }, 300, 4f, new Vector3(-411.6f, 3.29f, 285.45f), new Vector3(-90f, 0f, 0f), Vector3.zero, Vector3.zero, "wall", "island 17 M (mount malefic) scenery"); Adorno adorno9 = adornos.Find((Adorno z) => z.nombre == "Espadero"); if (adorno9 != null && (Object)(object)adorno9.prefab != (Object)null) { BoxCollider component3 = adorno9.prefab.GetComponent<BoxCollider>(); Bounds bounds = adorno9.prefab.GetComponent<MeshFilter>().sharedMesh.bounds; component3.center = new Vector3(((Bounds)(ref bounds)).center.x, ((Bounds)(ref bounds)).center.y, -0.024f); component3.size = new Vector3(((Bounds)(ref bounds)).size.x, ((Bounds)(ref bounds)).size.y, 0.024f); } } catch (Exception ex13) { ((BaseUnityPlugin)this).Logger.LogError((object)("ESPADERO: " + ex13)); } try { CrearObjeto("Soporte lampara", "lamp bracket", 20545, HacerSoporteLampara(), new string[1] { "Color hierro" }, (Color[])(object)new Color[1] { new Color(0.18f, 0.18f, 0.19f) }, 120, 2f, new Vector3(-411f, 3.29f, 285.45f), new Vector3(-90f, 0f, 0f), Vector3.zero, Vector3.zero, "wall", "island 17 M (mount malefic) scenery"); Adorno adorno10 = adornos.Find((Adorno z) => z.nombre == "Soporte lampara"); if (adorno10 != null && (Object)(object)adorno10.prefab != (Object)null) { Metalizar(((Renderer)adorno10.prefab.GetComponent<MeshRenderer>()).sharedMaterials[0], 0.5f, 0.2f); } } catch (Exception ex14) { ((BaseUnityPlugin)this).Logger.LogError((object)("SOPORTE LAMPARA: " + ex14)); } array = new string[1] { "Kabuto" }; foreach (string n4 in array) { Adorno adorno11 = adornos.Find((Adorno z) => z.nombre == n4); if (adorno11 != null) { adorno11.noVender = true; } } try { PrepararGincana(text); } catch (Exception ex15) { ((BaseUnityPlugin)this).Logger.LogError((object)("GINCANA: " + ex15)); } ((BaseUnityPlugin)this).Logger.LogInfo((object)("Sailor's Keepsakes loaded with " + adornos.Count + " items")); ConfigEntry<bool> obj = B("Gancho", "Vender gancho", valor: false, "Also sell a game hook in the tavern, to hang the items (HooksHangMore). Needs a game restart"); nombreGancho = B("Gancho", "Nombre del gancho", "hook", "Only if the game lamp hook is not found: part of the name of the item to sell. Needs a game restart"); if (obj.Value) { Adorno adorno12 = new Adorno(); adorno12.nombre = "Gancho"; adorno12.delJuego = true; adorno12.tiendaPos = B<Vector3>("Gancho", "Tienda sitio", new Vector3(-412.89f, 3.29f, 286.1f), "Where it is sold in the tavern (relative to the island)"); adorno12.tiendaGiro = B<Vector3>("Gancho", "Tienda giro", Vector3.zero, "Rotation in the shop, in degrees"); adornos.Add(adorno12); } aColocar = B("General", "Adorno a colocar con F10", "Escudos", "Only for the author (debug build): which item the place key moves"); teclaColocar = B<KeyCode>("General", "Tecla colocar", (KeyCode)292, "Only for the author (debug build): look at a spot and press it to move the chosen shop there"); rumoresActivos = B("Rumores", "Activos", valor: true, "Tavern sailors (when you buy them a drink) sometimes tell clues about the Mjolnir"); rumores = B("Rumores", "Textos", "The sirens still sing of a hammer lost long ago. Listen where their song is sung.", "Rumors, separated by |. They are mixed with the game special rumors"); probRumor = B("Rumores", "Probabilidad (%)", 15f, "Out of 100 drinks given to a sailor, how many (roughly) end in our clue"); venderDeNoche = B("General", "Vender de noche", valor: true, "Items stay in the shops at night too (the game normally hides shop items from 18:00 to 7:00)"); List<string> list = new List<string>(); foreach (Adorno adorno13 in adornos) { if (!adorno13.delJuego && !((Object)(object)adorno13.prefab == (Object)null) && !(adorno13.nombre == "Kabuto")) { string es = ((adorno13.tipo != null) ? ("Escudo " + adorno13.tipo.forma) : adorno13.nombre); if (adorno13.tipo != null && adorno13.tipo.nombre == "Cometa sin umbo") { es = "Escudo cometa sin umbo"; } es = Ingles(es); if (!list.Contains(es)) { list.Add(es); } } } list.Add(Ingles("Gancho")); if (teclasPruebas) { generarActivo = B("Generar objeto", "Activo", valor: true, "Lets you spawn the mod items with the key (free, in front of you)"); generarCual = B("Generar objeto", "Objeto", list[0], new ConfigDescription("The item that appears when you press the key", (AcceptableValueBase)(object)new AcceptableValueList<string>(list.ToArray()), Array.Empty<object>())); generarTecla = B<KeyCode>("Generar objeto", "Tecla", (KeyCode)288, "Key to spawn the chosen item in front of you"); } OcultarAvanzado(); SceneManager.sceneLoaded += AlCargarEscena; yo = this; Harmony.CreateAndPatchAll(typeof(ParcheDirectorio), "com.vikingdmike.adornosmod"); try { Harmony.CreateAndPatchAll(typeof(ParcheMirar), "com.vikingdmike.adornosmod.mirar"); } catch (Exception ex16) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("No pude poner los iconos del incensario: " + ex16.Message)); } if ((Object)(object)PrefabsDirectory.instance != (Object)null) { InsertarEnDirectorio(PrefabsDirectory.instance, rehacerItems: true); } ((MonoBehaviour)this).StartCoroutine(Registrar()); } private static void Metalizar(Material m, float metal, float brillo) { m.SetFloat("_Metallic", metal); m.SetFloat("_Glossiness", brillo); m.SetFloat("_SpecularHighlights", 1f); m.DisableKeyword("_SPECULARHIGHLIGHTS_OFF"); m.SetFloat("_GlossyReflections", 1f); m.DisableKeyword("_GLOSSYREFLECTIONS_OFF"); } private static Material HacerMaterial(Color c) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown Shader val = Shader.Find("Standard"); if ((Object)(object)val == (Object)null) { val = Shader.Find("Legacy Shaders/Diffuse"); } Material val2 = new Material(val) { color = c }; val2.SetFloat("_Glossiness", 0f); val2.SetFloat("_Metallic", 0f); val2.SetFloat("_SpecularHighlights", 0f); val2.EnableKeyword("_SPECULARHIGHLIGHTS_OFF"); val2.SetFloat("_GlossyReflections", 0f); val2.EnableKeyword("_GLOSSYREFLECTIONS_OFF"); return val2; } private void CargarEscudos(string carpeta) { //IL_001d: 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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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_0118: Expected O, but got Unknown //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: 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_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Unknown result type (might be due to invalid IL or missing references) //IL_0502: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_055c: 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_0577: Unknown result type (might be due to invalid IL or missing references) //IL_057c: Unknown result type (might be due to invalid IL or missing references) //IL_059b: Unknown result type (might be due to invalid IL or missing references) //IL_05a0: Unknown result type (might be due to invalid IL or missing references) //IL_05b6: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Unknown result type (might be due to invalid IL or missing references) //IL_05d1: Unknown result type (might be due to invalid IL or missing references) //IL_05d6: Unknown result type (might be due to invalid IL or missing references) //IL_072e: Unknown result type (might be due to invalid IL or missing references) //IL_0738: Expected O, but got Unknown //IL_0756: Unknown result type (might be due to invalid IL or missing references) //IL_0783: Unknown result type (might be due to invalid IL or missing references) //IL_084e: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) string sec = "Escudos"; colorEscudoMadera = B<Color>(sec, "Color madera y cuero", new Color(0.36f, 0.24f, 0.15f), "Color of the back, rim and handle (all shapes). Needs a game restart").Value; colorEscudoMetal = B<Color>(sec, "Color metal", new Color(0.42f, 0.42f, 0.44f), "Color of the boss (the metal center of the round shields). Needs a game restart").Value; ConfigEntry<bool> val = B(sec, "Activos", valor: true, "Sell the round shields (folder Shields/Round). Needs a game restart"); ConfigEntry<float> val2 = B(sec, "Diametro", 1f, "Shield diameter in meters (a real viking one: about 0.85). Needs a game restart"); TipoEscudo tipoEscudo = new TipoEscudo { nombre = "Escudos", forma = "redondo" }; Adorno adorno = new Adorno(); adorno.precio = B(sec, "Precio", 300, "Price of each shield. Needs a game restart"); adorno.clavar = B(sec, "Clavar con martillo", "floor", new ConfigDescription("wall / floor / no: how the game hammer fixes it. Needs a game restart", (AcceptableValueBase)(object)new AcceptableValueList<string>(new string[3] { "wall", "floor", "no" }), Array.Empty<object>())); adorno.colgarPos = B<Vector3>(sec, "Colgar posicion", new Vector3(0f, 0f, -0.1f), "Position relative to the hook (HooksHangMore). Updates at once if already hanging"); adorno.colgarGiro = B<Vector3>(sec, "Colgar giro", new Vector3(0f, 180f, 0f), "Rotation relative to the hook. Updates at once if already hanging"); tipoEscudo.isla = B(sec, "Tienda isla", "island 17 M (mount malefic) scenery", "Island where they are sold"); ConfigEntry<Vector3> item = B<Vector3>(sec, "Tienda sitio", new Vector3(-413.79f, 2.62f, 281.59f), "Where the first shield of row 1 goes (relative to the island)"); ConfigEntry<Vector3> val3 = B<Vector3>(sec, "Tienda giro", new Vector3(1f, 10f, 0f), "Rotation of the row 1 shields, in degrees"); tipoEscudo.separacion = B(sec, "Tienda separacion", 0.95f, "Distance between one shield and the next in the shop, in meters"); int[] array = new int[3] { 8, 4, 0 }; for (int i = 1; i <= 3; i++) { tipoEscudo.cuantos.Add(B(sec, "Fila " + i + " cuantos", array[i - 1], "How many shields fit in row " + i + ". The rest go to the next row. Needs a game restart")); Vector3 val4; switch (i) { case 1: tipoEscudo.sitio.Add(item); tipoEscudo.giro.Add(val3); continue; default: val4 = new Vector3(-413.74f, 2.62f, 279.07f); break; case 2: val4 = new Vector3(-409.9321f, 3.7405f, 280.7356f); break; } Vector3 valor = val4; tipoEscudo.sitio.Add(B<Vector3>(sec, "Fila " + i + " sitio", valor, "Where the first shield of row " + i + " goes (relative to the island)")); tipoEscudo.giro.Add(B<Vector3>(sec, "Fila " + i + " giro", val3.Value, "Rotation of the row " + i + " shields")); } tiposEscudo.Add(tipoEscudo); string text = Path.Combine(carpeta, "Round"); if (!Directory.Exists(text)) { text = Path.Combine(carpeta, "Redondos"); } if (!Directory.Exists(text)) { text = carpeta; } if (val.Value) { CargarFormaEscudo(tipoEscudo, text, 20440, "escudo ", HacerMallaEscudo(Contorno("redondo"), val2.Value / 2f, umbo: true, 1.4f), adorno); } string[] array2 = new string[3] { "cometa", "cometa sin umbo", "caballero" }; string[] array3 = new string[3] { "Cometa", "Cometa sin umbo", "Caballero" }; string[] array4 = new string[3] { "Kite", "Plain kite", "Knight" }; string[] array5 = new string[3] { "Cometa", "Cometa sin umbo", "Caballero" }; float[] array6 = new float[3] { 1.6f, 1.6f, 0.95f }; float[] array7 = new float[3] { 0.8f, 0.8f, 0.9f }; string[] array8 = new string[3] { "island 17 M (mount malefic) scenery", "island 34 M (monastery)|_scenery", "island 19 M (Eastwind) scenery" }; int[][] array9 = new int[3][] { new int[3] { 6, 0, 0 }, new int[3] { 3, 2, 1 }, new int[3] { 6, 0, 0 } }; Vector3[][] array10 = new Vector3[3][] { (Vector3[])(object)new Vector3[3] { new Vector3(-424.03f, 3.91f, 298.69f), new Vector3(-424.03f, 5.81f, 298.69f), new Vector3(-424.03f, 7.71f, 298.69f) }, (Vector3[])(object)new Vector3[3] { new Vector3(416.73f, 4.19f, 392.02f), new Vector3(416.1f, 4.15f, 389.73f), new Vector3(418.19f, 4.03f, 387.83f) }, (Vector3[])(object)new Vector3[3] { new Vector3(296.89f, 2.76f, -104.65f), new Vector3(296.89f, 4.01f, -104.65f), new Vector3(296.89f, 5.26f, -104.65f) } }; float[][] array11 = new float[3][] { new float[3] { -45f, -45f, -45f }, new float[3] { 130f, 43f, 43f }, new float[3] { 87f, 87f, 87f } }; int[] array12 = new int[3] { 20470, 20510, 20490 }; for (int j = 0; j < 3; j++) { string sec2 = "Escudos " + array2[j]; ConfigEntry<bool> val5 = B(sec2, "Activos", valor: true, "Sell the shields of the folder Shields/" + array4[j] + ((j == 1) ? " (if missing, the Shields/Kite images are used)" : "") + ". Needs a game restart"); ConfigEntry<float> val6 = B(sec2, "Alto", array6[j], "Shield height in meters (top to tip). Needs a game restart"); TipoEscudo tipoEscudo2 = new TipoEscudo { nombre = array3[j], forma = ((array2[j] == "caballero") ? "caballero" : "cometa") }; Adorno adorno2 = new Adorno(); adorno2.precio = B(sec2, "Precio", 300, "Price of each shield. Needs a game restart"); adorno2.clavar = B(sec2, "Clavar con martillo", "floor", new ConfigDescription("wall / floor / no: how the game hammer fixes it. Needs a game restart", (AcceptableValueBase)(object)new AcceptableValueList<string>(new string[3] { "wall", "floor", "no" }), Array.Empty<object>())); adorno2.colgarPos = B<Vector3>(sec2, "Colgar posicion", new Vector3(0f, 0f, -0.18f), "Position relative to the hook (HooksHangMore). Updates at once if already hanging"); adorno2.colgarGiro = B<Vector3>(sec2, "Colgar giro", new Vector3(0f, 180f, 0f), "Rotation relative to the hook. Updates at once if already hanging"); tipoEscudo2.isla = B(sec2, "Tienda isla", array8[j], "Island where they are sold"); tipoEscudo2.separacion = B(sec2, "Tienda separacion", array7[j], "Distance between one shield and the next in the shop, in meters"); for (int k = 1; k <= 3; k++) { tipoEscudo2.cuantos.Add(B(sec2, "Fila " + k + " cuantos", array9[j][k - 1], "How many shields fit in row " + k + ". The rest go to the next row. Needs a game restart")); tipoEscudo2.sitio.Add(B<Vector3>(sec2, "Fila " + k + " sitio", array10[j][k - 1], "Where the first shield of row " + k + " goes (relative to the island)")); tipoEscudo2.giro.Add(B<Vector3>(sec2, "Fila " + k + " giro", new Vector3(1f, array11[j][k - 1], 0f), "Rotation of the row " + k + " shields")); } tiposEscudo.Add(tipoEscudo2); string text2 = Path.Combine(carpeta, array4[j]); if (!Directory.Exists(text2)) { text2 = Path.Combine(carpeta, array5[j]); } if (j == 1 && !Directory.Exists(text2)) { text2 = Path.Combine(carpeta, "Kite"); } if (j == 1 && !Directory.Exists(text2)) { text2 = Path.Combine(carpeta, "Cometa"); } bool umbo = j == 0; if (val5.Value) { CargarFormaEscudo(tipoEscudo2, text2, array12[j], "escudo " + array2[j] + " ", HacerMallaEscudo(Contorno(tipoEscudo2.forma), val6.Value / 2f, umbo, 1.1f, 0.45f, 0.13f, tipoEscudo2.forma == "caballero"), adorno2); } } } private static string PrefijoIngles(string p) { return p switch { "escudo " => "round shield ", "escudo cometa " => "kite shield ", "escudo cometa sin umbo " => "plain kite shield ", "escudo caballero " => "knight shield ", _ => p, }; } private void CargarFormaEscudo(TipoEscudo t, string carpeta, int indiceBase, string prefijo, Mesh malla, Adorno comun) { //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Expected O, but got Unknown //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Expected O, but got Unknown //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_03ff: Unknown result type (might be due to invalid IL or missing references) if (!Directory.Exists(carpeta)) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("ESCUDOS: no hay carpeta " + carpeta)); return; } string[] files = Directory.GetFiles(carpeta, "*.png"); Array.Sort(files, (IComparer<string>?)StringComparer.OrdinalIgnoreCase); Dictionary<string, int> dictionary = new Dictionary<string, int>(); string[] array = ((!(t.forma == "redondo")) ? ((!(t.forma == "caballero")) ? new string[6] { "ring", "black_saltire", "chevrons", "norman_cross", "halves", "lozenges" } : new string[6] { "bend", "chevron", "red_cross", "quartered", "bars", "per_pale" }) : new string[12] { "rings", "cross", "quarters", "plain_wood", "rays", "whirl", "red_white", "saltire", "diagonals", "spiral", "half_sun", "three_colors" }); for (int i = 0; i < array.Length; i++) { dictionary[array[i]] = i; } string[] array2 = files; foreach (string path in array2) { if (!dictionary.ContainsKey(Path.GetFileNameWithoutExtension(path))) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("SHIELDS: '" + Path.GetFileName(path) + "' is not one of the shop shields and is ignored (replace an existing image instead)")); } } int count = t.cuantos.Count; for (int k = 0; k < files.Length; k++) { string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(files[k]); if (!dictionary.ContainsKey(fileNameWithoutExtension)) { continue; } Texture2D val = new Texture2D(2, 2, (TextureFormat)4, true); if (!ImageConversion.LoadImage(val, File.ReadAllBytes(files[k]))) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("ESCUDOS: no puedo leer " + files[k])); continue; } ((Texture)val).wrapMode = (TextureWrapMode)1; Adorno adorno = new Adorno(); adorno.tipo = t; adorno.isla = t.isla; adorno.nombre = prefijo + fileNameWithoutExtension; adorno.nombreObjeto = PrefijoIngles(prefijo) + fileNameWithoutExtension.ToLowerInvariant().Replace('_', ' '); adorno.indice = indiceBase + dictionary[fileNameWithoutExtension]; adorno.precio = comun.precio; adorno.clavar = comun.clavar; adorno.colgarPos = comun.colgarPos; adorno.colgarGiro = comun.colgarGiro; int num = dictionary[fileNameWithoutExtension]; int l; for (l = 0; l < count && num >= Mathf.Max(0, t.cuantos[l].Value); l++) { num -= Mathf.Max(0, t.cuantos[l].Value); } adorno.separacion = t.separacion; adorno.fila = num; if (l < count) { adorno.tiendaPos = t.sitio[l]; adorno.tiendaGiro = t.giro[l]; } else { adorno.tiendaPos = null; adorno.tiendaGiro = null; } GameObject val2 = new GameObject(adorno.nombreObjeto); val2.transform.SetParent(almacen.transform, false); val2.AddComponent<MeshFilter>().sharedMesh = malla; Material val3 = HacerMaterial(Color.white); val3.mainTexture = (Texture)(object)val; ((Renderer)val2.AddComponent<MeshRenderer>()).sharedMaterials = (Material[])(object)new Material[3] { val3, HacerMaterial(colorEscudoMadera), HacerMaterial(colorEscudoMetal) }; BoxCollider obj = val2.AddComponent<BoxCollider>(); Bounds bounds = malla.bounds; obj.center = ((Bounds)(ref bounds)).center; bounds = malla.bounds; obj.size = ((Bounds)(ref bounds)).size; adorno.prefab = val2; adornos.Add(adorno); ((BaseUnityPlugin)this).Logger.LogInfo((object)("ESCUDOS: '" + adorno.nombreObjeto + "' listo (posicion " + adorno.indice + ")")); } } private static List<Vector2> Contorno(string forma) { //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0161: 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_027f: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: 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) List<Vector2> list = new List<Vector2>(); if (forma == "cometa") { float num = 0.42f; float num2 = 0.42f; float num3 = 1f - num2; for (int i = 0; i < 24; i++) { float num4 = (float)Math.PI * (float)i / 24f; list.Add(new Vector2(num * Mathf.Cos(num4), num3 + num2 * Mathf.Sin(num4))); } for (int j = 0; j < 24; j++) { float num5 = (float)j / 24f; list.Add(new Vector2((0f - num) * Mathf.Pow(1f - Mathf.Pow(num5, 1.4f), 0.5f), num3 - num5 * (num3 + 1f))); } for (int k = 0; k < 24; k++) { float num6 = 1f - (float)k / 24f; list.Add(new Vector2(num * Mathf.Pow(1f - Mathf.Pow(num6, 1.4f), 0.5f), num3 - num6 * (num3 + 1f))); } } else if (forma == "caballero") { float num7 = 0.85f; float num8 = 0.985f; float num9 = -1f + num7 * Mathf.Sqrt(3f); list.Add(new Vector2(num7, num8)); list.Add(new Vector2(0f - num7, num8)); Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(num7, num9); float num10 = Mathf.Atan2(-1f - num9, 0f - num7) + (float)Math.PI * 2f; for (int l = 0; l < 14; l++) { float num11 = (float)Math.PI + (num10 - (float)Math.PI) * (float)l / 14f; list.Add(val + 2f * num7 * new Vector2(Mathf.Cos(num11), Mathf.Sin(num11))); } Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(0f - num7, num9); float num12 = Mathf.Atan2(-1f - num9, num7); for (int m = 0; m <= 14; m++) { float num13 = num12 - num12 * (float)m / 14f; list.Add(val2 + 2f * num7 * new Vector2(Mathf.Cos(num13), Mathf.Sin(num13))); } } else { for (int n = 0; n < 48; n++) { float num14 = (float)n * (float)Math.PI * 2f / 48f; list.Add(new Vector2(Mathf.Cos(num14), Mathf.Sin(num14))); } } return list; } private static List<Vector2> Encoger(List<Vector2> c, float d) { //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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_005b: 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) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0071: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) int count = c.Count; List<Vector2> list = new List<Vector2>(count); Vector2 val6 = default(Vector2); for (int i = 0; i < count; i++) { Vector2 val = c[i]; Vector2 val2 = c[(i + count - 1) % count]; Vector2 val3 = c[(i + 1) % count]; Vector2 val4 = val - val2; Vector2 normalized = ((Vector2)(ref val4)).normalized; val4 = val3 - val; Vector2 normalized2 = ((Vector2)(ref val4)).normalized; Vector2 val5 = new Vector2(normalized.y, 0f - normalized.x); ((Vector2)(ref val6))..ctor(normalized2.y, 0f - normalized2.x); val4 = val5 + val6; Vector2 normalized3 = ((Vector2)(ref val4)).normalized; list.Add(val - normalized3 * (d / Mathf.Max(0.3f, Vector2.Dot(normalized3, val6)))); } return list; } private static Mesh HacerMallaEscudo(List<Vector2> contorno, float escala, bool umbo, float manilla, float umboY = 0f, float umboR = 0.2f, bool bordeMetal = false) { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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) //IL_00aa: 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_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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_0116: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: 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_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: 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_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022d: 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_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025e: 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_026f: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0325: 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_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_0789: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07ab: Unknown result type (might be due to invalid IL or missing references) //IL_07b2: Expected O, but got Unknown //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_0388: 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_0396: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: 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_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: 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_03da: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_0556: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_0583: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_05a0: Unknown result type (might be due to invalid IL or missing references) //IL_05a5: Unknown result type (might be due to invalid IL or missing references) //IL_05ab: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Unknown result type (might be due to invalid IL or missing references) //IL_05c0: Unknown result type (might be due to invalid IL or missing references) //IL_05c6: Unknown result type (might be due to invalid IL or missing references) //IL_05cb: Unknown result type (might be due to invalid IL or missing references) //IL_05d6: Unknown result type (might be due to invalid IL or missing references) //IL_05db: Unknown result type (might be due to invalid IL or missing references) //IL_05e7: Unknown result type (might be due to invalid IL or missing references) //IL_05ec: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_060d: Unknown result type (might be due to invalid IL or missing references) //IL_0624: Unknown result type (might be due to invalid IL or missing references) //IL_0630: Unknown result type (might be due to invalid IL or missing references) //IL_0635: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_06a1: Unknown result type (might be due to invalid IL or missing references) //IL_06a6: Unknown result type (might be due to invalid IL or missing references) //IL_06ad: Unknown result type (might be due to invalid IL or missing references) //IL_06b2: Unknown result type (might be due to invalid IL or missing references) //IL_06b9: Unknown result type (might be due to invalid IL or missing references) //IL_06be: Unknown result type (might be due to invalid IL or missing references) //IL_06c4: Unknown result type (might be due to invalid IL or missing references) //IL_06c9: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06cd: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_06d9: Unknown result type (might be due to invalid IL or missing references) //IL_06e5: Unknown result type (might be due to invalid IL or missing references) //IL_06ea: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_0705: Unknown result type (might be due to invalid IL or missing references) //IL_070a: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_074b: Unknown result type (might be due to invalid IL or missing references) //IL_074d: Unknown result type (might be due to invalid IL or missing references) //IL_074f: Unknown result type (might be due to invalid IL or missing references) //IL_0751: Unknown result type (might be due to invalid IL or missing references) //IL_0716: Unknown result type (might be due to invalid IL or missing references) //IL_0718: Unknown result type (might be due to invalid IL or missing references) //IL_0724: Unknown result type (might be due to invalid IL or missing references) //IL_0726: Unknown result type (might be due to invalid IL or missing references) //IL_0732: Unknown result type (might be due to invalid IL or missing references) //IL_0734: Unknown result type (might be due to invalid IL or missing references) //IL_073e: Unknown result type (might be due to invalid IL or missing references) int count = contorno.Count; float num = 0.012f / 2f; float num2 = (0f - 0.012f) / 2f; Constructor constructor = new Constructor(); List<Vector2> list = Encoger(contorno, bordeMetal ? 0.075f : 0.05f); List<Vector2> list2 = Encoger(contorno, 0.03f); int sub = ((!bordeMetal) ? 1 : 2); Func<Vector2, float, Vector3> func = (Vector2 q, float z) => new Vector3(q.x * escala, q.y * escala, z); int a = constructor.Punto(new Vector3(0f, 0f, num), new Vector2(0.5f, 0.5f)); int a2 = constructor.Punto(new Vector3(0f, 0f, num2), Vector2.zero); int[] a