Esempio n. 1
0
 public Plugin(Conf conf, IPALogger logger, Zenjector zenjector)
 {
     zenjector.UseLogger(logger);
     zenjector.Install <PluginInstaller>(Location.App, conf.Generated <PluginConfig>());
     zenjector.Install <PresenceMenuInstaller>(Location.Menu);
     zenjector.Expose <CoreGameHUDController>("Gameplay");
     zenjector.Install <PresenceGameInstaller>(Location.StandardPlayer);
     zenjector.Install <PresenceGameInstaller>(Location.CampaignPlayer);
     zenjector.Install <PresenceTutorialInstaller>(Location.Tutorial);
     zenjector.Install <PresenceMultiplayerInstaller>(Location.MultiPlayer);
 }
Esempio n. 2
0
        /// <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, Config config, Zenjector zenject)
        {
            Log = logger;

            Settings = config.Generated <SettingsStore>();

            zenject.Expose <GameEnergyUIPanel>("CEB_GameEnergyUIPanel");
            zenject.Install <CEBAppInstaller>(Location.App);
            zenject.Install <CEBMenuInstaller>(Location.Menu);
            zenject.Install <CEBGameInstaller>(Location.Player);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
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.Expose <CoreGameHUDController>("Environment");

            zenjector.Install <CoreInstaller>(Location.App);
            zenjector.Install <MenuUIInstaller>(Location.Menu);

            zenjector.Install <CountersInstaller>(Location.StandardPlayer | Location.CampaignPlayer);
            zenjector.Install <MultiplayerCountersInstaller, MultiplayerLocalActivePlayerInstaller>();
        }