Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of Starstorm 2 VietHoa v1.0.6
RoR2MyMod.dll
Decompiled 9 months agousing System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("RoR2MyMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("RoR2MyMod")] [assembly: AssemblyTitle("RoR2MyMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [BepInPlugin("com.yourname.starstorm2viet", "Starstorm 2 Vietnamese", "1.0.0")] public class Starstorm2Vietnamese : BaseUnityPlugin { private void Start() { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Đợi 5 giây trước khi ghi đè file..."); ((MonoBehaviour)this).Invoke("OverwriteLanguageFiles", 5f); } private void OverwriteLanguageFiles() { string text = Path.Combine(Paths.PluginPath, "TeamMoonstorm-Starstorm2/languages/en"); string path = Path.Combine(Paths.PluginPath, "Ylinhtran-Starstorm_2_VietHoa"); if (!Directory.Exists(text) || !Directory.Exists(path)) { ((BaseUnityPlugin)this).Logger.LogError((object)"Thư mục không tồn tại, không thể ghi đè!"); return; } string[] files = Directory.GetFiles(path, "*.json"); foreach (string text2 in files) { string fileName = Path.GetFileName(text2); string destFileName = Path.Combine(text, fileName); File.Copy(text2, destFileName, overwrite: true); ((BaseUnityPlugin)this).Logger.LogInfo((object)("Đã ghi đè: " + fileName)); } ((BaseUnityPlugin)this).Logger.LogInfo((object)"Đã hoàn tất ghi đè file ngôn ngữ!"); } }