Пример #1
0
        public override void Entry(IModHelper helper)
        {
            mon       = Monitor;
            ModHelper = helper;

            Config = Helper.ReadConfig <ModConfig>();

            toolsTexture = ModHelper.Content.Load <Texture2D>("Assets/tools.png", ContentSource.ModFolder);

            helper.ConsoleCommands.Add("ptools", "Upgrade all tools to prismatic", UpgradeTools);

            SaveEvents.AfterLoad          += SaveEvents_AfterLoad;
            PlayerEvents.InventoryChanged += PlayerEvents_InventoryChanged;
            GameEvents.EighthUpdateTick   += GameEvents_EighthUpdateTick;

            helper.Content.AssetEditors.Add(new AssetEditor());
            SprinklerInitializer.Init();
            BlacksmithInitializer.Init();

            InitColors();

            var harmony = HarmonyInstance.Create("stokastic.PaladyumTools");

            harmony.PatchAll(Assembly.GetExecutingAssembly());
        }
Пример #2
0
        public override void Entry(IModHelper helper)
        {
            ModHelper = helper;

            Config = this.Helper.ReadConfig <ModConfig>();

            ToolsTexture = ModHelper.Content.Load <Texture2D>("assets/tools.png");

            helper.ConsoleCommands.Add("ptools", "Upgrade all tools to radioactive", this.UpgradeTools);

            helper.Events.GameLoop.SaveLoaded     += this.OnSaveLoaded;
            helper.Events.GameLoop.UpdateTicked   += this.OnUpdateTicked;
            helper.Events.Player.InventoryChanged += this.OnInventoryChanged;

            helper.Content.AssetEditors.Add(new AssetEditor());
            BlacksmithInitializer.Init(helper.Events);

            this.InitColors();

            var harmony = HarmonyInstance.Create("kakashigr.RadioactiveTools");

            this.ApplyPatches(harmony);
        }