Example #1
0
        public override void Entry(IModHelper helperIn)
        {
            helper = helperIn;
            Logger = this.Monitor;
            config = helper.ReadConfig <Config>();

            if (config.Enable_Twitch_Integration)
            {
                TwitchIntergration.LoadConfig(helperIn);
            }

            MineEvents.MineLevelChanged += MineBuffManager.mineLevelChanged;
            BookcaseEvents.GameQuaterSecondTick.Add(QuaterSecondUpdate);
            BookcaseEvents.GameFullSecondTick.Add(FullSecondTick);
            TimeEvents.AfterDayStarted    += NewDayEvent;
            SaveEvents.AfterSave          += SaveEvent;
            SaveEvents.AfterLoad          += LoadEvent;
            SaveEvents.BeforeSave         += BeforeSaveEvent;
            SaveEvents.AfterReturnToTitle += OnReturnToTitle;
            BuffManager.Init();
            MineBuffManager.Init();
            Spawner.Init();

            //////if(DebugMode)
            //InputEvents.ButtonPressed += this.InputEvents_ButtonPressed;
        }
Example #2
0
 private void FullSecondTick(Bookcase.Events.Event args)
 {
     if (!Context.IsWorldReady)
     {
         return;
     }
     MineBuffManager.UpdateTick();
 }
Example #3
0
        public override void Entry(IModHelper helperIn)
        {
            helper = helperIn;
            Logger = this.Monitor;
            config = helper.ReadConfig <Config>();

            if (config.Enable_Twitch_Integration)
            {
                TwitchIntergration.LoadConfig(helperIn);
            }

            helper.Events.Player.Warped += MineBuffManager.mineLevelChanged;

            helper.Events.GameLoop.UpdateTicked += this.updateTick;

            helper.Events.GameLoop.DayStarted += NewDayEvent;

            helper.Events.GameLoop.Saving += BeforeSaveEvent;
            helper.Events.GameLoop.Saved  += SaveEvent;

            helper.Events.GameLoop.SaveLoaded      += LoadEvent;
            helper.Events.GameLoop.ReturnedToTitle += OnReturnToTitle;

            //old
            // MineEvents.MineLevelChanged += MineBuffManager.mineLevelChanged;

            /*            BookcaseEvents.GameQuaterSecondTick.Add(QuaterSecondUpdate);
             *          BookcaseEvents.GameFullSecondTick.Add(FullSecondTick);
             *           TimeEvents.AfterDayStarted += NewDayEvent;
             *          SaveEvents.AfterSave += SaveEvent;
             *          SaveEvents.AfterLoad += LoadEvent;
             *          SaveEvents.BeforeSave += BeforeSaveEvent;
             *          SaveEvents.AfterReturnToTitle += OnReturnToTitle; */



            BuffManager.Init();
            MineBuffManager.Init();
            Spawner.Init();

            //Debug button
            helper.Events.Input.ButtonPressed += this.InputEvents_ButtonPressed;
        }
Example #4
0
 private void updateTick(object sender, UpdateTickedEventArgs e)
 {
     if (e.IsMultipleOf(15))
     {
         if (!Context.IsWorldReady)
         {
             return;
         }
         BuffManager.UpdateTick();
         Spawner.UpdateTick();
     }
     else if (e.IsMultipleOf(60))
     {
         if (!Context.IsWorldReady)
         {
             return;
         }
         MineBuffManager.UpdateTick();
     }
 }
        public override void Entry(IModHelper helperIn)
        {
            helper = helperIn;
            Logger = this.Monitor;
            config = helper.ReadConfig <Config>();

            if (config.Enable_Twitch_Integration)
            {
                TwitchIntergration.LoadConfig(helperIn);
            }

            actionManager  = new ActionManager();
            augmentManager = new AugmentManager();

            connection = new TwitchAppIntergration.AppIntergration("GenDeathrow_Stardew");
            connection.Start();

            BuffManager.Init();
            MineBuffManager.Init();
            Spawner.Init();
            augmentManager.Init();

            // read an image file
            meteorTileSheet = helper.Content.Load <Texture2D>("assets/Meteor.png", ContentSource.ModFolder);

            //helper.Events.Player.Warped += MineBuffManager.mineLevelChanged;
            helper.Events.GameLoop.UpdateTicked += this.updateTick;

            helper.Events.GameLoop.DayStarted += NewDayEvent;

            helper.Events.GameLoop.Saving += BeforeSaveEvent;
            helper.Events.GameLoop.Saved  += SaveEvent;

            helper.Events.GameLoop.SaveLoaded      += LoadEvent;
            helper.Events.GameLoop.ReturnedToTitle += OnReturnToTitle;
            //Debug button
            helper.Events.Input.ButtonPressed += this.InputEvents_ButtonPressed;
        }