using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using TMPro; using UltraAchievementsRevamped.Core.Achievements; using UltraAchievementsRevamped.Core.UI; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("UltraAchievementsRevamped.Core")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("Core library for UltraAchievements")] [assembly: AssemblyFileVersion("2.0.0.0")] [assembly: AssemblyInformationalVersion("2.0.0+53de7905e782c38379c5254ecd06ea62b5c9c4ec")] [assembly: AssemblyProduct("UltraAchievementsRevamped.Core")] [assembly: AssemblyTitle("UltraAchievementsRevamped.Core")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("2.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.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 UltraAchievementsRevamped.Core { internal static class Assets { internal static AchievementPopUp AchievementPopUpPrefab; internal static AchievementPanel AchievementPanelPrefab; public static string AssetPath => Path.Combine(ModFolder, "Assets"); private static string ModFolder => Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); private static string CatalogPath => Path.Combine(AssetPath, "catalog_core.json"); internal static void LoadAssets() { //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_001a: 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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) Addressables.LoadContentCatalogAsync(CatalogPath, true, (string)null).WaitForCompletion(); AchievementPopUpPrefab = Addressables.LoadAssetAsync((object)"UltraAchievementsCore/Achievement Overlay.prefab").WaitForCompletion().GetComponent(); AchievementPanelPrefab = Addressables.LoadAssetAsync((object)"UltraAchievementsCore/Achievement Panel.prefab").WaitForCompletion().GetComponent(); } } [BepInPlugin("protract.ultrakill.ultra_achievements_core", "UltraAchievementsRevamped.Core", "2.0.0")] public class Plugin : BaseUnityPlugin { public static class PluginInfo { public const string Name = "UltraAchievementsRevamped.Core"; public const string Guid = "protract.ultrakill.ultra_achievements_core"; public const string Version = "2.0.0"; } internal static ManualLogSource Logger; private void Awake() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) Logger = ((BaseUnityPlugin)this).Logger; Logger.LogInfo((object)"UltraAchievementsRevamped.Core 2.0.0 has loaded!"); new Harmony("protract.ultrakill.ultra_achievements_core").PatchAll(); Assets.LoadAssets(); } } } namespace UltraAchievementsRevamped.Core.UI { [HarmonyPatch] public class AchievementPanel : MonoBehaviour { [SerializeField] private GameObject modButtonTemplate; [SerializeField] private GameObject modPanelTemplate; [SerializeField] private GameObject achievementTemplate; [SerializeField] private ShopButton backButton; [SerializeField] private int itemsPerPage; private readonly List modButtons = new List(); private readonly List