Beispiel #1
0
        /// <summary>
        /// Unmount a bundle.
        /// </summary>
        /// <param name="bundleId"></param>
        public void UnmountBundle(Guid bundleId)
        {
            if (!Bundles.Exists(b => b.ID == bundleId))
            {
                throw new Exception($"Bundle [{bundleId}] is not mounted to [{Path}].");
            }

            Bundles.Remove(Bundles.Find(b => b.ID == bundleId));
        }
Beispiel #2
0
        /// <summary>
        /// Mount a bundle to the bundle. Yes, seriously.
        /// </summary>
        /// <param name="bundle"></param>
        public VfsBundle MountBundle(VfsBundle bundle)
        {
            if (Bundles.Exists(b => b.ID == bundle.ID))
            {
                throw new Exception($"Bundle [{bundle.ID}] is already mounted to bundle {Name}.");
            }

            Bundles.Add(bundle);

            return(Bundles.Find(b => b.ID == bundle.ID));
        }
        private void InJunimoNoteMenu()
        {
            var menu = (JunimoNoteMenu)Game1.activeClickableMenu;

            // Not a bundle page
            if (menu.ingredientSlots.Count == 0)
            {
                return;
            }

            var bundleName = junimoHelper.GetCurrentBundleName(menu);

            if (todolist.Has(bundleName))
            {
                todolist.Off(bundleName);
                return;
            }

            var bundle = bundles.Find(bundleName);
            var todo   = new TodoJunimoBundle(bundle);

            todolist.Toggle(todo);
        }