Let’s say the protagonist is a pet, and sometimes its human companion needs to carry them somewhere. My code is generating a room description whenever the the pet is picked up. Judging by the (in bob) appended to the room name, I’m guessing this is treated as a new location?
Hmm, away from the IDE but my first thought is that you’d need to rewrite the room description heading rule to catch the case where the lowest-level container of the player is a person, and then rewrite the output. Looking at the rule, I see it has a special case for animals so I think it’s just a matter of adding a similar one for people.
(Just pasting the rule in here for reference:)
Carry out looking (this is the room description heading rule):
say bold type;
if the visibility level count is 0:
begin the printing the name of a dark room activity;
if handling the printing the name of a dark room activity:
say "Darkness" (A);
end the printing the name of a dark room activity;
otherwise if the visibility ceiling is the location:
say "[visibility ceiling]";
otherwise:
say "[The visibility ceiling]";
say roman type;
let intermediate level be the visibility-holder of the actor;
repeat with intermediate level count running from 2 to the visibility level count:
if the intermediate level is a supporter or the intermediate level is an animal:
say " (on [the intermediate level])" (B);
otherwise:
say " (in [the intermediate level])" (C);
let the intermediate level be the visibility-holder of the intermediate level;
say line break;
say run paragraph on with special look spacing.
Carry out Bob taking Marbles:
move marbles to bob, without printing a room description;
rule succeeds. [halts carry out rule processing]
The built-in standard taking rule contains the line:
now the actor carries the noun;
This is translated in I6 to:
! [2: now the actor carries the noun]
MoveObject(noun,actor);
The MoveObject() routine has special code for when the item moved is the player:
...
if (going_mode == false) {
if (F == player) { PlayerTo(T, opt); return; }
...
The PlayerTo() routine instigates a looking action unless told not to:
[ PlayerTo newplace flag L;
L = LocationOf(newplace);
if (L == nothing) return RunTimeProblem(RTP_CANTBEOFFSTAGE);
@push actor; actor = player;
move player to newplace;
location = L;
real_location = location;
MoveFloatingObjects();
SilentlyConsiderLight();
DivideParagraphPoint();
if (flag == 0) <Look>; ! <-- HERE
if (flag == 1) give location visited;
if (flag == 2) AbbreviatedRoomDescription();
@pull actor;
];
In this case, the opt argument provided by MoveObject() (which is mapped to the flag parameter for PlayerTo()) will be zero, and there’s no easy way to change that value. By creating a special-case rule that takes priority over the standard rule and prevents its processing, you can use the move ... to ... phrase, which will not print a room description if the proper phrase option is used.
EDIT: Corrected obvious mistake in the above. Sorry for any confusion.