Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing verblibm.h

EnterSub (lines 1298-1340)

1298  !   Travelling around verbs
1299  ! ----------------------------------------------------------------------------
1300   
1301  [ EnterSub ancestor j k;
1302    if (noun has door || noun in compass) <<Go noun>>;
1303   
1304    if (player in noun) return L__M(##Enter,1,noun);
1305    if (noun hasnt enterable) return L__M(##Enter,2,noun);
1306    if (noun has container && noun hasnt open) return L__M(##Enter,3,noun);
1307   
1308    if (parent(player) ~= parent(noun))
1309    {   ancestor = CommonAncestor(player, noun);
1310        if (ancestor == player or 0) return L__M(##Enter,4,noun);
1311        while (player notin ancestor)
1312        {   j = parent(player);
1313            k = keep_silent; 
1314            if (parent(j) ~= ancestor || noun ~= ancestor)
1315            {   L__M(##Enter,6,j);
1316                keep_silent = 1;
1317            }
1318            <Exit>;
1319            keep_silent = k;
1320            if (player in j) return;
1321        }
1322        if (player in noun) return;
1323        if (noun notin ancestor)
1324        {   j = parent(noun);
1325            while (parent(j) ~= ancestor) j = parent(j);
1326            L__M(##Enter,7,j);
1327            k = keep_silent; keep_silent = 1;
1328            <Enter j>;
1329            keep_silent = k;
1330            if (player notin j) return;
1331            <<Enter noun>>;
1332        }
1333    }
1334   
1335    move player to noun;
1336    if (AfterRoutines()==1) rtrue;
1337    if (keep_silent==1) rtrue;
1338    L__M(##Enter,5,noun);
1339    Locale(noun);
1340  ];


Last updated 27 February 2004. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.