Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing verblibm.h

EnterSub (lines 1724-1766)

1724  !   Travelling around verbs
1725  ! ----------------------------------------------------------------------------
1726   
1727  [ EnterSub ancestor j k;
1728      if (noun has door || noun in compass) <<Go noun>>;
1729   
1730      if (player in noun) return L__M(##Enter, 1, noun);
1731      if (noun hasnt enterable) return L__M(##Enter, 2, noun);
1732      if (noun has container && noun hasnt open) return L__M(##Enter, 3, noun);
1733   
1734      if (parent(player) ~= parent(noun)) {
1735          ancestor = CommonAncestor(player, noun);
1736          if (ancestor == player or 0) return L__M(##Enter, 4, noun);
1737          while (player notin ancestor) {
1738              j = parent(player);
1739              k = keep_silent;
1740              if (parent(j) ~= ancestor || noun ~= ancestor) {
1741                  L__M(##Enter, 6, j);
1742                  keep_silent = 1;
1743              }
1744              <Exit>;
1745              keep_silent = k;
1746              if (player in j) return;
1747          }
1748          if (player in noun) return;
1749          if (noun notin ancestor) {
1750              j = parent(noun);
1751              while (parent(j) ~= ancestor) j = parent(j);
1752              L__M(##Enter, 7, j);
1753              k = keep_silent; keep_silent = 1;
1754              <Enter j>;
1755              keep_silent = k;
1756              if (player notin j) return;
1757              <<Enter noun>>;
1758          }
1759      }
1760   
1761      move player to noun;
1762      if (AfterRoutines() == 1) rtrue;
1763      if (keep_silent == 1) rtrue;
1764      L__M(##Enter, 5, noun);
1765      Locale(noun);
1766  ];


Last updated 27 February 2004. The librarian in charge of this page is Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight. Please email any comments, suggestions or corrections to cedenqs@inform-fiction.org.