using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyFileVersion("0.1.1.0")] [assembly: AssemblyVersion("0.1.1.0")] public static class OliveRuntimeBridge { public static Biome SectorBiome(BiomeSector sector) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) return sector.Biome; } public static void Changed(Inventory inventory) { inventory.Changed(false, false); } public static ItemData AddItem(Inventory inventory, string name, int stack, int quality, int variant, long crafter, string crafterName, bool cheated) { return inventory.AddItem(name, stack, quality, variant, crafter, crafterName, cheated, false); } public static void SpawnItem(CookingStation station, string name, int slot, Vector3 point, bool cheated) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) station.SpawnItem(name, slot, point, cheated); } public static Vector2i GetSector(ZDO zdo) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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) Vector2s sector = zdo.GetSector(); return new Vector2i((int)sector.x, (int)sector.y); } public static Vector3 GetZonePos(Vector2i s) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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) return ZoneSystem.GetZonePos(checked(new Vector2s((short)s.x, (short)s.y))); } public static List GetPortals(ZDOMan manager) { return manager.GetPortals().Values.SelectMany((List v) => v).Distinct().ToList(); } public static Dictionary EnemyStats(PlayerProfile profile) { return profile.m_playerStats[0].m_enemyStats[0]; } public static Color NoForest(Minimap map) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) return Minimap.s_noForestColor; } public static bool IsTeleportable(Humanoid humanoid) { return humanoid.IsTeleportable(false); } public static bool FindZdos(ZDOMan manager, List prefabs, List zdos, ref int index) { HashSet hashSet = new HashSet(prefabs.Select((string p) => StringExtensionMethods.GetStableHashCode(p))); List[] objectsBySector = manager.m_objectsBySector; int num = Math.Min(objectsBySector.Length, index + 401); while (index < num) { if (objectsBySector[index] != null) { foreach (ZDO item in objectsBySector[index]) { if (item.IsValid() && hashSet.Contains(item.GetPrefab()) && !zdos.Contains(item)) { zdos.Add(item); } } } index++; } if (index < objectsBySector.Length) { return false; } foreach (ZDO portal in GetPortals(manager)) { if (portal.IsValid() && hashSet.Contains(portal.GetPrefab()) && !zdos.Contains(portal)) { zdos.Add(portal); } } zdos.RemoveAll((ZDO z) => !z.IsValid()); return true; } }