Section - The Basket
A woven basket is a portable container. [It is open and unopenable.] The basket has a list of rooms called the harvested list. The basket has a thing called the intended contents. The basket has a thing called the actual contents. The basket has a number called quantity. The quantity of the basket is 0. The description is "The basket is [if quantity of basket is 0]empty[otherwise if quantity of basket is 1]about a third full of [otherwise if quantity of basket is 2]about two-thirds full of [otherwise]filled to the brim with [end if][if quantity of basket > 0][the actual contents][end if].". [Understand "berry/berries" as basket when actual contents of basket is berries and berries is not enclosed by location. Understand "lemon/yellow/leaf/leaves" as basket when actual contents of basket is lemon-yellow leaves and lemon-yellow leaves is not enclosed by location. Understand "mussel/mussels" as basket when actual contents of basket is small green mussels and small green mussels is not enclosed by location. Understand "crystal/crystals" as basket when actual contents of basket is sea-blue crystal and sea-blue crystal is not enclosed by location. Understand "snail/snails" as basket when actual contents of basket is not white snail and white snail is not enclosed by location.][These are commented out because, even with the following line, the basket was being matched over the actual items to be gathred.] Does the player mean doing something to the basket: it is unlikely.
Before taking something when basket is held and ( the noun is an item listed in Table of Departure Quest or the noun is bulbous fruits ) (this is the basket override rule):
if quantity of the basket is 3, say "The basket is already full." instead;
if location is listed in harvested list of basket, say "You've already gathered all [the noun] you can from here; you'll have to find another spot to get more." instead;
if quantity of basket is at least 1 and actual contents of basket is not noun, say "The basket already holds [the actual contents of basket]; it's probably not a good idea to mix and match." instead;
if noun is bulbous fruits and utbm_forest is unspoken, say "You don't really have a need to pick these fruits right now." instead;
add location to harvested list of basket;
if quantity of basket is 0, now actual contents of basket is noun;
increase quantity of basket by 1;
if noun is bulbous fruits, now quantity of the basket is 3;
say "You gather [the noun] and add them to the basket, which is now [if quantity of basket is 1]about a third [otherwise if quantity of basket is 2]about two thirds [end if]full." instead.
Instead of inserting something (called insertee) into the basket, try taking insertee.
Instead of emptying the basket:
now quantity of the basket is 0;
truncate harvested list of basket to 0 entries;
now actual contents of basket is nothing;
say "You empty the basket onto the ground; the contents disappear into the underbrush.".
Instead of dropping the basket: say "You better hold on to it since you don't want to lose it.".
Understand "empty [something]" as emptying. Emptying is an action applying to one carried thing.