Although Pacian’s suggestion should work, it’s sub-optimal because the code that checks for the current location will be executed regardless of the PC’s actual current location. Adding more and more code that gets executed regardless is one of those things that can slow down the game. Remember the weird lag between player input and response time in “Max Blaster and Doris de Lightning” for example? I strongly suspect that this was the result of a lot of code getting executed at all times, even when not needed.
Best is to always keep code localized to places where it’s actually needed. In this case, if you take a look at travel.t, and search in it for the places where gExitLister is used (a simple text search should do), you will find the methods that use gExitLister to perform their work. For example, BasicLocation defines the following method:
/*
* Show a list of exits from this room as part of failed travel
* ("you can't go that way").
*/
cannotGoShowExits(actor)
{
/* if we have an exit lister, ask it to show exits */
if (gExitLister != nil)
gExitLister.cannotGoShowExits(actor, self);
}
Instead of modifying BasicLocation itself, you can simply override all the methods that delegate their work to gExitLister with either your custom code, or make them delegate their work to a custom ExitLister that contains Pacian’s modifications. For example, instead of:
if (gExitLister != nil)
gExitLister.cannotGoShowExits(actor, self);
your BasicLocation subclass could do:
gMyCustomExitLister.cannotGoShowExits(actor, self);
That way, no code that checks for the current location needs to be executed every time in all locations.
Of course, you will need to also override the rest of the BasicLocation methods where you need custom behavior. Also note that BasicLocation might not be the only place that needs modifications. A text search for “gExitLister” over all *.t files of the adv3 library should be enough to get an idea of where to override (or modify) the default methods.
Hope that helps.