So I wanted to see about responses to taking scenery/people/etc. TAKE ALL doesn’t quite cover this.
So I defined an alternate rule:
room 1 is a room.
the junk is fixed in place. the junk is in room 1.
The exclude scenery from take all rule is not listed in the for deciding whether all includes rulebook.
The exclude fixed in place things from take all rule is not listed in the for deciding whether all includes rulebook.
The exclude people from take all rule is not listed in the for deciding whether all includes rulebook.
Rule for deciding whether all includes fixed in place things while taking:
say "FIXED [noun].";
if take-it is true, rule succeeds;
the rule fails;
My goal with this code is to type GET ALL and see FIXED junk. But it says FIXED nothing.
How can I do this inside the rule? I can try
[code]chapter takedebug - not for release
The can’t take what’s fixed in place rule is not listed in the check taking rulebook.
check taking scenery:
say “You can’t take [noun]–it’s scenery. Note: need less generic message.”;
check taking a fixed in place thing:
say “You can’t take [noun]–it’s fixed in place. Note: need less generic message.”;[/code]
But I was wondering if there was something more direct in the rule itself.
“Noun” refers to the player’s command, and in this case there is no noun in the command so the variable is empty. I don’t know if there’s a way to access the item being tested for inside the “deciding whether all contains” rule.
A bit of self-promotion: the Object Response Tests extension lets you command >TRY TAKING and it’ll loop through every object in the room and prints their response to trying to take them.
I guess the less egregious hack would be to set a flag on things to see if they had had the message for them printed already that turn, or maybe use a list of things that had had the message printed which seems like it might be more efficient (since you don’t have to reset the flag on every object every turn).