LookSub (lines 1571-1633)
Back to List
Browsing verblibm.h
1571 [ LookSub allow_abbrev visibility_levels i j k;
1572 if (parent(player)==0) return RunTimeError(10);
1573
1574 .MovedByInitial;
1575 if (location == thedark) { visibility_ceiling = thedark; NoteArrival(); }
1576 else
1577 { visibility_levels = FindVisibilityLevels();
1578 if (visibility_ceiling == location)
1579 { NoteArrival();
1580 if (visibility_ceiling ~= location) jump MovedByInitial;
1581 }
1582 }
1583
1584 ! Printing the top line: e.g.
1585 ! Octagonal Room (on the table) (as Frodo)
1586
1587 new_line;
1588 style bold;
1589 if (visibility_levels == 0) print (name) thedark;
1590 else
1591 { if (visibility_ceiling ~= location) print (The) visibility_ceiling;
1592 else print (name) visibility_ceiling;
1593 }
1594 style roman;
1595
1596 for (j=1, i=parent(player):j<visibility_levels:j++, i=parent(i))
1597 if (i has supporter) L__M(##Look,1,i);
1598 else L__M(##Look,2,i);
1599
1600 if (print_player_flag==1) L__M(##Look,3,player);
1601 new_line;
1602
1603 ! The room description (if visible)
1604
1605 if (lookmode<3 && visibility_ceiling==location)
1606 { if ((allow_abbrev~=1) || (lookmode==2) || (location hasnt visited))
1607 { if (location.describe~=NULL) RunRoutines(location,describe);
1608 else
1609 { if (location.description==0) RunTimeError(11,location);
1610 else PrintOrRun(location,description);
1611 }
1612 }
1613 }
1614
1615 if (visibility_levels == 0) Locale(thedark);
1616 else
1617 { for (i=player, j=visibility_levels: j>0: j--, i=parent(i))
1618 give i workflag;
1619
1620 for (j=visibility_levels: j>0: j--)
1621 { for (i=player, k=0: k<j: k++) i=parent(i);
1622 if (i.inside_description~=0)
1623 { new_line; PrintOrRun(i,inside_description); }
1624 Locale(i);
1625 }
1626 }
1627
1628 LookRoutine();
1629 ScoreArrival();
1630
1631 action=##Look;
1632 if (AfterRoutines()==1) rtrue;
1633 ];
Last updated 27 February 2004.
This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation.
Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.