Exemplo n.º 1
0
        internal static void LanguageAwake()
        {
            var languagePaths = AssetPlus.GetFiles("language");

            foreach (var path in languagePaths)
            {
                Languages.AddPath(path);
            }
            On.RoR2.Language.LoadAllFilesForLanguage += Language_LoadAllFilesForLanguage;
        }
Exemplo n.º 2
0
        internal static void FontAwake()
        {
            var fontFiles = AssetPlus.GetFiles("font");

            foreach (var fontFile in fontFiles)
            {
                Fonts.Add(fontFile);
            }

            On.RoR2.UI.HGTextMeshProUGUI.OnCurrentLanguageChanged += HGTextMeshProUGUI_OnCurrentLanguageChanged;
            On.RoR2.Language.SetCurrentLanguage += Language_SetCurrentLanguage;
        }
Exemplo n.º 3
0
        internal static void SoundAwake()
        {
            // Disable SoundPlus if RoR2 is running with its graphics and sound engine disabled (Dedicated Servers) to avoid any bad side effects.
            if (Application.isBatchMode)
            {
                return;
            }

            var files = AssetPlus.GetFiles("*.sound");

            foreach (var file in files)
            {
                SoundBanks.Add(file);
            }

            //for bank loading
            On.RoR2.RoR2Application.OnLoad += RoR2Application_OnLoad;
        }