Decompiled source of GameModeRounds v0.2.0
plugins/ArceDev.GameModeRounds.dll
Decompiled 4 hours 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.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Logging; using FishNet; using FishNet.Broadcast; using FishNet.Connection; using FishNet.Managing; using FishNet.Managing.Timing; using FishNet.Object; using FishNet.Serializing; using FishNet.Transporting; using GMMapLoader; using GameModeCore; using HarmonyLib; using Microsoft.CodeAnalysis; using StatusCore; using Steamworks; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine.Localization; using UnityEngine.Localization.Settings; using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; using UnityEngine.SceneManagement; using UnityEngine.UI; using UpgradeCore; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("ArceDev.GameModeRounds")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("0.2.0.0")] [assembly: AssemblyInformationalVersion("0.2.0+d4e679589f0a76750083b1340c9e53e718faba7c")] [assembly: AssemblyProduct("ArceDev.GameModeRounds")] [assembly: AssemblyTitle("GameMode: Rounds")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.2.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace BepInEx { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] [Embedded] internal sealed class BepInAutoPluginAttribute : Attribute { public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace BepInEx.Preloader.Core.Patching { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] [Embedded] internal sealed class PatcherAutoPluginAttribute : Attribute { public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace Microsoft.CodeAnalysis { [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace GameModeRounds { internal sealed class DraftCameraFocus { private const float PositionSpeed = 5f; private const float RotationSpeed = 8f; private Player? _localPlayer; private Camera? _camera; private bool _playerCameraWasEnabled; private bool _deathCameraWasEnabled; private bool _active; private int _lastTargetClientId = -1; internal void Refresh(bool shouldFocus, int targetClientId, Vector3? cardFocus) { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) Player localPlayer = Player.LocalPlayer; Player val = (shouldFocus ? PlayerFor(targetClientId) : null); if (!Object.op_Implicit((Object)(object)localPlayer) || !Object.op_Implicit((Object)(object)val) || !((NetworkBehaviour)val).Owner.IsValid || !cardFocus.HasValue) { Reset(); return; } if (!_active || (Object)(object)_localPlayer != (Object)(object)localPlayer || (Object)(object)_camera != (Object)(object)localPlayer.CurCam) { Begin(localPlayer); } if (Object.op_Implicit((Object)(object)_camera) && TryGetFacePose(val, out var center, out var forward)) { if (_lastTargetClientId != targetClientId) { _lastTargetClientId = targetClientId; Plugin.Log.LogInfo((object)("Camera focusing upgrade drafter '" + LobbyNetwork.ActiveDrafterName + "'.")); } CalculateSpectatorPose(center, forward, cardFocus.Value, ((NetworkBehaviour)localPlayer).Owner.ClientId, out var position, out var rotation); float unscaledDeltaTime = Time.unscaledDeltaTime; ((Component)_camera).transform.position = Vector3.Lerp(((Component)_camera).transform.position, position, 5f * unscaledDeltaTime); ((Component)_camera).transform.rotation = Quaternion.Slerp(((Component)_camera).transform.rotation, rotation, 8f * unscaledDeltaTime); } } internal void Reset() { if (_active) { if (Object.op_Implicit((Object)(object)_localPlayer)) { ((Behaviour)_localPlayer.Camera).enabled = _playerCameraWasEnabled; ((Behaviour)_localPlayer.DeathCam).enabled = _deathCameraWasEnabled; } _localPlayer = null; _camera = null; _active = false; _lastTargetClientId = -1; } } private void Begin(Player localPlayer) { Reset(); _localPlayer = localPlayer; _camera = localPlayer.CurCam; _playerCameraWasEnabled = ((Behaviour)localPlayer.Camera).enabled; _deathCameraWasEnabled = ((Behaviour)localPlayer.DeathCam).enabled; ((Behaviour)localPlayer.Camera).enabled = false; ((Behaviour)localPlayer.DeathCam).enabled = false; _active = true; } private static Player? PlayerFor(int clientId) { return ((IEnumerable<Player>)PlayerManager.Players).FirstOrDefault((Func<Player, bool>)((Player player) => Object.op_Implicit((Object)(object)player) && !((NetworkBehaviour)player).IsDeinitializing && ((NetworkBehaviour)player).Owner.ClientId == clientId)); } private static bool TryGetFacePose(Player player, out Vector3 center, out Vector3 forward) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) Transform val = FindDeadFace(player.Dying.DeadPlayer); if (!Object.op_Implicit((Object)(object)val)) { val = player.Body.Head; } if (!Object.op_Implicit((Object)(object)val)) { center = default(Vector3); forward = default(Vector3); return false; } center = FaceCenter(val); forward = val.forward; return true; } private static void CalculateSpectatorPose(Vector3 faceCenter, Vector3 faceForward, Vector3 cardFocus, int spectatorClientId, out Vector3 position, out Quaternion rotation) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //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_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.ProjectOnPlane(cardFocus - faceCenter, Vector3.up); Vector3 val2 = ((Vector3)(ref val)).normalized; if (((Vector3)(ref val2)).sqrMagnitude < 0.5f) { val = Vector3.ProjectOnPlane(faceForward, Vector3.up); val2 = ((Vector3)(ref val)).normalized; } if (((Vector3)(ref val2)).sqrMagnitude < 0.5f) { val2 = Vector3.forward; } int num = spectatorClientId & 0x7FFFFFFF; int num2 = num / 2 % 3; float num3 = ((num % 2 == 0) ? (-1f) : 1f); Vector3 val3 = Vector3.Cross(Vector3.up, val2); position = faceCenter - val2 * (0.48f + (float)num2 * 0.08f) + val3 * num3 * (0.26f + (float)num2 * 0.05f) + Vector3.up * (0.18f + (float)num2 * 0.05f); rotation = Quaternion.LookRotation(cardFocus - position, Vector3.up); } internal static void Validate() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: 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_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(0f, 0f, 2f); CalculateSpectatorPose(Vector3.zero, Vector3.forward, val, 0, out var position, out var rotation); CalculateSpectatorPose(Vector3.zero, Vector3.forward, val, 1, out var position2, out var _); if (!(position.x >= 0f) && !(position2.x <= 0f) && !(position.y <= 0f) && !(position.z >= 0f)) { Vector3 val2 = rotation * Vector3.forward; Vector3 val3 = val - position; if (!(Vector3.Dot(val2, ((Vector3)(ref val3)).normalized) < 0.999f)) { return; } } throw new InvalidOperationException("Draft spectator camera validation failed."); } private static Transform? FindDeadFace(DeadPlayer deadPlayer) { if (!Object.op_Implicit((Object)(object)deadPlayer)) { return null; } Renderer val = ((IEnumerable<Renderer>)((Component)deadPlayer).GetComponentsInChildren<Renderer>(true)).FirstOrDefault((Func<Renderer, bool>)delegate(Renderer candidate) { string name = ((Object)candidate).name; return (name == "CharacterHead" || name == "HeadMesh") ? true : false; }); if (!Object.op_Implicit((Object)(object)val)) { return ((Component)deadPlayer).transform; } return ((Component)val).transform; } private static Vector3 FaceCenter(Transform face) { //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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) Renderer component = ((Component)face).GetComponent<Renderer>(); if (!Object.op_Implicit((Object)(object)component)) { return face.position; } Bounds bounds = component.bounds; return ((Bounds)(ref bounds)).center; } } internal sealed class EnemyHealthBar : MonoBehaviour { private const float Width = 115f; private const float GapBelowName = 4f; private static readonly FieldRef<OtherPlayer, TextMeshProUGUI> NameText = AccessTools.FieldRefAccess<OtherPlayer, TextMeshProUGUI>("_nameText"); private static readonly FieldInfo BossBarField = AccessTools.Field(typeof(BossUI), "_bossHpToRotate"); private static readonly FieldInfo BossHealthField = AccessTools.Field(typeof(BossUI), "_bossHealth"); private static readonly FieldInfo BossHealthLerpedField = AccessTools.Field(typeof(BossUI), "_bossHealthLerped"); private readonly Vector3[] _corners = (Vector3[])(object)new Vector3[4]; private Player _player; private Transform _holder; private TextMeshProUGUI _name; private RectTransform _root; private Image _fill; private Image _lagFill; internal static void Attach(Player player) { if (!((NetworkBehaviour)player).Owner.IsLocalClient && !Object.op_Implicit((Object)(object)((Component)player).GetComponent<EnemyHealthBar>())) { ((Component)player).gameObject.AddComponent<EnemyHealthBar>()._player = player; } } internal static void Validate() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: 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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) if (!Mathf.Approximately(HealthFraction(50, 100), 0.5f) || !Mathf.Approximately(HealthFraction(150, 200), 0.75f) || HealthFraction(-1, 100) != 0f || HealthFraction(1, 0) != 0f || HealthColor(0f, Color.red, Color.yellow, Color.green) != Color.red || HealthColor(0.5f, Color.red, Color.yellow, Color.green) != Color.yellow || HealthColor(1f, Color.red, Color.yellow, Color.green) != Color.green) { throw new InvalidOperationException("Enemy health bar validation failed."); } } private void LateUpdate() { //IL_00b7: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)_player) && (Object.op_Implicit((Object)(object)_root) || TryCreate())) { bool flag = Plugin.IsModeActive && !((NetworkBehaviour)_player).Owner.IsLocalClient && !_player.Dying.IsDead; if (((Component)_root).gameObject.activeSelf != flag) { ((Component)_root).gameObject.SetActive(flag); } if (flag) { PlaceBelowName(); float num = HealthFraction(_player.Vitals.Health, PlayerUpgradeEffects.MaxHealth(_player)); _fill.fillAmount = num; ((Graphic)_fill).color = HealthColor(num); _lagFill.fillAmount = ((num >= _lagFill.fillAmount) ? num : Mathf.MoveTowards(_lagFill.fillAmount, num, Time.deltaTime * 0.8f)); } } } private bool TryCreate() { //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) _name = NameText.Invoke(_player.Other); Canvas val = (Object.op_Implicit((Object)(object)_name) ? ((Graphic)_name).canvas : null); _holder = (Object.op_Implicit((Object)(object)val) ? ((Component)val).transform : null); BossUI val2 = ((IEnumerable<BossUI>)Resources.FindObjectsOfTypeAll<BossUI>()).FirstOrDefault((Func<BossUI, bool>)delegate(BossUI candidate) { //IL_000e: 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) if (Object.op_Implicit((Object)(object)candidate)) { Scene scene = ((Component)candidate).gameObject.scene; return ((Scene)(ref scene)).IsValid(); } return false; }); RectTransform val3 = (RectTransform)(Object.op_Implicit((Object)(object)val2) ? /*isinst with value type is only supported in some contexts*/: null); Image val4 = (Image)(Object.op_Implicit((Object)(object)val2) ? /*isinst with value type is only supported in some contexts*/: null); Image val5 = (Image)(Object.op_Implicit((Object)(object)val2) ? /*isinst with value type is only supported in some contexts*/: null); if (!Object.op_Implicit((Object)(object)_holder) || !Object.op_Implicit((Object)(object)_name) || !Object.op_Implicit((Object)(object)val3) || !Object.op_Implicit((Object)(object)val4) || !Object.op_Implicit((Object)(object)val5)) { return false; } Image[] componentsInChildren = ((Component)val3).GetComponentsInChildren<Image>(true); _root = Object.Instantiate<RectTransform>(val3, _holder, false); ((Object)_root).name = "GameModeRoundsEnemyHealth"; Image[] componentsInChildren2 = ((Component)_root).GetComponentsInChildren<Image>(true); int num = Array.IndexOf(componentsInChildren, val4); int num2 = Array.IndexOf(componentsInChildren, val5); if (num < 0 || num2 < 0 || num >= componentsInChildren2.Length || num2 >= componentsInChildren2.Length) { Object.Destroy((Object)(object)((Component)_root).gameObject); _root = null; return false; } _fill = componentsInChildren2[num]; _lagFill = componentsInChildren2[num2]; RectTransform root = _root; Vector3 one = Vector3.one; Rect rect = val3.rect; ((Transform)root).localScale = one * (115f / Mathf.Max(1f, ((Rect)(ref rect)).width)); ((Transform)_root).localRotation = Quaternion.identity; ((Component)_root).gameObject.SetActive(true); Plugin.Log.LogInfo((object)"Using the native boss health bar beneath enemy nametags."); return true; } private void PlaceBelowName() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) ((TMP_Text)_name).rectTransform.GetWorldCorners(_corners); Vector3 val = _holder.InverseTransformPoint(_corners[0]); Vector3 val2 = _holder.InverseTransformPoint(_corners[3]); float num = (val.x + val2.x) * 0.5f; float num2 = Mathf.Min(val.y, val2.y) - 4f; _root.GetWorldCorners(_corners); Vector3 val3 = _holder.InverseTransformPoint(_corners[0]); Vector3 val4 = _holder.InverseTransformPoint(_corners[2]); float num3 = (val3.x + val4.x) * 0.5f; float num4 = Mathf.Max(val3.y, val4.y); RectTransform root = _root; ((Transform)root).localPosition = ((Transform)root).localPosition + new Vector3(num - num3, num2 - num4, 0f); } private static float HealthFraction(int health, int maximum) { if (maximum > 0) { return Mathf.Clamp01((float)health / (float)maximum); } return 0f; } private static Color HealthColor(float healthPercent) { //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_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) return HealthColor(healthPercent, GameInfo.RedColor, GameInfo.OrangeColor, GameInfo.GreenColor); } private static Color HealthColor(float healthPercent, Color low, Color medium, Color healthy) { //IL_0017: 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_0026: 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_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (!(healthPercent > 0.5f)) { return Color.Lerp(low, medium, healthPercent * 2f); } return Color.Lerp(medium, healthy, (healthPercent - 0.5f) * 2f); } } [HarmonyPatch(typeof(Player), "OnStartClient")] internal static class EnemyHealthBarPlayerStartPatch { private static void Postfix(Player __instance) { EnemyHealthBar.Attach(__instance); } } public static class GameModeRoundsArenaApi { public const string ArenaRootName = "GameModeRoundsArena"; public const string SpawnPointsRootName = "SpawnPoints"; public const int RequiredSpawnPoints = 4; public static IReadOnlyList<GMMapDefinition> Arenas => GMMapApi.Catalog.ForMode("ArceDev.GameModeRounds"); public static void Register(GMMapDefinition arena) { if (arena == null) { throw new ArgumentNullException("arena"); } if (!string.Equals(arena.GameModeId, "ArceDev.GameModeRounds", StringComparison.Ordinal)) { throw new ArgumentException("GameMode: Rounds arenas must use gameModeId 'ArceDev.GameModeRounds'.", "arena"); } GMMapApi.Register(arena); } public static void Register(string id, string displayName, string bundlePath, string sceneName, int networkVersion = 1) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown Register(new GMMapDefinition(id, "ArceDev.GameModeRounds", displayName, bundlePath, sceneName, networkVersion)); } } internal static class GameModeRoundsText { private static readonly (string English, string Spanish)[] DescriptionReplacements = new(string, string)[74] { ("Bullets seek visible targets after Bouncing", "Los proyectiles buscan objetivos visibles después de rebotar"), ("Bullets smoothly seek enemies", "Los proyectiles persiguen suavemente a los enemigos"), ("Dealing Damage reloads your Weapon", "Infligir daño recarga tu arma"), ("Damage dealt to you is spread over time", "El daño que recibes se reparte con el tiempo"), ("Temporarily gain massive Health after dealing Damage", "Obtén temporalmente muchísima salud tras infligir daño"), ("Move faster towards visible enemies", "Muévete más rápido hacia enemigos visibles"), ("Bullets gain Damage after Bouncing", "Los proyectiles ganan daño después de rebotar"), ("Bullets gain Damage while travelling", "Los proyectiles ganan daño mientras viajan"), ("Bullets strongly push targets", "Los proyectiles empujan con fuerza a los objetivos"), ("Bullets greatly slow enemies", "Los proyectiles ralentizan mucho a los enemigos"), ("Bullets deal Damage over time", "Los proyectiles infligen daño con el tiempo"), ("Fire multiple Bullets in sequence", "Dispara varios proyectiles en secuencia"), ("Fire many Bullets at once", "Dispara muchos proyectiles a la vez"), ("Steal Health from nearby enemies", "Roba salud a los enemigos cercanos"), ("Steal Health from Damage", "Roba salud con el daño infligido"), ("Bouncing Bullets lose Speed", "Los proyectiles rebotadores pierden velocidad"), ("A shotgun-like spread", "Dispersión similar a una escopeta"), ("Massive Health while nearly unharmed", "Muchísima salud mientras estés casi ileso"), ("Damage received over ", "Daño recibido durante "), ("Damage dealt over ", "Daño infligido durante "), (" after dealing Damage", " tras infligir daño"), (" Health while above ", " de salud mientras esté por encima del "), (" Health for ", " de salud durante "), (" Movement Speed for ", " de velocidad de movimiento durante "), (" Stuns lasting ", " aturdimientos de "), ("Steal ", "Roba "), (" Health/s within ", " de salud/s en un radio de "), ("A huge amount of Attack Speed", "Muchísima velocidad de ataque"), ("A lot lower Damage", "Mucho menos daño"), ("Extremely fast Bullets", "Proyectiles extremadamente rápidos"), ("Faster and stronger Bullets", "Proyectiles más rápidos y potentes"), ("Much bigger Bullets", "Proyectiles mucho más grandes"), ("Much faster Bullets", "Proyectiles mucho más rápidos"), ("Much faster Reload", "Recarga mucho más rápida"), ("Much lower Attack Speed", "Velocidad de ataque mucho menor"), ("Much lower Damage", "Mucho menos daño"), ("Much more Damage", "Mucho más daño"), ("Much more Health", "Mucha más salud"), ("Much less Health", "Mucha menos salud"), ("Slightly lower Damage", "Daño ligeramente menor"), ("Lower Attack Speed", "Menor velocidad de ataque"), ("Lower Damage", "Menos daño"), ("Slower Bullets", "Proyectiles más lentos"), ("Faster Attack Speed", "Mayor velocidad de ataque"), ("Faster Reload", "Recarga más rápida"), ("More Health and Damage", "Más salud y daño"), ("More Damage", "Más daño"), ("More Health", "Más salud"), ("More Ammo", "Más munición"), ("Less Ammo", "Menos munición"), ("Slow nearby enemies", "Ralentiza a los enemigos cercanos"), ("Bouncing Bullets", "Proyectiles rebotadores"), ("Many Bullet Bounces", "Muchos rebotes"), (" Life Steal", " de robo de vida"), (" Projectile Speed", " de velocidad de proyectil"), (" Projectile Size", " de tamaño de proyectil"), (" Projectile Force", " de fuerza de proyectil"), (" Reload Speed", " de velocidad de recarga"), (" Reload Time", " de tiempo de recarga"), (" Attack Speed", " de velocidad de ataque"), (" Damage per second", " de daño por segundo"), (" Damage per Bounce", " de daño por rebote"), (" Speed per Bounce", " de velocidad por rebote"), (" nearby Enemy Movement", " de movimiento de enemigos cercanos"), (" Chase Movement", " de movimiento de persecución"), ("Sequential Bullets", "proyectiles consecutivos"), ("Bullet Bounces", "rebotes de proyectil"), ("Bullet Bounce", "rebote de proyectil"), ("Bullets stun repeatedly", "Los proyectiles aturden repetidamente"), (" Bullets", " proyectiles"), (" Ammo", " de munición"), (" Damage", " de daño"), (" Health", " de salud"), (" Spread", " de dispersión") }; internal static bool IsSpanish(string? localeCode = null) { //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) if (localeCode == null) { Locale selectedLocale = LocalizationSettings.SelectedLocale; object obj; if (selectedLocale == null) { obj = null; } else { LocaleIdentifier identifier = selectedLocale.Identifier; obj = ((LocaleIdentifier)(ref identifier)).Code; } localeCode = (string?)obj; } return localeCode?.StartsWith("es", StringComparison.OrdinalIgnoreCase) ?? false; } internal static string Text(string english, string spanish, string? localeCode = null) { if (!IsSpanish(localeCode)) { return english; } return spanish; } internal static string UpgradeDescription(string description, string? localeCode = null) { if (!IsSpanish(localeCode)) { return description; } (string, string)[] descriptionReplacements = DescriptionReplacements; for (int i = 0; i < descriptionReplacements.Length; i++) { (string, string) tuple = descriptionReplacements[i]; string item = tuple.Item1; string item2 = tuple.Item2; description = description.Replace(item, item2); } return description; } internal static string WeaponName(string name, string? localeCode = null) { return name switch { "Pistol" => Text(name, "Pistola", localeCode), "Shotgun" => Text(name, "Escopeta", localeCode), "Assault Rifle" => Text(name, "Rifle de asalto", localeCode), "SMG" => Text(name, "Subfusil", localeCode), "Sniper" => Text(name, "Francotirador", localeCode), "Knife" => Text(name, "Cuchillo", localeCode), "Knuckles" => Text(name, "Nudillos", localeCode), _ => name, }; } internal static void Validate() { if (WeaponName("Assault Rifle", "es-MX") != "Rifle de asalto" || UpgradeDescription("+100% Damage\n+0.25s Reload Time", "es-MX") != "+100% de daño\n+0.25s de tiempo de recarga") { throw new InvalidOperationException("GameMode: Rounds localization validation failed."); } } } public enum GameModeRoundsRarity { Common, Uncommon, Rare, Epic, Legendary } public static class GameModeRoundsUpgradeApi { public const string AcquisitionTag = "game-mode-rounds"; public const string ContextId = "ArceDev.GameModeRounds/match"; private static readonly (GameModeRoundsRarity Rarity, float Weight)[] DraftWeights = new(GameModeRoundsRarity, float)[5] { (GameModeRoundsRarity.Common, 50f), (GameModeRoundsRarity.Uncommon, 25f), (GameModeRoundsRarity.Rare, 15f), (GameModeRoundsRarity.Epic, 7f), (GameModeRoundsRarity.Legendary, 3f) }; private static readonly Dictionary<string, GameModeRoundsRarity> Rarities = new Dictionary<string, GameModeRoundsRarity>(StringComparer.Ordinal); public static void RegisterRarity(string upgradeId, GameModeRoundsRarity rarity) { if (string.IsNullOrWhiteSpace(upgradeId)) { throw new ArgumentException("An upgrade ID is required.", "upgradeId"); } if (!Enum.IsDefined(typeof(GameModeRoundsRarity), rarity)) { throw new ArgumentOutOfRangeException("rarity"); } if (Rarities.TryGetValue(upgradeId, out var value) && value != rarity) { throw new InvalidOperationException($"Upgrade '{upgradeId}' already has rarity '{value}'."); } Rarities[upgradeId] = rarity; } public static bool TryGetRarity(string upgradeId, out GameModeRoundsRarity rarity) { return Rarities.TryGetValue(upgradeId, out rarity); } public static IReadOnlyList<string> GetAcquisitionOrder(Player player, Item item) { return UpgradeAcquisitionOrder.For(player, item); } public static IReadOnlyList<string> GetAcquisitionOrder(UpgradeTarget target) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return UpgradeAcquisitionOrder.For(target); } internal static GameModeRoundsRarity PickDraftRarity(float roll, IReadOnlyCollection<GameModeRoundsRarity> available) { float num = Math.Clamp(roll, 0f, 1f) * DraftWeights.Where(((GameModeRoundsRarity Rarity, float Weight) entry) => available.Contains(entry.Rarity)).Sum(((GameModeRoundsRarity Rarity, float Weight) entry) => entry.Weight); GameModeRoundsRarity result = GameModeRoundsRarity.Common; (GameModeRoundsRarity, float)[] draftWeights = DraftWeights; for (int num2 = 0; num2 < draftWeights.Length; num2++) { var (gameModeRoundsRarity, num3) = draftWeights[num2]; if (available.Contains(gameModeRoundsRarity)) { result = gameModeRoundsRarity; if (num < num3) { return gameModeRoundsRarity; } num -= num3; } } return result; } } internal static class GameModeRoundsUpgrades { internal const string AcquisitionTag = "game-mode-rounds"; internal const string SprayId = "ArceDev.GameModeRounds/spray"; internal const string QuickChargeId = "ArceDev.GameModeRounds/quick-charge"; internal const string HomingBulletsId = "ArceDev.GameModeRounds/homing-bullets"; internal const string SlowMoId = "ArceDev.GameModeRounds/slow-mo"; internal const string BigBulletId = "ArceDev.GameModeRounds/big-bullet"; internal const string QuickReloadId = "ArceDev.GameModeRounds/quick-reload"; internal const string FastForwardId = "ArceDev.GameModeRounds/fast-forward"; internal const string QuickShotId = "ArceDev.GameModeRounds/quick-shot"; internal const string FastballId = "ArceDev.GameModeRounds/fastball"; internal const string CombineId = "ArceDev.GameModeRounds/combine"; internal const string CarefulPlanningId = "ArceDev.GameModeRounds/careful-planning"; internal const string WindUpId = "ArceDev.GameModeRounds/wind-up"; internal const string BarrageId = "ArceDev.GameModeRounds/barrage"; internal const string BuckshotId = "ArceDev.GameModeRounds/buckshot"; internal const string HugeId = "ArceDev.GameModeRounds/huge"; internal const string GlassCannonId = "ArceDev.GameModeRounds/glass-cannon"; internal const string SteadyShotId = "ArceDev.GameModeRounds/steady-shot"; internal const string TankId = "ArceDev.GameModeRounds/tank"; internal const string ScavengerId = "ArceDev.GameModeRounds/scavenger"; internal const string LeechId = "ArceDev.GameModeRounds/leech"; internal const string ThrusterId = "ArceDev.GameModeRounds/thruster"; internal const string GrowId = "ArceDev.GameModeRounds/grow"; internal const string ColdBulletsId = "ArceDev.GameModeRounds/cold-bullets"; internal const string ChillingPresenceId = "ArceDev.GameModeRounds/chilling-presence"; internal const string ChaseId = "ArceDev.GameModeRounds/chase"; internal const string BrawlerId = "ArceDev.GameModeRounds/brawler"; internal const string BouncyId = "ArceDev.GameModeRounds/bouncy"; internal const string RiccochetId = "ArceDev.GameModeRounds/riccochet"; internal const string MayhemId = "ArceDev.GameModeRounds/mayhem"; internal const string TricksterId = "ArceDev.GameModeRounds/trickster"; internal const string BurstId = "ArceDev.GameModeRounds/burst"; internal const string TargetBounceId = "ArceDev.GameModeRounds/target-bounce"; internal const string DazzleId = "ArceDev.GameModeRounds/dazzle"; internal const string PoisonId = "ArceDev.GameModeRounds/poison"; internal const string ParasiteId = "ArceDev.GameModeRounds/parasite"; internal const string DecayId = "ArceDev.GameModeRounds/decay"; internal const string TasteOfBloodId = "ArceDev.GameModeRounds/taste-of-blood"; internal const string PristinePerseverenceId = "ArceDev.GameModeRounds/pristine-perseverence"; internal const string LifestealerId = "ArceDev.GameModeRounds/lifestealer"; internal const string FullAutoId = "ArceDev.GameModeRounds/full-auto"; private static readonly (string UpgradeId, string RadiusParameter)[] AuraDefinitions = new(string, string)[2] { ("ArceDev.GameModeRounds/chilling-presence", "auraRange"), ("ArceDev.GameModeRounds/lifestealer", "proximityDrainRange") }; internal static void Register() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Expected O, but got Unknown //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Expected O, but got Unknown //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Expected O, but got Unknown //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Expected O, but got Unknown //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Expected O, but got Unknown //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Expected O, but got Unknown //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Expected O, but got Unknown //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Expected O, but got Unknown //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Expected O, but got Unknown //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Expected O, but got Unknown //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Expected O, but got Unknown //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Expected O, but got Unknown //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_049c: Expected O, but got Unknown //IL_04bc: 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_0508: Expected O, but got Unknown //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_056e: Unknown result type (might be due to invalid IL or missing references) //IL_0574: Expected O, but got Unknown //IL_058a: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Expected O, but got Unknown //IL_05b0: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Expected O, but got Unknown //IL_0612: Unknown result type (might be due to invalid IL or missing references) //IL_0618: Expected O, but got Unknown //IL_0635: Unknown result type (might be due to invalid IL or missing references) //IL_067b: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Expected O, but got Unknown //IL_0697: Unknown result type (might be due to invalid IL or missing references) //IL_069d: Expected O, but got Unknown //IL_06b3: Unknown result type (might be due to invalid IL or missing references) //IL_06b9: Expected O, but got Unknown //IL_06d9: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Unknown result type (might be due to invalid IL or missing references) //IL_0725: Expected O, but got Unknown //IL_073b: Unknown result type (might be due to invalid IL or missing references) //IL_0741: Expected O, but got Unknown //IL_0757: Unknown result type (might be due to invalid IL or missing references) //IL_075d: Expected O, but got Unknown //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_07c0: Unknown result type (might be due to invalid IL or missing references) //IL_07c6: Expected O, but got Unknown //IL_07dc: Unknown result type (might be due to invalid IL or missing references) //IL_07e2: Expected O, but got Unknown //IL_07f8: Unknown result type (might be due to invalid IL or missing references) //IL_07fe: Expected O, but got Unknown //IL_081b: Unknown result type (might be due to invalid IL or missing references) //IL_0861: Unknown result type (might be due to invalid IL or missing references) //IL_0867: Expected O, but got Unknown //IL_087d: Unknown result type (might be due to invalid IL or missing references) //IL_0883: Expected O, but got Unknown //IL_0899: Unknown result type (might be due to invalid IL or missing references) //IL_089f: Expected O, but got Unknown //IL_08b5: Unknown result type (might be due to invalid IL or missing references) //IL_08bb: Expected O, but got Unknown //IL_08d8: Unknown result type (might be due to invalid IL or missing references) //IL_091e: Unknown result type (might be due to invalid IL or missing references) //IL_0924: Expected O, but got Unknown //IL_093a: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Expected O, but got Unknown //IL_0956: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Expected O, but got Unknown //IL_0972: Unknown result type (might be due to invalid IL or missing references) //IL_0978: Expected O, but got Unknown //IL_0998: Unknown result type (might be due to invalid IL or missing references) //IL_09de: Unknown result type (might be due to invalid IL or missing references) //IL_09e4: Expected O, but got Unknown //IL_09fa: Unknown result type (might be due to invalid IL or missing references) //IL_0a00: Expected O, but got Unknown //IL_0a16: Unknown result type (might be due to invalid IL or missing references) //IL_0a1c: Expected O, but got Unknown //IL_0a32: Unknown result type (might be due to invalid IL or missing references) //IL_0a38: Expected O, but got Unknown //IL_0a4e: Unknown result type (might be due to invalid IL or missing references) //IL_0a54: Expected O, but got Unknown //IL_0a71: Unknown result type (might be due to invalid IL or missing references) //IL_0ab7: Unknown result type (might be due to invalid IL or missing references) //IL_0abd: Expected O, but got Unknown //IL_0ada: Unknown result type (might be due to invalid IL or missing references) //IL_0b20: Unknown result type (might be due to invalid IL or missing references) //IL_0b26: Expected O, but got Unknown //IL_0b3c: Unknown result type (might be due to invalid IL or missing references) //IL_0b42: Expected O, but got Unknown //IL_0b58: Unknown result type (might be due to invalid IL or missing references) //IL_0b5e: Expected O, but got Unknown //IL_0b7e: Unknown result type (might be due to invalid IL or missing references) //IL_0bc4: Unknown result type (might be due to invalid IL or missing references) //IL_0bca: Expected O, but got Unknown //IL_0be0: Unknown result type (might be due to invalid IL or missing references) //IL_0be6: Expected O, but got Unknown //IL_0bfc: Unknown result type (might be due to invalid IL or missing references) //IL_0c02: Expected O, but got Unknown //IL_0c1f: Unknown result type (might be due to invalid IL or missing references) //IL_0c65: Unknown result type (might be due to invalid IL or missing references) //IL_0c6b: Expected O, but got Unknown //IL_0c81: Unknown result type (might be due to invalid IL or missing references) //IL_0c87: Expected O, but got Unknown //IL_0c9d: Unknown result type (might be due to invalid IL or missing references) //IL_0ca3: Expected O, but got Unknown //IL_0cc3: Unknown result type (might be due to invalid IL or missing references) //IL_0d09: Unknown result type (might be due to invalid IL or missing references) //IL_0d0f: Expected O, but got Unknown //IL_0d25: Unknown result type (might be due to invalid IL or missing references) //IL_0d2b: Expected O, but got Unknown //IL_0d48: Unknown result type (might be due to invalid IL or missing references) //IL_0d8e: Unknown result type (might be due to invalid IL or missing references) //IL_0d94: Expected O, but got Unknown //IL_0daa: Unknown result type (might be due to invalid IL or missing references) //IL_0db0: Expected O, but got Unknown //IL_0dd0: 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_0e1c: Expected O, but got Unknown //IL_0e32: Unknown result type (might be due to invalid IL or missing references) //IL_0e38: Expected O, but got Unknown //IL_0e55: Unknown result type (might be due to invalid IL or missing references) //IL_0e9b: Unknown result type (might be due to invalid IL or missing references) //IL_0ea1: Expected O, but got Unknown //IL_0eb7: Unknown result type (might be due to invalid IL or missing references) //IL_0ebd: Expected O, but got Unknown //IL_0edd: Unknown result type (might be due to invalid IL or missing references) //IL_0f23: Unknown result type (might be due to invalid IL or missing references) //IL_0f29: Expected O, but got Unknown //IL_0f3f: Unknown result type (might be due to invalid IL or missing references) //IL_0f45: Expected O, but got Unknown //IL_0f5b: Unknown result type (might be due to invalid IL or missing references) //IL_0f61: Expected O, but got Unknown //IL_0f81: Unknown result type (might be due to invalid IL or missing references) //IL_0fc7: Unknown result type (might be due to invalid IL or missing references) //IL_0fcd: Expected O, but got Unknown //IL_0fe3: Unknown result type (might be due to invalid IL or missing references) //IL_0fe9: Expected O, but got Unknown //IL_0fff: Unknown result type (might be due to invalid IL or missing references) //IL_1005: Expected O, but got Unknown //IL_1022: Unknown result type (might be due to invalid IL or missing references) //IL_1068: Unknown result type (might be due to invalid IL or missing references) //IL_106e: Expected O, but got Unknown //IL_1084: Unknown result type (might be due to invalid IL or missing references) //IL_108a: Expected O, but got Unknown //IL_10a7: Unknown result type (might be due to invalid IL or missing references) //IL_10ed: Unknown result type (might be due to invalid IL or missing references) //IL_10f3: Expected O, but got Unknown //IL_1109: Unknown result type (might be due to invalid IL or missing references) //IL_110f: Expected O, but got Unknown //IL_112f: Unknown result type (might be due to invalid IL or missing references) //IL_1175: Unknown result type (might be due to invalid IL or missing references) //IL_117b: Expected O, but got Unknown //IL_1191: Unknown result type (might be due to invalid IL or missing references) //IL_1197: Expected O, but got Unknown //IL_11ad: Unknown result type (might be due to invalid IL or missing references) //IL_11b3: Expected O, but got Unknown //IL_11d3: Unknown result type (might be due to invalid IL or missing references) //IL_1219: Unknown result type (might be due to invalid IL or missing references) //IL_121f: Expected O, but got Unknown //IL_1235: Unknown result type (might be due to invalid IL or missing references) //IL_123b: Expected O, but got Unknown //IL_1251: Unknown result type (might be due to invalid IL or missing references) //IL_1257: Expected O, but got Unknown //IL_126d: Unknown result type (might be due to invalid IL or missing references) //IL_1273: Expected O, but got Unknown //IL_1293: Unknown result type (might be due to invalid IL or missing references) //IL_12d9: Unknown result type (might be due to invalid IL or missing references) //IL_12df: Expected O, but got Unknown //IL_12f5: Unknown result type (might be due to invalid IL or missing references) //IL_12fb: Expected O, but got Unknown //IL_1311: Unknown result type (might be due to invalid IL or missing references) //IL_1317: Expected O, but got Unknown //IL_1337: Unknown result type (might be due to invalid IL or missing references) //IL_137d: Unknown result type (might be due to invalid IL or missing references) //IL_1383: Expected O, but got Unknown //IL_1399: Unknown result type (might be due to invalid IL or missing references) //IL_139f: Expected O, but got Unknown //IL_13b5: Unknown result type (might be due to invalid IL or missing references) //IL_13bb: Expected O, but got Unknown //IL_13d1: Unknown result type (might be due to invalid IL or missing references) //IL_13d7: Expected O, but got Unknown //IL_13ed: Unknown result type (might be due to invalid IL or missing references) //IL_13f3: Expected O, but got Unknown //IL_1410: Unknown result type (might be due to invalid IL or missing references) //IL_1456: Unknown result type (might be due to invalid IL or missing references) //IL_145c: Expected O, but got Unknown //IL_1472: Unknown result type (might be due to invalid IL or missing references) //IL_1478: Expected O, but got Unknown //IL_148e: Unknown result type (might be due to invalid IL or missing references) //IL_1494: Expected O, but got Unknown //IL_14aa: Unknown result type (might be due to invalid IL or missing references) //IL_14b0: Expected O, but got Unknown //IL_14c6: Unknown result type (might be due to invalid IL or missing references) //IL_14cc: Expected O, but got Unknown //IL_14ec: Unknown result type (might be due to invalid IL or missing references) //IL_1532: Unknown result type (might be due to invalid IL or missing references) //IL_1538: Expected O, but got Unknown //IL_154e: Unknown result type (might be due to invalid IL or missing references) //IL_1554: Expected O, but got Unknown //IL_156a: Unknown result type (might be due to invalid IL or missing references) //IL_1570: Expected O, but got Unknown //IL_1586: Unknown result type (might be due to invalid IL or missing references) //IL_158c: Expected O, but got Unknown //IL_15ac: Unknown result type (might be due to invalid IL or missing references) //IL_15f2: Unknown result type (might be due to invalid IL or missing references) //IL_15f8: Expected O, but got Unknown //IL_160e: Unknown result type (might be due to invalid IL or missing references) //IL_1614: Expected O, but got Unknown //IL_162a: Unknown result type (might be due to invalid IL or missing references) //IL_1630: Expected O, but got Unknown //IL_1646: Unknown result type (might be due to invalid IL or missing references) //IL_164c: Expected O, but got Unknown //IL_1669: Unknown result type (might be due to invalid IL or missing references) //IL_16af: Unknown result type (might be due to invalid IL or missing references) //IL_16b5: Expected O, but got Unknown //IL_16cb: Unknown result type (might be due to invalid IL or missing references) //IL_16d1: Expected O, but got Unknown //IL_16e7: Unknown result type (might be due to invalid IL or missing references) //IL_16ed: Expected O, but got Unknown //IL_1703: Unknown result type (might be due to invalid IL or missing references) //IL_1709: Expected O, but got Unknown //IL_1726: Unknown result type (might be due to invalid IL or missing references) //IL_176c: Unknown result type (might be due to invalid IL or missing references) //IL_1772: Expected O, but got Unknown //IL_1788: Unknown result type (might be due to invalid IL or missing references) //IL_178e: Expected O, but got Unknown //IL_17a4: Unknown result type (might be due to invalid IL or missing references) //IL_17aa: Expected O, but got Unknown //IL_17c0: Unknown result type (might be due to invalid IL or missing references) //IL_17c6: Expected O, but got Unknown //IL_17dc: Unknown result type (might be due to invalid IL or missing references) //IL_17e2: Expected O, but got Unknown //IL_1802: Unknown result type (might be due to invalid IL or missing references) //IL_1848: Unknown result type (might be due to invalid IL or missing references) //IL_184e: Expected O, but got Unknown //IL_1864: Unknown result type (might be due to invalid IL or missing references) //IL_186a: Expected O, but got Unknown //IL_1887: Unknown result type (might be due to invalid IL or missing references) //IL_18cd: Unknown result type (might be due to invalid IL or missing references) //IL_18d3: Expected O, but got Unknown //IL_18e9: Unknown result type (might be due to invalid IL or missing references) //IL_18ef: Expected O, but got Unknown //IL_1905: Unknown result type (might be due to invalid IL or missing references) //IL_190b: Expected O, but got Unknown //IL_192b: Unknown result type (might be due to invalid IL or missing references) //IL_1971: Unknown result type (might be due to invalid IL or missing references) //IL_1977: Expected O, but got Unknown //IL_198d: Unknown result type (might be due to invalid IL or missing references) //IL_1993: Expected O, but got Unknown //IL_19b0: Unknown result type (might be due to invalid IL or missing references) //IL_19f6: Unknown result type (might be due to invalid IL or missing references) //IL_19fc: Expected O, but got Unknown //IL_1a12: Unknown result type (might be due to invalid IL or missing references) //IL_1a18: Expected O, but got Unknown //IL_1a2e: Unknown result type (might be due to invalid IL or missing references) //IL_1a34: Expected O, but got Unknown UpgradeApi.Register(new UpgradeDefinition("ArceDev.GameModeRounds/spray", "Spray", (UpgradeScope)1, ReadIconPng("ArceDev.GameModeRounds/spray"), Color32.op_Implicit(new Color32((byte)230, (byte)205, (byte)28, byte.MaxValue)), GameModeRoundsText.UpgradeDescription("A huge amount of Attack Speed\n+12 Ammo\nA lot lower Damage\n+0.25s Reload Time"), (Func<IReadOnlyDictionary<string, float>, string>)DetailedSprayDescription, (Func<UpgradeTarget, bool>)delegate(UpgradeTarget target) { Item item = ((UpgradeTarget)(ref target)).Item; Weapon val = (Weapon)(object)((item is Weapon) ? item : null); return val != null && !Object.op_Implicit((Object)(object)((Item)val).Melee); }, (IEnumerable<string>)new string[1] { "game-mode-rounds" }, (IEnumerable<string>)null, (IEnumerable<UpgradeParameterDefinition>)(object)new UpgradeParameterDefinition[4] { new UpgradeParameterDefinition("attackSpeedMultiplier", 3f, 1f, 20f), new UpgradeParameterDefinition("ammoBonus", 12f, 0f, 100f), new UpgradeParameterDefinition("damageMultiplier", 0.25f, 0.01f, 1f), new UpgradeParameterDefinition("reloadTimeBonus", 0.25f, 0f, 10f) })); GameModeRoundsUpgradeApi.RegisterRarity("ArceDev.GameModeRounds/spray", GameModeRoundsRarity.Uncommon); UpgradeApi.Contexts.Configure("ArceDev.GameModeRounds/match", "ArceDev.GameModeRounds/spray", new UpgradeRules(int.MaxValue, (IEnumerable<KeyValuePair<string, float>>)null, (IEnumerable<string>)null)); UpgradeApi.Register(new UpgradeDefinition("ArceDev.GameModeRounds/quick-charge", "Quick Charge", (UpgradeScope)1, ReadIconPng("ArceDev.GameModeRounds/quick-charge"), Color32.op_Implicit(new Color32((byte)70, (byte)190, (byte)225, byte.MaxValue)), GameModeRoundsText.Text("Increases reload speed", "Aumenta la velocidad de recarga"), (Func<IReadOnlyDictionary<string, float>, string>)((IReadOnlyDictionary<string, float> p) => GameModeRoundsText.UpgradeDescription(QuickChargeDescription(p))), (Func<UpgradeTarget, bool>)delegate(UpgradeTarget target) { Item item = ((UpgradeTarget)(ref target)).Item; Weapon val = (Weapon)(object)((item is Weapon) ? item : null); return val != null && !Object.op_Implicit((Object)(object)((Item)val).Melee); }, (IEnumerable<string>)new string[1] { "game-mode-rounds" }, (IEnumerable<string>)null, (IEnumerable<UpgradeParameterDefinition>)(object)new UpgradeParameterDefinition[1] { new UpgradeParameterDefinition("reloadTimeMultiplier", 0.65f, 0.01f, 1f) })); GameModeRoundsUpgradeApi.RegisterRarity("ArceDev.GameModeRounds/quick-charge", GameModeRoundsRarity.Common); UpgradeApi.Contexts.Configure("ArceDev.GameModeRounds/match", "ArceDev.GameModeRounds/quick-charge", new UpgradeRules(int.MaxValue, (IEnumerable<KeyValuePair<string, float>>)null, (IEnumerable<string>)null)); UpgradeApi.Register(new UpgradeDefinition("ArceDev.GameModeRounds/full-auto", "Full Auto", (UpgradeScope)1, ReadIconPng("ArceDev.GameModeRounds/full-auto"), Color32.op_Implicit(new Color32((byte)235, (byte)105, (byte)55, byte.MaxValue)), GameModeRoundsText.Text("Hold fire to shoot continuously", "Mantén presionado el disparo para disparar continuamente"), (Func<IReadOnlyDictionary<string, float>, string>)((IReadOnlyDictionary<string, float> _) => GameModeRoundsText.Text("Hold fire to shoot continuously", "Mantén presionado el disparo para disparar continuamente")), (Func<UpgradeTarget, bool>)delegate(UpgradeTarget target) { Item item = ((UpgradeTarget)(ref target)).Item; Weapon val = (Weapon)(object)((item is Weapon) ? item : null); return val != null && !Object.op_Implicit((Object)(object)((Item)val).Melee); }, (IEnumerable<string>)new string[1] { "game-mode-rounds" }, (IEnumerable<string>)null, (IEnumerable<UpgradeParameterDefinition>)(object)new UpgradeParameterDefinition[1] { new UpgradeParameterDefinition("fullAuto", 1f, 0f, 1f) })); GameModeRoundsUpgradeApi.RegisterRarity("ArceDev.GameModeRounds/full-auto", GameModeRoundsRarity.Common); UpgradeApi.Contexts.Configure("ArceDev.GameModeRounds/match", "ArceDev.GameModeRounds/full-auto", new UpgradeRules(1, (IEnumerable<KeyValuePair<string, float>>)null, (IEnumerable<string>)null)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/homing-bullets", "Homing Bullets", new Color32((byte)180, (byte)90, (byte)220, byte.MaxValue), "Bullets smoothly seek enemies\nA lot lower Damage", (IReadOnlyDictionary<string, float> parameters) => string.Format(CultureInfo.InvariantCulture, "Bullets smoothly seek enemies\n-{0:0}% Damage", (1f - parameters["damageMultiplier"]) * 100f), GameModeRoundsRarity.Rare, new UpgradeParameterDefinition("damageMultiplier", 0.5f, 0.01f, 1f), new UpgradeParameterDefinition("homingTurnSpeed", 60f, 1f, 360f), new UpgradeParameterDefinition("homingRange", 60f, 1f, 250f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/slow-mo", "Slow-Mo", new Color32((byte)75, (byte)155, (byte)230, byte.MaxValue), "Slower Bullets\nMore Damage", (IReadOnlyDictionary<string, float> parameters) => string.Format(CultureInfo.InvariantCulture, "-{0:0}% Projectile Speed\n+{1:0}% Damage", (1f - parameters["projectileSpeedMultiplier"]) * 100f, (parameters["damageMultiplier"] - 1f) * 100f), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("projectileSpeedMultiplier", 0.75f, 0.05f, 1f), new UpgradeParameterDefinition("damageMultiplier", 1.25f, 1f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/big-bullet", "Big Bullet", new Color32((byte)220, (byte)105, (byte)70, byte.MaxValue), "Much bigger Bullets\n+0.5s Reload Time", (IReadOnlyDictionary<string, float> parameters) => string.Format(CultureInfo.InvariantCulture, "+{0:0}% Projectile Size\n+{1:0.##}s Reload Time", (parameters["projectileSizeMultiplier"] - 1f) * 100f, parameters["reloadTimeBonus"]), GameModeRoundsRarity.Common, new UpgradeParameterDefinition("projectileSizeMultiplier", 3f, 1f, 10f), new UpgradeParameterDefinition("reloadTimeBonus", 0.5f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/quick-reload", "Quick Reload", new Color32((byte)70, (byte)205, (byte)225, byte.MaxValue), "Much faster Reload", (IReadOnlyDictionary<string, float> parameters) => string.Format("-{0:0}% Reload Time", PercentReduction(parameters["reloadTimeMultiplier"])), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("reloadTimeMultiplier", 0.3f, 0.01f, 1f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/fast-forward", "Fast Forward", new Color32((byte)80, (byte)180, (byte)235, byte.MaxValue), "Much faster Bullets\nFaster Reload", (IReadOnlyDictionary<string, float> parameters) => string.Format(CultureInfo.InvariantCulture, "+{0:0}% Projectile Speed\n+{1:0}% Reload Speed", PercentIncrease(parameters["projectileSpeedMultiplier"]), PercentIncrease(parameters["reloadSpeedMultiplier"])), GameModeRoundsRarity.Common, new UpgradeParameterDefinition("projectileSpeedMultiplier", 2f, 1f, 20f), new UpgradeParameterDefinition("reloadSpeedMultiplier", 1.3f, 1f, 20f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/quick-shot", "Quick Shot", new Color32((byte)245, (byte)185, (byte)65, byte.MaxValue), "Much faster Bullets\n+0.25s Reload Time", (IReadOnlyDictionary<string, float> parameters) => string.Format(CultureInfo.InvariantCulture, "+{0:0}% Projectile Speed\n+{1:0.##}s Reload Time", PercentIncrease(parameters["projectileSpeedMultiplier"]), parameters["reloadTimeBonus"]), GameModeRoundsRarity.Common, new UpgradeParameterDefinition("projectileSpeedMultiplier", 2.5f, 1f, 20f), new UpgradeParameterDefinition("reloadTimeBonus", 0.25f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/fastball", "Fastball", new Color32((byte)235, (byte)125, (byte)55, byte.MaxValue), "Extremely fast Bullets\nLower Attack Speed\n+0.25s Reload Time", (IReadOnlyDictionary<string, float> parameters) => string.Format(CultureInfo.InvariantCulture, "+{0:0}% Projectile Speed\n-{1:0}% Attack Speed\n+{2:0.##}s Reload Time", PercentIncrease(parameters["projectileSpeedMultiplier"]), parameters["attackIntervalBonus"] * 100f, parameters["reloadTimeBonus"]), GameModeRoundsRarity.Common, new UpgradeParameterDefinition("projectileSpeedMultiplier", 3.5f, 1f, 20f), new UpgradeParameterDefinition("attackIntervalBonus", 0.5f, 0f, 20f), new UpgradeParameterDefinition("reloadTimeBonus", 0.25f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/combine", "Combine", new Color32((byte)195, (byte)95, (byte)225, byte.MaxValue), "Much more Damage\nLess Ammo\n+0.5s Reload Time", (IReadOnlyDictionary<string, float> parameters) => string.Format(CultureInfo.InvariantCulture, "+{0:0}% Damage\n{1:+0;-0;0} Ammo\n+{2:0.##}s Reload Time", PercentIncrease(parameters["damageMultiplier"]), parameters["ammoBonus"], parameters["reloadTimeBonus"]), GameModeRoundsRarity.Common, new UpgradeParameterDefinition("damageMultiplier", 2f, 1f, 20f), new UpgradeParameterDefinition("ammoBonus", -2f, -100f, 0f), new UpgradeParameterDefinition("reloadTimeBonus", 0.5f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/careful-planning", "Careful Planning", new Color32((byte)125, (byte)95, (byte)205, byte.MaxValue), "Much more Damage\nMuch lower Attack Speed\n+0.5s Reload Time", (IReadOnlyDictionary<string, float> parameters) => string.Format(CultureInfo.InvariantCulture, "+{0:0}% Damage\n-{1:0}% Attack Speed\n+{2:0.##}s Reload Time", PercentIncrease(parameters["damageMultiplier"]), parameters["attackIntervalBonus"] * 100f, parameters["reloadTimeBonus"]), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("damageMultiplier", 2f, 1f, 20f), new UpgradeParameterDefinition("attackIntervalBonus", 1.5f, 0f, 20f), new UpgradeParameterDefinition("reloadTimeBonus", 0.5f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/wind-up", "Wind Up", new Color32((byte)235, (byte)95, (byte)80, byte.MaxValue), "Faster and stronger Bullets\nLower Attack Speed\n+0.5s Reload Time", (IReadOnlyDictionary<string, float> parameters) => string.Format(CultureInfo.InvariantCulture, "+{0:0}% Projectile Speed\n+{1:0}% Damage\n-{2:0}% Attack Speed\n+{3:0.##}s Reload Time", PercentIncrease(parameters["projectileSpeedMultiplier"]), PercentIncrease(parameters["damageMultiplier"]), parameters["attackIntervalBonus"] * 100f, parameters["reloadTimeBonus"]), GameModeRoundsRarity.Common, new UpgradeParameterDefinition("projectileSpeedMultiplier", 2f, 1f, 20f), new UpgradeParameterDefinition("damageMultiplier", 1.6f, 1f, 20f), new UpgradeParameterDefinition("attackIntervalBonus", 1f, 0f, 20f), new UpgradeParameterDefinition("reloadTimeBonus", 0.5f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/barrage", "Barrage", new Color32((byte)220, (byte)80, (byte)70, byte.MaxValue), "Fire many Bullets at once\nMore Ammo\nMuch lower Damage\n+0.25s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0} Bullets\n+{1:0} Ammo\n-{2:0}% Damage\n+{3:0.##}s Reload Time", p["projectileCountBonus"], p["ammoBonus"], PercentReduction(p["damageMultiplier"]), p["reloadTimeBonus"]), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("projectileCountBonus", 4f, 0f, 100f), new UpgradeParameterDefinition("ammoBonus", 5f, 0f, 100f), new UpgradeParameterDefinition("damageMultiplier", 0.3f, 0.01f, 1f), new UpgradeParameterDefinition("reloadTimeBonus", 0.25f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/buckshot", "Buckshot", new Color32((byte)225, (byte)145, (byte)65, byte.MaxValue), "A shotgun-like spread\nMore Ammo\nMuch lower Damage\n+0.25s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0} Bullets\n+{1:0} Ammo\n-{2:0}% Damage\n+{3:0.#} Spread\n+{4:0.##}s Reload Time", p["projectileCountBonus"], p["ammoBonus"], PercentReduction(p["damageMultiplier"]), p["spreadBonus"], p["reloadTimeBonus"]), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("projectileCountBonus", 4f, 0f, 100f), new UpgradeParameterDefinition("ammoBonus", 5f, 0f, 100f), new UpgradeParameterDefinition("damageMultiplier", 0.4f, 0.01f, 1f), new UpgradeParameterDefinition("spreadBonus", 8f, 0f, 90f), new UpgradeParameterDefinition("reloadTimeBonus", 0.25f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/huge", "Huge", new Color32((byte)80, (byte)190, (byte)105, byte.MaxValue), "Much more Health", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0}% Health", PercentIncrease(p["healthMultiplier"])), GameModeRoundsRarity.Common, new UpgradeParameterDefinition("healthMultiplier", 1.8f, 1f, 20f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/glass-cannon", "Glass Cannon", new Color32((byte)240, (byte)95, (byte)120, byte.MaxValue), "Much more Damage\nMuch less Health\n+0.25s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0}% Damage\n-{1:0}% Health\n+{2:0.##}s Reload Time", PercentIncrease(p["damageMultiplier"]), PercentReduction(p["healthMultiplier"]), p["reloadTimeBonus"]), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("damageMultiplier", 2f, 1f, 20f), new UpgradeParameterDefinition("healthMultiplier", 0.5f, 0.01f, 1f), new UpgradeParameterDefinition("reloadTimeBonus", 0.25f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/steady-shot", "Steady Shot", new Color32((byte)75, (byte)185, (byte)190, byte.MaxValue), "More Health\nMuch faster Bullets\n+0.25s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0}% Health\n+{1:0}% Projectile Speed\n+{2:0.##}s Reload Time", PercentIncrease(p["healthMultiplier"]), PercentIncrease(p["projectileSpeedMultiplier"]), p["reloadTimeBonus"]), GameModeRoundsRarity.Common, new UpgradeParameterDefinition("healthMultiplier", 1.4f, 1f, 20f), new UpgradeParameterDefinition("projectileSpeedMultiplier", 2f, 1f, 20f), new UpgradeParameterDefinition("reloadTimeBonus", 0.25f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/tank", "Tank", new Color32((byte)95, (byte)145, (byte)90, byte.MaxValue), "Much more Health\nLower Attack Speed\n+0.5s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0}% Health\n-{1:0}% Attack Speed\n+{2:0.##}s Reload Time", PercentIncrease(p["healthMultiplier"]), p["attackIntervalBonus"] * 100f, p["reloadTimeBonus"]), GameModeRoundsRarity.Common, new UpgradeParameterDefinition("healthMultiplier", 2f, 1f, 20f), new UpgradeParameterDefinition("attackIntervalBonus", 0.25f, 0f, 20f), new UpgradeParameterDefinition("reloadTimeBonus", 0.5f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/scavenger", "Scavenger", new Color32((byte)150, (byte)175, (byte)75, byte.MaxValue), "Dealing Damage reloads your Weapon\n+0.5s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("Dealing Damage reloads your Weapon\n+{0:0.##}s Reload Time", p["reloadTimeBonus"]), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("reloadOnDamage", 1f, 0f, 1f), new UpgradeParameterDefinition("reloadTimeBonus", 0.5f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/leech", "Leech", new Color32((byte)170, (byte)60, (byte)90, byte.MaxValue), "Steal Health from Damage\nMore Health", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0}% Life Steal\n+{1:0}% Health", p["lifeSteal"] * 100f, PercentIncrease(p["healthMultiplier"])), GameModeRoundsRarity.Common, new UpgradeParameterDefinition("lifeSteal", 0.75f, 0f, 10f), new UpgradeParameterDefinition("healthMultiplier", 1.3f, 1f, 20f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/thruster", "Thruster", new Color32((byte)245, (byte)135, (byte)55, byte.MaxValue), "Bullets strongly push targets\n+0.25s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0}% Projectile Force\n+{1:0.##}s Reload Time", PercentIncrease(p["projectileForceMultiplier"]), p["reloadTimeBonus"]), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("projectileForceMultiplier", 2f, 1f, 20f), new UpgradeParameterDefinition("reloadTimeBonus", 0.25f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/grow", "Grow", new Color32((byte)105, (byte)205, (byte)95, byte.MaxValue), "Bullets gain Damage while travelling\n+0.25s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0}% Damage per second\n+{1:0.##}s Reload Time", p["damageGrowthPerSecond"] * 100f, p["reloadTimeBonus"]), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("damageGrowthPerSecond", 0.5f, 0f, 10f), new UpgradeParameterDefinition("reloadTimeBonus", 0.25f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/cold-bullets", "Cold Bullets", new Color32((byte)90, (byte)195, (byte)240, byte.MaxValue), "Bullets greatly slow enemies\n+0.25s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("-{0:0}% Movement Speed for {1:0.#}s\n+{2:0.##}s Reload Time", p["hitSlow"] * 100f, p["hitSlowDuration"], p["reloadTimeBonus"]), GameModeRoundsRarity.Common, new UpgradeParameterDefinition("hitSlow", 0.7f, 0f, 0.95f), new UpgradeParameterDefinition("hitSlowDuration", 3f, 0f, 30f), new UpgradeParameterDefinition("reloadTimeBonus", 0.25f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/chilling-presence", "Chilling Presence", new Color32((byte)100, (byte)170, (byte)225, byte.MaxValue), "Slow nearby enemies\nMore Health", (IReadOnlyDictionary<string, float> p) => string.Format("-{0:0}% nearby Enemy Movement\n+{1:0}% Health", p["auraSlow"] * 100f, PercentIncrease(p["healthMultiplier"])), GameModeRoundsRarity.Rare, new UpgradeParameterDefinition("auraSlow", 0.15f, 0f, 0.95f), new UpgradeParameterDefinition("auraRange", 6f, 0f, 50f), new UpgradeParameterDefinition("healthMultiplier", 1.25f, 1f, 20f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/chase", "Chase", new Color32((byte)235, (byte)105, (byte)65, byte.MaxValue), "Move faster towards visible enemies\nMore Health", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0}% Chase Movement\n+{1:0}% Health", p["chaseSpeedMultiplier"] * 100f, PercentIncrease(p["healthMultiplier"])), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("chaseSpeedMultiplier", 0.6f, 0f, 10f), new UpgradeParameterDefinition("healthMultiplier", 1.3f, 1f, 20f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/brawler", "Brawler", new Color32((byte)205, (byte)80, (byte)65, byte.MaxValue), "Temporarily gain massive Health after dealing Damage", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0}% Health for {1:0.#}s after dealing Damage", p["temporaryHealthMultiplier"] * 100f, p["temporaryHealthDuration"]), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("temporaryHealthMultiplier", 2f, 0f, 20f), new UpgradeParameterDefinition("temporaryHealthDuration", 3f, 0f, 30f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/bouncy", "Bouncy", new Color32((byte)235, (byte)165, (byte)65, byte.MaxValue), "Bouncing Bullets\nMore Damage\n+0.25s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0} Bullet Bounces\n+{1:0}% Damage\n+{2:0.##}s Reload Time", p["bounceCountBonus"], PercentIncrease(p["damageMultiplier"]), p["reloadTimeBonus"]), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("bounceCountBonus", 2f, 0f, 100f), new UpgradeParameterDefinition("damageMultiplier", 1.25f, 1f, 20f), new UpgradeParameterDefinition("reloadTimeBonus", 0.25f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/riccochet", "Riccochet", new Color32((byte)80, (byte)195, (byte)210, byte.MaxValue), "Bouncing Bullets lose Speed\nFaster Attack Speed\n+0.25s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0} Bullet Bounces\n-{1:0}% Speed per Bounce\n+{2:0}% Attack Speed\n+{3:0.##}s Reload Time", p["bounceCountBonus"], PercentReduction(p["bounceSpeedMultiplier"]), PercentIncrease(p["attackSpeedMultiplier"]), p["reloadTimeBonus"]), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("bounceCountBonus", 2f, 0f, 100f), new UpgradeParameterDefinition("bounceSpeedMultiplier", 0.5f, 0.01f, 1f), new UpgradeParameterDefinition("attackSpeedMultiplier", 1.25f, 1f, 20f), new UpgradeParameterDefinition("reloadTimeBonus", 0.25f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/mayhem", "Mayhem", new Color32((byte)210, (byte)70, (byte)205, byte.MaxValue), "Many Bullet Bounces\nSlightly lower Damage\n+0.5s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0} Bullet Bounces\n-{1:0}% Damage\n+{2:0.##}s Reload Time", p["bounceCountBonus"], PercentReduction(p["damageMultiplier"]), p["reloadTimeBonus"]), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("bounceCountBonus", 5f, 0f, 100f), new UpgradeParameterDefinition("damageMultiplier", 0.85f, 0.01f, 1f), new UpgradeParameterDefinition("reloadTimeBonus", 0.5f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/trickster", "Trickster", new Color32((byte)145, (byte)85, (byte)220, byte.MaxValue), "Bullets gain Damage after Bouncing\nLower Damage\n+0.5s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0} Bullet Bounces\n+{1:0}% Damage per Bounce\n-{2:0}% Damage\n+{3:0.##}s Reload Time", p["bounceCountBonus"], p["bounceDamageBonus"] * 100f, PercentReduction(p["damageMultiplier"]), p["reloadTimeBonus"]), GameModeRoundsRarity.Epic, new UpgradeParameterDefinition("bounceCountBonus", 2f, 0f, 100f), new UpgradeParameterDefinition("bounceDamageBonus", 0.8f, 0f, 20f), new UpgradeParameterDefinition("bounceDamageCapBonus", 2f, 0f, 100f), new UpgradeParameterDefinition("damageMultiplier", 0.8f, 0.01f, 1f), new UpgradeParameterDefinition("reloadTimeBonus", 0.5f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/burst", "Burst", new Color32((byte)235, (byte)120, (byte)75, byte.MaxValue), "Fire multiple Bullets in sequence\nMore Ammo\nMuch lower Damage\n+0.25s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0} Sequential Bullets\n+{1:0} Ammo\n-{2:0}% Damage\n+{3:0.##}s Reload Time", p["burstCountBonus"], p["ammoBonus"], PercentReduction(p["damageMultiplier"]), p["reloadTimeBonus"]), GameModeRoundsRarity.Common, new UpgradeParameterDefinition("burstCountBonus", 2f, 0f, 100f), new UpgradeParameterDefinition("burstInterval", 0.08f, 0.02f, 1f), new UpgradeParameterDefinition("ammoBonus", 3f, 0f, 100f), new UpgradeParameterDefinition("damageMultiplier", 0.4f, 0.01f, 1f), new UpgradeParameterDefinition("reloadTimeBonus", 0.25f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/target-bounce", "Target Bounce", new Color32((byte)95, (byte)205, (byte)155, byte.MaxValue), "Bullets seek visible targets after Bouncing\nLower Damage\n+0.25s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0} Bullet Bounce\nBullets seek visible targets after Bouncing\n-{1:0}% Damage\n+{2:0.##}s Reload Time", p["bounceCountBonus"], PercentReduction(p["damageMultiplier"]), p["reloadTimeBonus"]), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("bounceCountBonus", 1f, 0f, 100f), new UpgradeParameterDefinition("targetAfterBounce", 1f, 0f, 1f), new UpgradeParameterDefinition("damageMultiplier", 0.8f, 0.01f, 1f), new UpgradeParameterDefinition("reloadTimeBonus", 0.25f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/dazzle", "Dazzle", new Color32((byte)245, (byte)215, (byte)75, byte.MaxValue), "Bullets stun repeatedly\n+0.25s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("{0:0} Stuns lasting {1:0.##}s\n+{2:0.##}s Reload Time", p["stunPulseCount"], p["stunPulseDuration"], p["reloadTimeBonus"]), GameModeRoundsRarity.Common, new UpgradeParameterDefinition("stunPulseCount", 3f, 1f, 30f), new UpgradeParameterDefinition("stunPulseDuration", 0.15f, 0.05f, 2f), new UpgradeParameterDefinition("stunPulseInterval", 0.45f, 0.05f, 5f), new UpgradeParameterDefinition("reloadTimeBonus", 0.25f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/poison", "Poison", new Color32((byte)105, (byte)205, (byte)75, byte.MaxValue), "Bullets deal Damage over time\nMore Damage\nFaster Reload\nLess Ammo", (IReadOnlyDictionary<string, float> p) => string.Format("Damage dealt over {0:0.#}s\n+{1:0}% Damage\n+{2:0}% Reload Speed\n{3:+0;-0;0} Ammo", p["damageOverTimeDuration"], PercentIncrease(p["damageMultiplier"]), PercentIncrease(p["reloadSpeedMultiplier"]), p["ammoBonus"]), GameModeRoundsRarity.Common, new UpgradeParameterDefinition("damageOverTimeDuration", 3f, 0.1f, 30f), new UpgradeParameterDefinition("damageMultiplier", 1.7f, 1f, 20f), new UpgradeParameterDefinition("reloadSpeedMultiplier", 1.3f, 1f, 20f), new UpgradeParameterDefinition("ammoBonus", -1f, -100f, 0f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/parasite", "Parasite", new Color32((byte)170, (byte)65, (byte)125, byte.MaxValue), "Bullets deal Damage over time\nLife Steal\nMore Health and Damage\n+0.25s Reload Time", (IReadOnlyDictionary<string, float> p) => string.Format("Damage dealt over {0:0.#}s\n+{1:0}% Life Steal\n+{2:0}% Health\n+{3:0}% Damage\n+{4:0.##}s Reload Time", p["damageOverTimeDuration"], p["lifeSteal"] * 100f, PercentIncrease(p["healthMultiplier"]), PercentIncrease(p["damageMultiplier"]), p["reloadTimeBonus"]), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("damageOverTimeDuration", 5f, 0.1f, 30f), new UpgradeParameterDefinition("lifeSteal", 0.5f, 0f, 10f), new UpgradeParameterDefinition("healthMultiplier", 1.25f, 1f, 20f), new UpgradeParameterDefinition("damageMultiplier", 1.25f, 1f, 20f), new UpgradeParameterDefinition("reloadTimeBonus", 0.25f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/decay", "Decay", new Color32((byte)110, (byte)145, (byte)180, byte.MaxValue), "Damage dealt to you is spread over time\nMore Health", (IReadOnlyDictionary<string, float> p) => string.Format("Damage received over {0:0.#}s\n+{1:0}% Health", p["decayDuration"], PercentIncrease(p["healthMultiplier"])), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("decayDuration", 4f, 0.1f, 60f), new UpgradeParameterDefinition("healthMultiplier", 1.5f, 1f, 20f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/taste-of-blood", "Taste of Blood", new Color32((byte)205, (byte)55, (byte)65, byte.MaxValue), "Move faster after dealing Damage\nLife Steal", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0}% Movement Speed for {1:0.#}s after dealing Damage\n+{2:0}% Life Steal", p["tasteMovementBonus"] * 100f, p["tasteDuration"], p["lifeSteal"] * 100f), GameModeRoundsRarity.Uncommon, new UpgradeParameterDefinition("tasteMovementBonus", 0.5f, 0f, 10f), new UpgradeParameterDefinition("tasteDuration", 3f, 0.1f, 30f), new UpgradeParameterDefinition("lifeSteal", 0.3f, 0f, 10f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/pristine-perseverence", "Pristine Perseverence", new Color32((byte)235, (byte)220, (byte)105, byte.MaxValue), "Massive Health while nearly unharmed", (IReadOnlyDictionary<string, float> p) => string.Format("+{0:0}% Health while above {1:0}% Health", PercentIncrease(p["pristineHealthMultiplier"]), p["pristineThreshold"] * 100f), GameModeRoundsRarity.Legendary, new UpgradeParameterDefinition("pristineHealthMultiplier", 5f, 1f, 100f), new UpgradeParameterDefinition("pristineThreshold", 0.9f, 0f, 1f)); RegisterWeaponUpgrade("ArceDev.GameModeRounds/lifestealer", "Lifestealer", new Color32((byte)145, (byte)45, (byte)90, byte.MaxValue), "Steal Health from nearby enemies\nMore Health", (IReadOnlyDictionary<string, float> p) => string.Format("Steal {0:0.#} Health/s within {1:0.#}m\n+{2:0}% Health", p["proximityDrainPerSecond"], p["proximityDrainRange"], PercentIncrease(p["healthMultiplier"])), GameModeRoundsRarity.Epic, new UpgradeParameterDefinition("proximityDrainPerSecond", 10f, 0f, 1000f), new UpgradeParameterDefinition("proximityDrainRange", 5f, 0f, 50f), new UpgradeParameterDefinition("healthMultiplier", 1.25f, 1f, 20f)); } internal static AuraState[] ResolveAuras(Player player, Item? weapon) { if (!Object.op_Implicit((Object)(object)player) || !Object.op_Implicit((Object)(object)weapon)) { return Array.Empty<AuraState>(); } List<AuraState> list = new List<AuraState>(AuraDefinitions.Length); (string, string)[] auraDefinitions = AuraDefinitions; ResolvedUpgrade val = default(ResolvedUpgrade); for (int i = 0; i < auraDefinitions.Length; i++) { var (text, text2) = auraDefinitions[i]; if (UpgradeApi.State.TryResolve("ArceDev.GameModeRounds/match", player, weapon, text, ref val)) { float num = val.GetFloat(text2); if (num > 0f && !float.IsNaN(num) && !float.IsInfinity(num)) { list.Add(new AuraState(text, num)); } } } return list.ToArray(); } private static void RegisterWeaponUpgrade(string id, string name, Color32 color, string abstractDescription, Func<IReadOnlyDictionary<string, float>, string> detailedDescription, GameModeRoundsRarity rarity, params UpgradeParameterDefinition[] parameters) { //IL_0017: 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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown UpgradeApi.Register(new UpgradeDefinition(id, name, (UpgradeScope)1, ReadIconPng(id), Color32.op_Implicit(color), GameModeRoundsText.UpgradeDescription(abstractDescription), (Func<IReadOnlyDictionary<string, float>, string>)((IReadOnlyDictionary<string, float> p) => GameModeRoundsText.UpgradeDescription(detailedDescription(p))), (Func<UpgradeTarget, bool>)delegate(UpgradeTarget target) { Item item = ((UpgradeTarget)(ref target)).Item; Weapon val = (Weapon)(object)((item is Weapon) ? item : null); return val != null && !Object.op_Implicit((Object)(object)((Item)val).Melee); }, (IEnumerable<string>)new string[1] { "game-mode-rounds" }, (IEnumerable<string>)null, (IEnumerable<UpgradeParameterDefinition>)parameters)); GameModeRoundsUpgradeApi.RegisterRarity(id, rarity); UpgradeApi.Contexts.Configure("ArceDev.GameModeRounds/match", id, new UpgradeRules(int.MaxValue, (IEnumerable<KeyValuePair<string, float>>)null, (IEnumerable<string>)null)); } private static string DetailedSprayDescription(IReadOnlyDictionary<string, float> parameters) { return GameModeRoundsText.UpgradeDescription(string.Format(CultureInfo.InvariantCulture, "+{0:0}% Attack Speed\n+{1:0} Ammo\n-{2:0}% Damage\n+{3:0.##}s Reload Time", (parameters["attackSpeedMultiplier"] - 1f) * 100f, parameters["ammoBonus"], (1f - parameters["damageMultiplier"]) * 100f, parameters["reloadTimeBonus"])); } private static string QuickChargeDescription(IReadOnlyDictionary<string, float> parameters) { return string.Format(CultureInfo.InvariantCulture, "-{0:0}% Reload Time", (1f - parameters["reloadTimeMultiplier"]) * 100f); } private static float PercentIncrease(float multiplier) { return (multiplier - 1f) * 100f; } private static float PercentReduction(float multiplier) { return (1f - multiplier) * 100f; } internal static byte[] ReadIconPng(string upgradeId) { string text = upgradeId.Substring(upgradeId.LastIndexOf('/') + 1); string text2 = "GameModeRounds.Icons." + text + ".png"; using Stream stream = typeof(GameModeRoundsUpgrades).Assembly.GetManifestResourceStream(text2) ?? throw new InvalidOperationException("Embedded upgrade icon '" + text2 + "' was not found."); using MemoryStream memoryStream = new MemoryStream(); stream.CopyTo(memoryStream); return memoryStream.ToArray(); } } internal static class GoldbergMeshBuilder { private const int Frequency = 2; private const int ExpectedDualVertices = 80; private const int ExpectedFaces = 42; private const int ExpectedEdges = 120; private const int ExpectedSurfaceTriangles = 240; internal static Mesh Build() { (List<Vector3>, List<int[]>) tuple = BuildGeodesic(); List<Vector3> primal = tuple.Item1; List<int[]> item = tuple.Item2; Vector3[] dual = item.Select((int[] triangle) => DualVertex(primal[triangle[0]], primal[triangle[1]], primal[triangle[2]])).ToArray(); List<int[]> faces = BuildDualFaces(primal, item, dual); NormalizeOuterRadius(dual); ValidateTopology(faces, dual); List<Vector3> vertices = new List<Vector3>(); List<Vector3> radial = new List<Vector3>(); List<Vector2> edgeDistance = new List<Vector2>(); List<int> triangles = new List<int>(); AddSurfaceGeometry(faces, dual, vertices, radial, edgeDistance, triangles); Mesh val = CreateMesh(vertices, radial, edgeDistance, triangles); ValidateMesh(val, vertices, radial, edgeDistance); return val; } private static List<int[]> BuildDualFaces(IReadOnlyList<Vector3> primal, IReadOnlyList<int[]> triangles, IReadOnlyList<Vector3> dual) { //IL_0085: Unknown result type (might be due to invalid IL or missing references) List<int[]> list = new List<int[]>(primal.Count); int vertex; for (vertex = 0; vertex < primal.Count; vertex++) { int[] adjacent = (from pair in triangles.Select((int[] triangle, int index) => (triangle: triangle, index: index)) where pair.triangle.Contains(vertex) select pair.index).ToArray(); int[] array = OrderAround(primal[vertex], adjacent, dual); if (!PointsOutward(array, dual)) { Array.Reverse(array); } list.Add(array); } return list; } private static int[] OrderAround(Vector3 normal, IEnumerable<int> adjacent, IReadOnlyList<Vector3> dual) { //IL_000e: 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_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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) Vector3 val = Vector3.Cross(normal, (Mathf.Abs(normal.y) < 0.9f) ? Vector3.up : Vector3.right); Vector3 tangent = ((Vector3)(ref val)).normalized; Vector3 bitangent = Vector3.Cross(normal, tangent); return adjacent.OrderBy((int index) => Mathf.Atan2(Vector3.Dot(dual[index] - normal, bitangent), Vector3.Dot(dual[index] - normal, tangent))).ToArray(); } private static void NormalizeOuterRadius(IList<Vector3> dual) { //IL_0032: 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) float num = dual.Max((Vector3 point) => ((Vector3)(ref point)).magnitude); for (int num2 = 0; num2 < dual.Count; num2++) { int index = num2; dual[index] /= num; } } private static void AddSurfaceGeometry(IEnumerable<int[]> faces, IReadOnlyList<Vector3> dual, ICollection<Vector3> vertices, ICollection<Vector3> radial, ICollection<Vector2> edgeDistance, ICollection<int> triangles) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_009e: 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_00ae: 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) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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) foreach (int[] face in faces) { Vector3 item = face.Select((int index) => dual[index]).Aggregate((Vector3 left, Vector3 right) => left + right) / (float)face.Length; for (int num = 0; num < face.Length; num++) { Vector3 item2 = dual[face[num]]; Vector3 item3 = dual[face[(num + 1) % face.Length]]; int count = vertices.Count; vertices.Add(item); vertices.Add(item2); vertices.Add(item3); radial.Add(((Vector3)(ref item)).normalized); radial.Add(((Vector3)(ref item2)).normalized); radial.Add(((Vector3)(ref item3)).normalized); edgeDistance.Add(Vector2.right); edgeDistance.Add(Vector2.zero); edgeDistance.Add(Vector2.zero); triangles.Add(count); triangles.Add(count + 1); triangles.Add(count + 2); } } } private static Mesh CreateMesh(List<Vector3> vertices, List<Vector3> radial, List<Vector2> edgeDistance, List<int> triangles) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown Mesh val = new Mesh { name = "GameModeRounds Goldberg F2" }; val.SetVertices(vertices); val.SetUVs(1, radial); val.SetUVs(2, edgeDistance); val.subMeshCount = 1; val.SetTriangles(triangles, 0); val.RecalculateNormals(); val.RecalculateBounds(); return val; } private static (List<Vector3>, List<int[]>) BuildGeodesic() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0181: 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_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_01a3: 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_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing ref