I’m trying to get Matt Wiener’s Actions on Groups extension working, without using the plethora of machinery I used earlier. I want to deposit N arrows or P armors into my inventory. (Later, I put them into a closed container, the Vault.) However, no matter what I do, only 1 item is deposited. Here is the entire program.
"GroupActions" by Clyde Falsoon
Include Actions on Groups by Matt Weiner.
Lab is a room. Description of Lab is "A test room for actions on groups.".
Vault is a closed container. Description of Vault is "A place to deposit and withdraw groups of items.".
An arrow is a kind of thing. An armor is a kind of thing.
There are 20 arrows and 4 armors in the Lab.
Bulk-depositing is an action applying to one visible thing.
Bulk-depositing is groupable action.
Understand "deposit [things]" as bulk-depositing.
Action on groups rule for bulk-depositing:
let N be the number of entries in multiple object list;
let L be the multiple object list;
say "Depositing [N] [noun][s]...";
repeat with Item running through L:
now player is carrying Item;
> deposit 4 arrows
Depositing 4 arrows…
> i
You are carrying
an arrow
This is such a simple example I that I don’t get enough clues as to what is missing.
Yes. I fixed that typo but I’m stuck. I can’t get anything into the Vault. Let me add the new intention.
"GroupActions" by Clyde Falsoon
Include Actions on Groups by Matt Weiner.
Lab is a room. Description of Lab is "A test room for actions on groups.".
Vault is a closed container. Description of Vault is "A place to deposit and withdraw groups of items.".
Does the player mean bulk-depositing something into in Vault:
it is very likely.
An arrow is a kind of thing. An armor is a kind of thing.
There are 20 arrows and 4 armors in the Lab.
Bulk-depositing is an action applying to one visible thing.
Bulk-depositing is groupable action.
Understand "deposit [things preferably held]" as bulk-depositing.
Action on groups rule for bulk-depositing:
place contents of Vault in scope;
let N be the number of entries in multiple object list;
let L be the multiple object list;
say "Depositing [N] [noun][s]...";
repeat with Item running through L:
say "....Depositing [Item]...";
move Item to Vault;
test dep with "take all/deposit 4 arrows/deposit 2 armors/i/showme vault".
Since I defined the action as [things preferably held], I first took all things in the room in the test script.
This should be removed from your example, it makes it not compile (“into in Vault” is obviously a typo, and bulk-depositing something into a container doesn’t make sense either since it only applies to one thing).
Apart from that it seems to work for me, it deposits two armors and four arrows. Can you explain what you expect it to do, and what it does instead?
Edit: Now that you added the screenshot of the output: What’s wrong in that output exactly? I don’t quite understand what problem you’re having, it seems to do the expected thing to me, and it does the thing you said it didn’t do (you said you couldn’t get anything into the Vault, but your output shows that you do…)