Custom Library Messages

version 4/120212 by Ron Newcomb

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - cleaner rule design (for Glulx only)

    For printing the locale description (this is the I-could-also-see rule):
        now everything is unmarked for listing;
        repeat through the Table of Locale Priorities:
            if the locale description priority entry is at least one and the notable-object entry is not [already] mentioned, now the notable-object entry is marked for listing;
        if something is marked for listing, carry out the listing nondescript items activity with the parameter-object;
        continue the activity.

    Last for listing nondescript items (this is the standard listing nondescript items rule):
        issue library message looking action number 5 for the parameter-object;
        let the common holder be nothing;
        let contents form of list be true;
        repeat with list item running through marked for listing things:
            if the holder of the list item is not the common holder:
                if the common holder is nothing, now the common holder is the holder of the list item;
                otherwise now contents form of list is false;
            if the list item is mentioned, now the list item is unmarked for listing;
        filter list recursion to unmentioned things;
        if contents form of list is true and the common holder is not nothing,
            list the contents of the common holder, as a sentence, including contents, giving brief inventory information, tersely, not listing concealed items, listing marked items only;
        otherwise say a list of marked for listing things including contents;
        unfilter list recursion;
        issue library message looking action number 6 for the parameter-object.