! The WriteListFrom routine, a flexible object-lister taking care of ! plurals, inventory information, various formats and so on. This is used ! by everything in the library which ever wants to list anything. ! ! If there were no objects to list, it prints nothing and returns false; ! otherwise it returns true. ! ! o is the object, and style is a bitmap, whose bits are given by: ! ---------------------------------------------------------------------------- Constant NEWLINE_BIT 1; ! New-line after each entry Constant INDENT_BIT 2; ! Indent each entry by depth Constant FULLINV_BIT 4; ! Full inventory information after entry Constant ENGLISH_BIT 8; ! English sentence style, with commas and and Constant RECURSE_BIT 16; ! Recurse downwards with usual rules Constant ALWAYS_BIT 32; ! Always recurse downwards Constant TERSE_BIT 64; ! More terse English style Constant PARTINV_BIT 128; ! Only brief inventory information after entry Constant DEFART_BIT 256; ! Use the definite article in list Constant WORKFLAG_BIT 512; ! At top level (only), only list objects ! which have the "workflag" attribute Constant ISARE_BIT 1024; ! Print " is" or " are" before list Constant CONCEAL_BIT 2048; ! Omit objects with "concealed" or "scenery": ! if WORKFLAG_BIT also set, then does _not_ ! apply at top level, but does lower down Constant NOARTICLE_BIT 4096; ! Print no articles, definite or not [ NextEntry o odepth; for(::) { o=sibling(o); if (o==0) return 0; if (lt_value ~=0 && o.list_together~=lt_value) continue; if (c_style & WORKFLAG_BIT ~= 0 && odepth==0 && o hasnt workflag) continue; if (c_style & CONCEAL_BIT ~= 0 && (o has concealed || o has scenery)) continue; return o; } ];