/// <summary> /// Called when the plugin is first loaded by IPA (either when the game starts or when the plugin is enabled if it starts disabled). /// [Init] methods that use a Constructor or called before regular methods like InitWithConfig. /// Only use [Init] with one Constructor. /// </summary> public void Init(IPALogger logger, Zenjector zenjector) { instance = this; Logger.log = logger; Logger.log.Debug("Logger initialized."); zenjector.OnMenu <PlaylistDownloaderInstaller>(); }
public void Init(object _, IPALogger log, Zenjector zenjector) { Log = log; GameObject sabers; using (var stream = Assembly.GetManifestResourceStream(ClawsSaberName)) { sabers = AssetBundle.LoadFromStream(stream).LoadAsset <GameObject>("_CustomSaber"); } foreach (Transform t in sabers.transform) { if (t.name == "LeftSaber") { LeftSaber = t.gameObject; } else if (t.name == "RightSaber") { RightSaber = t.gameObject; } if (LeftSaber != null && RightSaber != null) { break; } } zenjector.OnGame <SaberModelInstaller>(); }
public Plugin(IPALogger logger, IPAConfig config, Zenjector zenject) { Instance = this; DateTime time = DateTime.UtcNow; isAprilFools = time.Month == 4 && time.Day == 1; zenject.UseLogger(logger); zenject.UseMetadataBinder <Plugin>(); if (isAprilFools) { zenject.Expose <CoreGameHUDController>("Environment"); } zenject.Expose <GameEnergyUIPanel>("Environment"); zenject.Expose <ComboUIController>("Environment"); zenject.Expose <ScoreMultiplierUIController>("Environment"); zenject.Expose <SongProgressUIController>("Environment"); zenject.Expose <ImmediateRankUIPanel>("Environment"); // Multiplayer support broke with Sira3... maybe someday I'll look into it. zenject.Install <AppConfigInstaller>(Location.App, config.Generated <PluginConfig>()); zenject.Install <MenuUIInstaller>(Location.Menu); zenject.Install <PanelModifierInstaller>(Location.StandardPlayer | Location.CampaignPlayer); }
public Plugin(IPALogger logger, Zenjector zenjector) { Instance = this; log = logger; zenjector.OnMenu <NiceMissMenuInstaller>(); zenjector.OnGame <NiceMissGameInstaller>(false); }
/// <summary> /// Called when the plugin is first loaded by IPA (either when the game starts or when the plugin is enabled if it starts disabled). /// [Init] methods that use a Constructor or called before regular methods like InitWithConfig. /// Only use [Init] with one Constructor. /// </summary> public void Init(IPALogger logger, Zenjector zenjector) { Instance = this; Log = logger; Log.Info("SRMV2Extention initialized."); zenjector.OnMenu <SRMExtentionInstaller>(); }
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+... }
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"); }
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(); }
public async void Init(IPALogger logger, Config conf, Zenjector zenjector, PluginMetadata metadata) { _logger = logger; _harmony = new Harmony(HarmonyId); var pluginConfig = conf.Generated <PluginConfig>(); if (!await LoadCsDescriptors()) { return; } zenjector.UseLogger(logger); zenjector.UseHttpService(); zenjector.Install <PluginAppInstaller>(Location.App, logger, pluginConfig, metadata); zenjector.Install <PluginMenuInstaller>(Location.Menu); zenjector.Install <PluginGameInstaller>(Location.Player | Location.MultiPlayer); zenjector.Mutate <SaberBurnMarkArea>("Environment", (ctx, ogBurnMark) => { var newBurner = CommonHelpers.Upgrade(ogBurnMark, typeof(CustomSaberBurnMarkArea)); ctx.Container.QueueForInject(newBurner); }); }
void Awake() { Helpers.Logger.LogText("-= Monke Map Loader started =-"); HarmonyPatches.ApplyHarmonyPatches(); Zenjector.Install <MainInstaller>().OnProject(); }
/// <summary> /// Called when the plugin is first loaded by IPA (either when the game starts or when the plugin is enabled if it starts disabled). /// [Init] methods that use a Constructor or called before regular methods like InitWithConfig. /// Only use [Init] with one Constructor. /// </summary> public void Init(IPALogger logger, Zenjector zenjector) { Instance = this; Log = logger; Log.Info("Fever initialized."); zenjector.OnGame <GameInstaller>(); }
public void Init(IPA.Logging.Logger logger, Zenjector zenjector, PluginMetadata metadata) { Log = logger; VersionNumber = metadata.Version?.ToString() ?? Assembly.GetExecutingAssembly().GetName().Version.ToString(3); harmony = new Harmony(HarmonyId); zenjector.Install <SongBrowserMenuInstaller>(Location.Menu); }
/// <summary> /// Called when the plugin is first loaded by IPA (either when the game starts or when the plugin is enabled if it starts disabled). /// [Init] methods that use a Constructor or called before regular methods like InitWithConfig. /// Only use [Init] with one Constructor. /// </summary> public Plugin(IPALogger logger, Zenjector zenjector) { Instance = this; Log = logger; harmony = new Harmony(HarmonyId); zenjector.OnMenu <NoBoomInstaller>(); }
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(); }
public void Init(Logger log, PluginMetadata pluginMetadata, Zenjector zenject) { LoggerInstance = log; _metadata = pluginMetadata; zenject.OnApp <AppInstaller>(); zenject.OnMenu <Installers.MenuInstaller>(); }
/// <summary> /// Called when the plugin is first loaded by IPA (either when the game starts or when the plugin is enabled if it starts disabled). /// [Init] methods that use a Constructor or called before regular methods like InitWithConfig. /// Only use [Init] with one Constructor. /// </summary> public void Init(IPALogger logger, Zenjector zenjector) { Instance = this; Log = logger; Log.Info("HttpStatusExtention initialized."); zenjector.OnGame <HttpStatusExtentionInstaller>().OnlyForStandard(); _ = ScoreDataBase.Instance.Initialize(); }
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(); }
public Plugin(PluginMetadata pluginMetadata, Logger logger, Config config, Zenjector zenjector) { zenjector.UseLogger(logger); zenjector.UseHttpService(); zenjector.Install <PlatformsAppInstaller>(Location.App, pluginMetadata.Assembly, config.Generated <PluginConfig>()); zenjector.Install <PlatformsMenuInstaller>(Location.Menu); zenjector.Install <PlatformsGameInstaller>(Location.Player); }
/// <summary> /// Called when the plugin is first loaded by IPA (either when the game starts or when the plugin is enabled if it starts disabled). /// [Init] methods that use a Constructor or called before regular methods like InitWithConfig. /// Only use [Init] with one Constructor. /// </summary> public Plugin(IPALogger logger, Zenjector zenjector) { Instance = this; Plugin.Log = logger; Plugin.Log?.Debug("Logger initialized."); zenjector.OnMenu <PauseChampMenuInstaller>(); zenjector.OnGame <PauseChampGameInstaller>().OnlyForStandard(); }
/// <summary> /// Called when the plugin is first loaded by IPA (either when the game starts or when the plugin is enabled if it starts disabled). /// [Init] methods that use a Constructor or called before regular methods like InitWithConfig. /// Only use [Init] with one Constructor. /// </summary> public void Init(IPALogger logger, Zenjector zenjector) { Instance = this; Log = logger; Log.Info("CustomEnergyBar initialized."); zenjector.OnGame <GameInstaller>(false).OnlyForMultiplayer(); zenjector.OnGame <GameInstaller>().OnlyForStandard(); }
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>(); }
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>(); }
public void Init(IPALogger logger, Zenjector zenjector) { Logger = logger; Logger.Debug("Logger Initialized."); zenjector.Install <HttpPlayerInstaller>(Location.Player); zenjector.Install <HttpAppInstaller>(Location.App); this._harmony = new Harmony(HARMONY_ID); }
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); }
public Plugin(IPALogger logger, Conf conf, Zenjector zenjector) { Log = logger; Config = conf.Generated <Config>(); _harmony = new Harmony(HarmonyID); zenjector.OnApp <LocalizerInstaller>(); }
/// <summary> /// Called when the plugin is first loaded by IPA (either when the game starts or when the plugin is enabled if it starts disabled). /// [Init] methods that use a Constructor or called before regular methods like InitWithConfig. /// Only use [Init] with one Constructor. /// </summary> public void Init(IPALogger logger, Zenjector zenjector) { Instance = this; Log = logger; Log.Info("CameraPlusUIPlus initialized."); _harmony = new Harmony(HARMONY_ID); zenjector.OnMenu <CameraUIPlusInstaller>(); }
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 void Init(IPA.Logging.Logger log, Config conf, Zenjector zenjector) { Instance = this; Logger.logger = log; Configuration.PluginConfig.Instance = conf.Generated <Configuration.PluginConfig>(); Logger.logger.Debug("Config loaded"); Harmony = new HarmonyLib.Harmony(HarmonyID); zenjector.Install <CMMMenuInstaller>(Location.Menu); }
public Plugin(IPALogger logger, Zenjector zenjector) { Log = logger; zenjector.UseMetadataBinder <Plugin>(); // Register our Installer zenjector.Install <DiDMenuInstaller>(Location.Menu); zenjector.UseLogger(logger); }
/// <summary> /// Called when the plugin is first loaded by IPA (either when the game starts or when the plugin is enabled if it starts disabled). /// [Init] methods that use a Constructor or called before regular methods like InitWithConfig. /// Only use [Init] with one Constructor. /// </summary> public Plugin(IPALogger logger, Zenjector zenjector) { Instance = this; Log = logger; Log.Info("PlaylistManager initialized."); harmony = new Harmony(HarmonyId); zenjector.OnMenu <PlaylistViewInstaller>(); DownloaderUtils.Init(); }