AARP-Gnosis
Suppose we have a complete Encyclopedia in our game. The player is allowed to pick up the whole set (there must not be too many volumes), but also to do things with individual volumes, and indeed to scatter these volumes all over the place. Putting a volume back in the same place as the rest of the Encyclopedia should, however, restore it to the collective. We will start out by defining general rules for collectives like this:
Now the real work begins. One reason to make this an activity is that we might easily want to override it for specific objects; for instance, the generic collecting activity here would not deal properly with collectives of clothing where some items might be worn and others not. In that case, we would want to write another, more specific "collecting" activity to handle the complexities of fashion.
And now for a cheerful scenario:
Let's have the Encyclopedia describe itself differently depending on whether it's all in one place:
Test me with "get aarhus-aaron / look / inventory / get aam-aardvark / look / get gnu-zygote / look / get aarp-gnosis / look / inventory / drop set / look / get set / get a-aalto / inventory".
A concrete box of a room, roughly eight feet by fourteen, which contains all the fallout shelter has to offer by way of entertainment. Someone with a grim sense of humor has tacked a READ! literacy poster to the door, as though there were anything else to do while you await the calming of the Geiger counters.
A battered utility shelf stands against the south wall.
On the shelf is a complete New Idahoan Encyclopedia Set.
>(Testing.)
>[1] get aarhus-aaron
Taken.
>[2] look
Boise Memorial Library
A concrete box of a room, roughly eight feet by fourteen, which contains all the fallout shelter has to offer by way of entertainment. Someone with a grim sense of humor has tacked a READ! literacy poster to the door, as though there were anything else to do while you await the calming of the Geiger counters.
A battered utility shelf stands against the south wall.
On the shelf is a New Idahoan Encyclopedia Set (missing Volume Aarhus-Aaron).
>[3] inventory
You are carrying:
Volume Aarhus-Aaron
>[4] get aam-aardvark
Taken.
>[5] look
Boise Memorial Library
A concrete box of a room, roughly eight feet by fourteen, which contains all the fallout shelter has to offer by way of entertainment. Someone with a grim sense of humor has tacked a READ! literacy poster to the door, as though there were anything else to do while you await the calming of the Geiger counters.
A battered utility shelf stands against the south wall.
On the shelf is a New Idahoan Encyclopedia Set (missing Volume AAM-Aardvark and Volume Aarhus-Aaron).
>[6] get gnu-zygote
Taken.
>[7] look
Boise Memorial Library
A concrete box of a room, roughly eight feet by fourteen, which contains all the fallout shelter has to offer by way of entertainment. Someone with a grim sense of humor has tacked a READ! literacy poster to the door, as though there were anything else to do while you await the calming of the Geiger counters.
A battered utility shelf stands against the south wall.
On the shelf is a New Idahoan Encyclopedia Set (missing Volume Gnu-Zygote, Volume AAM-Aardvark and Volume Aarhus-Aaron).
>[8] get aarp-gnosis
Taken.
>[9] look
Boise Memorial Library
A concrete box of a room, roughly eight feet by fourteen, which contains all the fallout shelter has to offer by way of entertainment. Someone with a grim sense of humor has tacked a READ! literacy poster to the door, as though there were anything else to do while you await the calming of the Geiger counters.
A battered utility shelf stands against the south wall.
On the shelf is Volume A-Aalto.
>[10] inventory
You are carrying:
a New Idahoan Encyclopedia Set (missing Volume A-Aalto)
>[11] drop set
Dropped.
>[12] look
Boise Memorial Library
A concrete box of a room, roughly eight feet by fourteen, which contains all the fallout shelter has to offer by way of entertainment. Someone with a grim sense of humor has tacked a READ! literacy poster to the door, as though there were anything else to do while you await the calming of the Geiger counters.
A battered utility shelf stands against the south wall.
On the shelf is Volume A-Aalto.
You can also see a New Idahoan Encyclopedia Set (missing Volume A-Aalto) here.
>[13] get set
Taken.
>[14] get a-aalto
Taken.
>[15] inventory
You are carrying:
a complete New Idahoan Encyclopedia Set