Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of LoreAccurateWorms v1.0.1
plugins/LoreAccurateWorms/LoreAccurateWorms.dll
Decompiled 2 weeks agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using HG.Reflection; using Microsoft.CodeAnalysis; using R2API; using RoR2; using RoR2.ContentManagement; using RoR2BepInExPack.GameAssetPaths.Version_1_39_0; using UnityEngine.AddressableAssets; using UnityEngine.ResourceManagement.AsyncOperations; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("LoreAccurateWorms")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+b3071e8547eaaab01ff83516373f6d703c3ee7a3")] [assembly: AssemblyProduct("LoreAccurateWorms")] [assembly: AssemblyTitle("LoreAccurateWorms")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.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 LoreAccurateWorms { internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } private static string getLogPrefix(string callerPath, string callerMemberName, int callerLineNumber) { int num = callerPath.LastIndexOf("LoreAccurateWorms"); if (num >= 0) { callerPath = callerPath.Substring(num + "LoreAccurateWorms".Length + 1); } return $"{callerPath}:{callerLineNumber} ({callerMemberName}) "; } internal static void Error(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { _logSource.LogError((object)(getLogPrefix(callerPath, callerMemberName, callerLineNumber) + data)); } internal static void Error_NoCallerPrefix(object data) { _logSource.LogError(data); } internal static void Fatal(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { _logSource.LogFatal((object)(getLogPrefix(callerPath, callerMemberName, callerLineNumber) + data)); } internal static void Fatal_NoCallerPrefix(object data) { _logSource.LogFatal(data); } internal static void Info(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { _logSource.LogInfo((object)(getLogPrefix(callerPath, callerMemberName, callerLineNumber) + data)); } internal static void Info_NoCallerPrefix(object data) { _logSource.LogInfo(data); } internal static void Message(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { _logSource.LogMessage((object)(getLogPrefix(callerPath, callerMemberName, callerLineNumber) + data)); } internal static void Message_NoCallerPrefix(object data) { _logSource.LogMessage(data); } internal static void Warning(object data, [CallerFilePath] string callerPath = "", [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = -1) { _logSource.LogWarning((object)(getLogPrefix(callerPath, callerMemberName, callerLineNumber) + data)); } internal static void Warning_NoCallerPrefix(object data) { _logSource.LogWarning(data); } } [BepInPlugin("Nuxlar.LoreAccurateWorms", "LoreAccurateWorms", "1.0.1")] public class Main : BaseUnityPlugin { public const string PluginGUID = "Nuxlar.LoreAccurateWorms"; public const string PluginAuthor = "Nuxlar"; public const string PluginName = "LoreAccurateWorms"; public const string PluginVersion = "1.0.1"; public ItemDef itemDef; private string lore = "Providence stood motionless, staring at the locked gate.\r\n\r\nWhere, just a moment ago, his brother had once stood.\r\n\r\nAnd now, his brother was gone.\r\n\r\nProvidence felt sick. He collapsed to his knees, retching as the gravity of what he had just done washed over him like a tidal wave.\r\n\r\nFor a while, Providence sat at the footsteps of the gate. By now, his brother would have realized what had happened.\r\n\r\nNow, there was no going back. He had made his choice.\r\n\r\nProvidence's gaze drifted to the remains of the meal he and his brother had shared prior to the activation of the gate. The last time the two had enjoyed a civil, even jovial, discussion. Providence's heart ached.\r\n\r\nAfter a while, the ache subsided. Only an emptiness remained.\r\n\r\nWith a sigh, Providence took one of the cups his brother had delicately carved from stone. And one last time, he raised the cup to the sky- a toast to the beginning of a new age for Petrichor V."; internal static Main Instance { get; private set; } public static string PluginDirectory { get; private set; } public void Awake() { Instance = this; Log.Init(((BaseUnityPlugin)this).Logger); TweakAssets(); LanguageAPI.Add("LORE_ACCURATE_WORM_LOG", lore); } private void TweakAssets() { //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) AsyncOperationHandle<ItemDef> val = AssetAsyncReferenceManager<ItemDef>.LoadAsset(new AssetReferenceT<ItemDef>(RoR2_DLC3_Items_WyrmOnHit.WyrmOnHit_asset), (AsyncReferenceHandleUnloadType)2); val.Completed += delegate(AsyncOperationHandle<ItemDef> x) { itemDef = x.Result; itemDef.loreToken = "LORE_ACCURATE_WORM_LOG"; }; } } }