示例#1
0
 public Plugin(Conf conf, IPALogger logger, Zenjector zenjector)
 {
     Logger.Log = logger;
     zenjector.OnApp <LevelTweaksCoreInstaller>().WithParameters(conf.Generated <Config>());
     zenjector.OnMenu <LevelTweaksMenuInstaller>();
     harmony = new Harmony("dev.auros.leveltweaks");
 }
示例#2
0
 public Plugin(IPALogger logger, Config config, Zenjector zenjector)
 {
     Logger.log = logger;
     zenjector.OnApp <CustomNotesCoreInstaller>().WithParameters(config.Generated <PluginConfig>());
     zenjector.OnMenu <CustomNotesMenuInstaller>();
     zenjector.OnGame <CustomNotesGameInstaller>(false).ShortCircuitForTutorial();
 }
示例#3
0
 public void Init(Logger logger, Config config, Zenjector zenjector)
 {
     zenjector.OnApp <OnAppInstaller>().WithParameters(logger, config.Generated <Configuration.PluginConfig>());
     zenjector.OnMenu <OnMenuInstaller>();
     zenjector.OnGame <OnGameInstaller>(false);
     zenjector.OnGame <OnGameInstaller>(true).ShortCircuitForCampaign().ShortCircuitForMultiplayer().ShortCircuitForStandard(); // Counters+...
 }
示例#4
0
        public Plugin(IPA.Config.Config conf, IPALogger logger, PluginMetadata metadata)
        {
            Log = logger;
            Config config = conf.Generated <Config>();

            Harmony = new Harmony("dev.auros.sirautil");

            // Set Config Verison
            config.Version = metadata.Version;

            // Setup Zenjector
            _zenjectManager = new ZenjectManager();
            PluginInitInjector.AddInjector(typeof(Zenjector), (prev, __, meta) =>
            {
                if (prev != null)
                {
                    return(prev);
                }
                var zen = new Zenjector(meta.Id);
                _zenjectManager.Add(zen);
                return(zen);
            });

            // Setup Own Zenject Stuff
            var zenjector = new Zenjector("SiraUtil");

            _zenjectManager.Add(zenjector);

            zenjector.OnApp <SiraInstaller>().WithParameters(config);
            zenjector.OnGame <SiraSaberInstaller>();

            zenjector.OnGame <SiraSaberEffectInstaller>()
            .Mutate <SaberBurnMarkArea>((ctx, obj) =>
            {
                var burnArea = obj as SaberBurnMarkArea;
                // Override (or modify) the component BEFORE it's installed
                var siraBurnArea = burnArea.gameObject.AddComponent <SiraSaberBurnMarkArea>();
                ctx.Container.QueueForInject(siraBurnArea);
                ctx.Container.Bind <SaberBurnMarkArea>().To <SiraSaberBurnMarkArea>().FromInstance(siraBurnArea).AsCached();
            })
            .Mutate <SaberBurnMarkSparkles>((ctx, obj) =>
            {
                var burnSparkles     = obj as SaberBurnMarkSparkles;
                var siraBurnSparkles = burnSparkles.gameObject.AddComponent <SiraSaberBurnMarkSparkles>();
                ctx.Container.QueueForInject(siraBurnSparkles);
                ctx.Container.Bind <SaberBurnMarkSparkles>().To <SiraSaberBurnMarkSparkles>().FromInstance(siraBurnSparkles).AsCached();
            })
            .Mutate <ObstacleSaberSparkleEffectManager>((ctx, obj) =>
            {
                var obstacleSparkles     = obj as ObstacleSaberSparkleEffectManager;
                var siraObstacleSparkles = obstacleSparkles.gameObject.AddComponent <SiraObstacleSaberSparkleEffectManager>();
                UnityEngine.Object.Destroy(obstacleSparkles);
                ctx.Container.QueueForInject(siraObstacleSparkles);
                ctx.Container.Bind <ObstacleSaberSparkleEffectManager>().To <SiraObstacleSaberSparkleEffectManager>().FromInstance(siraObstacleSparkles).AsCached();
            })
            .ShortCircuitForMultiplayer();

            zenjector.OnGame <SiraGameInstaller>().ShortCircuitForMultiplayer();
        }
示例#5
0
        public Plugin(IPALogger logger, Config conf, Zenjector zenjector)
        {
            var pluginConfig = conf.Generated <PluginConfig>();

            zenjector.OnApp <AppInstaller>().WithParameters(pluginConfig, logger);
            zenjector.OnMenu <Installers.MenuInstaller>();
            zenjector.OnGame <GameInstaller>(false);
        }
示例#6
0
        public void Init(Logger log, PluginMetadata pluginMetadata, Zenjector zenject)
        {
            LoggerInstance = log;
            _metadata      = pluginMetadata;

            zenject.OnApp <AppInstaller>();
            zenject.OnMenu <Installers.MenuInstaller>();
        }
示例#7
0
        public Plugin(IPALogger logger, Conf conf, Zenjector zenjector)
        {
            Log      = logger;
            Config   = conf.Generated <Config>();
            _harmony = new Harmony(HarmonyID);

            zenjector.OnApp <LocalizerInstaller>();
        }
示例#8
0
        public void Init(Logger logger, Config config, PluginMetadata pluginMetadata, Zenjector zenject)
        {
            _metadata = pluginMetadata;

            zenject.OnApp <HsvAppInstaller>().WithParameters(logger, config.Generated <HSVConfig>());
            zenject.OnMenu <HsvMenuInstaller>();
            zenject.OnGame <HsvGameInstaller>();
        }
示例#9
0
        public void Init(Logger logger, Config config, PluginMetadata metaData, Zenjector zenject)
        {
            _metadata = metaData;

            zenject.OnApp <AppInstaller>().WithParameters(logger, config.Generated <Configuration>());
            zenject.OnMenu <MenuInstaller>();
            zenject.OnGame <GamePlayCoreInstaller>();
        }
示例#10
0
        public void Init(IPALogger logger, Config conf, Zenjector zenjector)
        {
            Name = Assembly.GetExecutingAssembly().GetName().Name;

            zenjector.OnApp <CustomPillowsAppInstaller>().WithParameters(conf.Generated <PluginConfig>(), logger);
            zenjector.OnMenu <CustomPillowsMenuInstaller>();
            zenjector.OnGame <CustomPillowsGameInstaller>();
        }
示例#11
0
 public void Init(Logger logger, Config config, Zenjector zenject)
 {
     zenject.OnApp <InstaAppInstaller>().WithParameters(logger, config.Generated <Configuration.PluginConfig>());
     zenject.OnMenu <InstaMenuInstaller>();
     zenject.OnGame <InstaGameInstaller>()
     .Expose <StandardLevelFailedController>()
     .OnlyForStandard();
 }
示例#12
0
 public Plugin(IPALogger logger, Config conf, Zenjector zenjector, PluginMetadata pluginMetadata)
 {
     Instance       = this;
     PluginMetadata = pluginMetadata;
     Log            = logger;
     Config         = conf.Generated <PluginConfig>();
     BeatSaberMarkupLanguage.GameplaySetup.GameplaySetup.instance.AddTab("Multiplayer", "MultiplayerExtensions.UI.GameplaySetupPanel.bsml", GameplaySetupPanel.instance);
     zenjector.OnApp <MultiplayerInstaller>();
 }
示例#13
0
 public void Init(IPALogger log, PluginMetadata meta, Zenjector zenjector)
 {
     Instance = this;
     _meta    = meta;
     Logger   = log;
     Logger.Debug("Logger initialized.");
     zenjector.OnApp <SRMAppInstaller>();
     zenjector.OnMenu <SRMInstaller>();
 }
示例#14
0
        public Plugin(Conf conf, IPALogger logger, Zenjector zenjector)
        {
            Log = logger;

            _harmony = new Harmony(kHarmonyId);

            zenjector.OnApp <SiraLocalizerCoreInstaller>().WithParameters(conf.Generated <Config>());
            zenjector.OnMenu <SiraLocalizerUIInstaller>();
        }
示例#15
0
 public Plugin(IPALogger logger, Zenjector zenjector)
 {
     Instance  = this;
     Log       = logger;
     Harmony   = new Harmony(HarmonyId);
     Zenjector = zenjector;
     Zenjector.OnApp <AvatarInstaller>();
     Plugin.Log?.Debug("Init finished.");
 }
 public Plugin(IPALogger logger, Config conf, PluginMetadata pluginMetadata, Zenjector zenjector)
 {
     Instance   = this;
     PluginMeta = pluginMetadata;
     Log        = logger;
     Config     = conf.Generated <PluginConfig>();
     TestConfig(Config);
     Zenjector = zenjector;
     zenjector.OnApp <VoiceChatInstaller>();
     Log.Info($"MultiplayerExtensions.VoiceChat v{PluginMeta.Version}: '{VersionInfo.Description}'");
 }
示例#17
0
        public Plugin(Conf conf, IPALogger logger, Zenjector zenjector, PluginMetadata metadata)
        {
            Log = logger;
            Config config = conf.Generated <Config>();

            _harmony       = new Harmony("dev.auros.dicolors");
            config.Version = metadata.HVersion;

            zenjector.OnApp <DiCInstaller>().WithParameters(config, metadata.HVersion);
            //zenjector.OnGame<DiCGameInstaller>(false);
            zenjector.OnMenu <DiCMenuInstaller>();
        }
        public Plugin(IPALogger logger, Config conf, Zenjector zenjector, PluginMetadata pluginMetadata)
        {
            Instance       = this;
            PluginMetadata = pluginMetadata;
            Log            = logger;
            Config         = conf.Generated <PluginConfig>();
            zenjector.OnApp <MPCoreInstaller>();
            zenjector.OnMenu <MPMenuInstaller>();
            HttpOptions options = new HttpOptions("MultiplayerExtensions", new Version(pluginMetadata.Version.ToString()));

            BeatSaver = new BeatSaver(options);
        }
示例#19
0
        public Plugin(IPALogger logger, Zenjector zenjector, PluginMetadata pluginMetadata)
        {
            Instance       = this;
            PluginMetadata = pluginMetadata;
            Log            = logger;

            zenjector.OnApp <AvatarInstaller>();
            zenjector.OnGame <GameAvatarInstaller>().OnlyForMultiplayer();

            HttpClient = new HttpClient();
            HttpClient.DefaultRequestHeaders.Add("User-Agent", Plugin.UserAgent);
        }
示例#20
0
        public void Init(IPALogger logger, Config conf, Zenjector zenjector)
        {
            _logger = logger;

            var pluginConfig    = conf.Generated <PluginConfig>();
            var saberFactoryDir = new DirectoryInfo(UnityGame.UserDataPath).CreateSubdirectory("Saber Factory");

            LoadCSDescriptors();

            zenjector.OnApp <AppInstaller>().WithParameters(logger, pluginConfig, saberFactoryDir);
            zenjector.OnMenu <Installers.MenuInstaller>();
            zenjector.OnGame <GameInstaller>(false);
        }
示例#21
0
        public void Init(IPALogger _logger, Zenjector zenjector)
        {
            Instance = this;
            Logger   = _logger;
            Logger.Debug("Logger initialized.");

#if DEBUG
            zenjector.OnApp <TestInstaller>();
            //zenjector.OnGame<TestInstaller>().Expose<ScoreController>();
#endif
            webSocketServer = new Server.Server();
            zenjector.OnGame <ClientInstaller>(false);
            zenjector.On <GameCoreSceneSetup>().Pseudo((_) => {}).Expose <ScoreUIController>();
        }
示例#22
0
        public Plugin(Conf conf, IPALogger logger, Zenjector zenjector)
        {
            Log = logger;

            _harmony = new Harmony(kHarmonyId);

            if (Environment.GetCommandLineArgs().Contains("--dump-localization"))
            {
                new LocalizationExporter().DumpBaseGameLocalization();
            }

            zenjector.OnApp <SiraLocalizerCoreInstaller>().WithParameters(conf.Generated <Config>());
            zenjector.OnMenu <SiraLocalizerUIInstaller>();
        }
示例#23
0
        public Plugin(IPALogger logger, Config conf, Zenjector zenjector, PluginMetadata pluginMetadata)
        {
            Instance       = this;
            PluginMetadata = pluginMetadata;
            Log            = logger;
            Config         = conf.Generated <PluginConfig>();
            zenjector.OnApp <MultiplayerInstaller>();
            zenjector.OnMenu <InterfaceInstaller>();
            HttpOptions options = new HttpOptions
            {
                ApplicationName = "MultiplayerExtensions",
                Version         = new Version(pluginMetadata.Version.ToString())
            };

            BeatSaver = new BeatSaver(options);
        }
示例#24
0
        public Plugin(IPALogger logger,
                      [Config.Name("CountersPlus")] Config conf,
                      Zenjector zenjector)
        {
            Instance   = this;
            Logger     = logger;
            MainConfig = conf.Generated <MainConfigModel>();
            harmony    = new HarmonyObj(HARMONY_ID);

            zenjector.OnApp <CoreInstaller>();
            zenjector.OnGame <CountersInstaller>()
            .Expose <CoreGameHUDController>()
            .ShortCircuitForTutorial()
            .ShortCircuitForMultiplayer();     // This is until I can safely confirm that C+ works with Multiplayer.
            zenjector.OnMenu <MenuUIInstaller>();
        }
示例#25
0
        public void Init(IPALogger logger, Config config, Zenjector zenjector, PluginMetadata meta)
        {
            Logger.log = logger;

            if (PluginManager.GetPluginFromId("ShaderExtensions") == null)
            {
                if (!LoadShaderDescriptors())
                {
                    return;
                }
            }

            zenjector.OnApp <DSCoreInstaller>().WithParameters(config.Generated <PluginConfig>());
            zenjector.OnGame <DSGameInstaller>(false).ShortCircuitForTutorial();
            zenjector.OnMenu <DSMenuInstaller>();
        }
示例#26
0
        public Plugin(IPALogger logger,
                      [Config.Name("CountersPlus")] Config conf,
                      Zenjector zenjector)
        {
            Instance   = this;
            Logger     = logger;
            MainConfig = conf.Generated <MainConfigModel>();
            harmony    = new HarmonyObj(HARMONY_ID);

            zenjector.OnApp <CoreInstaller>();
            zenjector.OnGame <CountersInstaller>()
            .Expose <CoreGameHUDController>()
            .ShortCircuitForTutorial()
            .ShortCircuitForMultiplayer();     // still dont have the time for this
            zenjector.OnMenu <MenuUIInstaller>();
        }
示例#27
0
        public Plugin(IPALogger logger, Config conf, Zenjector zenjector, PluginMetadata pluginMetadata)
        {
            Instance       = this;
            PluginMetadata = pluginMetadata;
            Log            = logger;
            Config         = conf.Generated <PluginConfig>();
            BeatSaberMarkupLanguage.GameplaySetup.GameplaySetup.instance.AddTab("Multiplayer", "MultiplayerExtensions.UI.GameplaySetupPanel.bsml", GameplaySetupPanel.instance);
            zenjector.OnApp <MultiplayerInstaller>();
            HttpOptions options = new HttpOptions
            {
                ApplicationName = "MultiplayerExtensions",
                Version         = new Version(pluginMetadata.Version.ToString())
            };

            BeatSaver = new BeatSaver(options);
        }
示例#28
0
        public Plugin(IPALogger logger, Config conf, Zenjector zenjector, PluginMetadata pluginMetadata)
        {
            Instance       = this;
            PluginMetadata = pluginMetadata;
            Log            = logger;
            Config         = conf.Generated <PluginConfig>();

            zenjector.OnApp <MPCoreInstaller>();
            zenjector.OnMenu <MPMenuInstaller>();
            zenjector.OnGame <MPGameInstaller>().OnlyForMultiplayer();

            HttpOptions options = new HttpOptions("MultiplayerExtensions", new Version(pluginMetadata.Version.ToString()));

            BeatSaver  = new BeatSaver(options);
            HttpClient = new HttpClient();
            HttpClient.DefaultRequestHeaders.Add("User-Agent", Plugin.UserAgent);
        }
示例#29
0
        public Plugin(IPALogger logger, IPAConfig config, Zenjector zenjector)
        {
            PluginConfig conf = config.Generated <PluginConfig>();

            zenjector.OnApp <AppInstaller>().WithParameters(logger, conf);
            zenjector.OnMenu <Installers.MenuInstaller>();

            zenjector.OnGame <GameInstaller>().Expose <LevelFailedTextEffect>().OnlyForStandard();
            zenjector.OnGame <GameInstaller>(false).Expose <LevelFailedTextEffect>().OnlyForMultiplayer();

            bool dir = Directory.Exists($@"{UnityGame.UserDataPath}\CustomFailText\");

            if (!dir)
            {
                Directory.CreateDirectory($@"{UnityGame.UserDataPath}\CustomFailText\");
            }
        }
示例#30
0
        public Plugin(Conf conf, IPALogger logger, Zenjector zenjector, PluginMetadata metadata)
        {
            Log = logger;
            Config config = conf.Generated <Config>();

            Config.Value = config;

            if (config.Version.ToString() == "0.0.0" && config.Clock.Position == new UnityEngine.Vector3(0f, 2.8f, 2.45f))
            {
                config.Clock.Position = new UnityEngine.Vector3(0f, 3f, 3.9f);
            }
            config.Version = metadata.Version;

            _harmony = new Harmony("dev.auros.enhancements");
            zenjector.OnApp <XInstaller>().WithParameters(config, metadata.Version);
            zenjector.OnGame <XGameInstaller>(false).ShortCircuitForTutorial();
            zenjector.OnMenu <XMenuInstaller>();
        }