using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Logging; using MSU; using Microsoft.CodeAnalysis; using RoR2; [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("JapaneseTranslations")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("Japanese translations for other Risk of Rain 2 mods")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+b174c6f4cce6956dfaa8e63b4911973ee00454fd")] [assembly: AssemblyProduct("JapaneseTranslations")] [assembly: AssemblyTitle("JapaneseTranslations")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [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 JapaneseTranslations { internal static class MsuBridge { [MethodImpl(MethodImplOptions.NoInlining)] internal static void Register(BaseUnityPlugin plugin, string languageFolderName) { LanguageFileLoader.AddLanguageFilesFromMod(plugin, languageFolderName); } } [BepInPlugin("OchaDashiMan.JapaneseTranslations", "JapaneseTranslations", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { public const string Guid = "OchaDashiMan.JapaneseTranslations"; public const string ModName = "JapaneseTranslations"; public const string Version = "1.0.0"; internal const string MsuGuid = "com.TeamMoonstorm.MSU"; private const string LanguageFolderName = "Language"; internal static ManualLogSource Log; private static string languageRoot; private void Awake() { Log = ((BaseUnityPlugin)this).Logger; languageRoot = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Language"); if (!Directory.Exists(languageRoot)) { Log.LogWarning((object)("言語フォルダが見つかりません: " + languageRoot)); } else if (Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm.MSU")) { MsuBridge.Register((BaseUnityPlugin)(object)this, "Language"); Log.LogInfo((object)("JapaneseTranslations 1.0.0 loaded via MSU. -> " + languageRoot)); } else { Language.collectLanguageRootFolders += AddLanguageRoot; Log.LogInfo((object)("JapaneseTranslations 1.0.0 loaded. -> " + languageRoot)); } } private static void AddLanguageRoot(List folders) { folders.Add(languageRoot); } private void OnDestroy() { Language.collectLanguageRootFolders -= AddLanguageRoot; } } }