I7: Act on groups of items

Tried various things but I’m stuck.

In I7 how would you carry out actions on one kind of object? For example you are carrying various pieces of jewellery (all part of the kind jewellery) and a black bag. You then want to “put all the jewellery in the black bag”.

This is almost entirely taken care of for you; the Standard Rules already define the grammar for inserting it into action using lines like this:

Understand "put [other things] in/inside/into [something]" as inserting it into.

which means you could say something like “put all in bag.” All you need to do is make sure that the parser understands that “jewelry” refers to any piece of jewelry, which you can do thus:

 Understand "jewelry" as jewelry.

The Inform 7 parser already understands “all” followed by something that applies to multiple objects when the grammar line allows for multiple objects.

If you wanted to make another action that wasn’t already defined as applying to multiple actions so this worked, you’d have to include lines with “[things]” tokens where the multiple objects go:

Understand "clean [things]" as rubbing.

which you’d have to do for every synonym.

[code]Store is a room.

Use American dialect and the serial comma.

Jewelry is a kind of thing. The ring, the necklace, and the bracelet are jewelry in store. The rock is a thing in Store. The bag is a container in store. Understand “jewelry” as jewelry.

Understand “clean [things]” as rubbing.

Test me with “take all jewelry/put all jewelry in bag/x bag/clean all jewelry”.[/code]

Thanks, I will give that a try.