예제 #1
0
        public static void Setup(ForageFantasy forageFantasy)
        {
            mod = forageFantasy;

            IDeluxeGrabberReduxApi api = mod.Helper.ModRegistry.GetApi <IDeluxeGrabberReduxApi>("ferdaber.DeluxeGrabberRedux");

            if (api == null)
            {
                return;
            }

            api.GetBerryBushHarvest += ChangeBerryBuchHarvest;
            api.GetMushroomHarvest  += ChangeMushroomHarvest;
        }
예제 #2
0
        public static void Setup(ForageFantasy forageFantasy)
        {
            mod = forageFantasy;

            IDeluxeGrabberReduxApi api = mod.Helper.ModRegistry.GetApi <IDeluxeGrabberReduxApi>("ferdaber.DeluxeGrabberRedux");

            if (api == null)
            {
                return;
            }

            // if neither is on, we can skip adding our overwrite for better compatibility with other mods
            if ((mod.Config.AutomationHarvestsGrantXP && mod.Config.BerryBushXPAmount > 0 && mod.Config.BerryBushChanceToGetXP > 0) || mod.Config.BerryBushQuality)
            {
                api.GetBerryBushHarvest += ChangeBerryBushHarvest;
            }

            // if neither is on, we can skip adding our overwrite for better compatibility with other mods
            if ((mod.Config.AutomationHarvestsGrantXP && mod.Config.MushroomXPAmount > 0) || mod.Config.MushroomBoxQuality)
            {
                api.GetMushroomHarvest += ChangeMushroomHarvest;
            }
        }