adv3Lite: terse and verbose

I’ve just noticed that adv3Lite doesn’t seem to have the standard ‘terse’ and ‘verbose’ commands for controlling room printout in rooms that you’ve already visited. I’ve suggested to Eric that he might want to reconsider this. In the meantime, here’s some code that seems to provide a workaround, in case anybody is interested:

[code]terseness: object
isTerse = nil
;

modify Room
interiorDesc {
if ((!visited || !terseness.isTerse) || gActionIs(Look)) desc;
}
;
DefineIAction(Terse)
execAction(cmd) {
if (terseness.isTerse) {
"[Room descriptions are already set to brief mode.] ";
}
else {
"[Setting room descriptions to brief mode…] ";
terseness.isTerse = true;
}
}
;
VerbRule(Terse)
‘terse’ | ‘brief’
: VerbProduction
action = Terse
verbPhrase = ‘set/setting the room descriptions to terse mode’
;
DefineIAction(Verbose)
execAction(cmd) {
if (!terseness.isTerse) {
"[Room descriptions are already set to verbose mode.] ";
}
else {
"[Setting room descriptions to verbose mode…] ";
terseness.isTerse = nil;
}
}
;
VerbRule(Verbose)
‘verbose’ | ‘wordy’
: VerbProduction
action = Verbose
verbPhrase = ‘set/setting the room descriptions to verbose mode’
;[/code]

I didn’t think anyone used brief mode these days, which is why I didn’t include for it, but it you want it I’ll certainly take a look at adding it, and I may borrow your code to do so! I’ll probably make isTerse (or whatever I decide to call it) a property of gameMain rather than creating a new object for it. But before doing anything else I’ll need to remind myself precisely what the BRIEF command actually does (i.e., how much of the room description it suppresses)!

The way I set it up, I don’t think it suppresses the specialDesc of anything in the room. I figured that was appropriate, because it’s very possible that a specialDesc might have changed. And of course if there’s an Actor in the room, we want to remind the player of that, even if the Actor was there before.

I think the way I’ve set it up (in the version now uploaded to GitHub) is functionally equivalent to the way you did; BRIEF simply suppresses the room description, not the listing of any objects in the room (with or without specialDescs).