[StandardsElement::] Standards Element. To write the Standards element (St) in the index. @ This is essentially a trawl through the more popular rulebooks, showing their contents in logical order. = void StandardsElement::render(OUTPUT_STREAM) { inter_tree *I = Index::get_tree(); tree_inventory *inv = Synoptic::inv(I); TreeLists::sort(inv->rulebook_nodes, Synoptic::module_order); TreeLists::sort(inv->activity_nodes, Synoptic::module_order); @; @; @; @; @; @; @; @; @; } @ = HTML_OPEN("p"); WRITE("The top level"); HTML_CLOSE("p"); HTML_OPEN("p"); WRITE("An Inform story file spends its whole time working through " "these three master rulebooks. They can be altered, just as all " "rulebooks can, but it's generally better to leave them alone."); HTML_CLOSE("p"); IndexRules::index_rules_box(OUT, inv, I"Startup rules", NULL, IndexRules::find_rulebook(inv, I"startup"), NULL, 1, TRUE); StandardsElement::activity(OUT, inv, I"starting_virtual_machine", 2); StandardsElement::activity(OUT, inv, I"printing_banner_text", 2); IndexRules::index_rules_box(OUT, inv, I"Turn sequence rules", NULL, IndexRules::find_rulebook(inv, I"turn_sequence"), NULL, 1, TRUE); StandardsElement::activity(OUT, inv, I"constructing_status_line", 2); IndexRules::index_rules_box(OUT, inv, I"Shutdown rules", NULL, IndexRules::find_rulebook(inv, I"shutdown"), NULL, 1, TRUE); StandardsElement::activity(OUT, inv, I"amusing_a_victorious_player", 2); StandardsElement::activity(OUT, inv, I"printing_players_obituary", 2); StandardsElement::activity(OUT, inv, I"dealing_with_final_question", 2); @ = HTML_OPEN("p"); WRITE("Rules added to the sequence of play"); HTML_CLOSE("p"); HTML_OPEN("p"); WRITE("These rulebooks are the best places to put rules timed to happen " "at the start, at the end, or once each turn. (Each is run through at " "a carefully chosen moment in the relevant top-level rulebook.) It is " "also possible to have rules take effect at specific times of day " "or when certain events happen. Those are listed in the Scenes index, " "alongside rules taking place when scenes begin or end."); HTML_CLOSE("p"); IndexRules::index_rules_box(OUT, inv, I"When play begins", I"rules_wpb", IndexRules::find_rulebook(inv, I"when_play_begins"), NULL, 1, TRUE); IndexRules::index_rules_box(OUT, inv, I"Every turn", I"rules_et", IndexRules::find_rulebook(inv, I"every_turn"), NULL, 1, TRUE); IndexRules::index_rules_box(OUT, inv, I"When play ends", I"rules_wpe", IndexRules::find_rulebook(inv, I"when_play_ends"), NULL, 1, TRUE); @ = HTML_OPEN("p"); WRITE("How commands are understood"); HTML_CLOSE("p"); HTML_OPEN("p"); WRITE("'Understanding' here means turning a typed command, like GET FISH, " "into one or more actions, like taking the red herring. This is all handled " "by a single large rule (the parse command rule), but that rule makes use " "of the following activities and rulebooks in its work."); HTML_CLOSE("p"); IndexRules::index_rules_box(OUT, inv, I"Does the player mean", I"rules_dtpm", IndexRules::find_rulebook(inv, I"does_the_player_mean"), NULL, 1, TRUE); StandardsElement::activity(OUT, inv, I"reading_a_command", 1); StandardsElement::activity(OUT, inv, I"deciding_scope", 1); StandardsElement::activity(OUT, inv, I"deciding_concealed_possess", 1); StandardsElement::activity(OUT, inv, I"deciding_whether_all_inc", 1); StandardsElement::activity(OUT, inv, I"clarifying_parsers_choice", 1); StandardsElement::activity(OUT, inv, I"asking_which_do_you_mean", 1); StandardsElement::activity(OUT, inv, I"printing_a_parser_error", 1); StandardsElement::activity(OUT, inv, I"supplying_a_missing_noun", 1); StandardsElement::activity(OUT, inv, I"supplying_a_missing_second", 1); StandardsElement::activity(OUT, inv, I"implicitly_taking", 1); @ = HTML_OPEN("p"); WRITE("Rules governing actions"); HTML_CLOSE("p"); HTML_OPEN("p"); WRITE("These rules are the ones which tell Inform how actions work, " "and which affect how they happen in particular cases."); HTML_CLOSE("p"); IndexRules::index_rules_box(OUT, inv, I"Persuasion", I"rules_per", IndexRules::find_rulebook(inv, I"persuasion"), NULL, 1, TRUE); IndexRules::index_rules_box(OUT, inv, I"Unsuccessful attempt by", I"rules_fail", IndexRules::find_rulebook(inv, I"unsuccessful_attempt_by"), NULL, 1, TRUE); IndexRules::index_rules_box(OUT, inv, I"Before", I"rules_before", IndexRules::find_rulebook(inv, I"before"), NULL, 1, TRUE); IndexRules::index_rules_box(OUT, inv, I"Instead", I"rules_instead", IndexRules::find_rulebook(inv, I"instead"), NULL, 1, TRUE); IndexRules::index_rules_box(OUT, inv, I"Check", NULL, NULL, "Check rules are tied to specific actions, and there are too many " "to index here. For instance, the check taking rules can only ever " "affect the taking action, so they are indexed on the detailed index " "page for taking.", 1, TRUE); IndexRules::index_rules_box(OUT, inv, I"Carry out", NULL, NULL, "Carry out rules are tied to specific actions, and there are too many " "to index here.", 1, TRUE); IndexRules::index_rules_box(OUT, inv, I"After", I"rules_after", IndexRules::find_rulebook(inv, I"after"), NULL, 1, TRUE); IndexRules::index_rules_box(OUT, inv, I"Report", NULL, NULL, "Report rules are tied to specific actions, and there are too many " "to index here.", 1, TRUE); @ = HTML_OPEN("p"); WRITE("How actions are processed"); HTML_CLOSE("p"); HTML_OPEN("p"); WRITE("These form the technical machinery for dealing with actions, and are " "called on at least once every turn. They seldom need to be changed."); HTML_CLOSE("p"); IndexRules::index_rules_box(OUT, inv, I"Action-processing rules", NULL, IndexRules::find_rulebook(inv, I"action_processing"), NULL, 1, TRUE); IndexRules::index_rules_box(OUT, inv, I"Specific action-processing rules", NULL, IndexRules::find_rulebook(inv, I"specific_action_processing"), NULL, 2, TRUE); IndexRules::index_rules_box(OUT, inv, I"Player's action awareness rules", NULL, IndexRules::find_rulebook(inv, I"players_action_awareness"), NULL, 3, TRUE); @ = HTML_OPEN("p"); WRITE("How responses are printed"); HTML_CLOSE("p"); HTML_OPEN("p"); WRITE("The Standard Rules, and some extensions, reply to the player's " "commands with messages which are able to be modified."); HTML_CLOSE("p"); StandardsElement::activity(OUT, inv, I"printing_response", 1); @ = HTML_OPEN("p"); WRITE("How accessibility is judged"); HTML_CLOSE("p"); HTML_OPEN("p"); WRITE("These rulebooks are used when deciding who can reach what, and " "who can see what."); HTML_CLOSE("p"); IndexRules::index_rules_box(OUT, inv, I"Reaching inside", I"rules_ri", IndexRules::find_rulebook(inv, I"reaching_inside"), NULL, 1, TRUE); IndexRules::index_rules_box(OUT, inv, I"Reaching outside", I"rules_ri", IndexRules::find_rulebook(inv, I"reaching_outside"), NULL, 1, TRUE); IndexRules::index_rules_box(OUT, inv, I"Visibility", I"visibility", IndexRules::find_rulebook(inv, I"visibility"), NULL, 1, TRUE); @ = HTML_OPEN("p"); WRITE("Light and darkness"); HTML_CLOSE("p"); HTML_OPEN("p"); WRITE("These activities control how we describe darkness."); HTML_CLOSE("p"); StandardsElement::activity(OUT, inv, I"printing_name_of_dark_room", 1); StandardsElement::activity(OUT, inv, I"printing_desc_of_dark_room", 1); StandardsElement::activity(OUT, inv, I"printing_news_of_darkness", 1); StandardsElement::activity(OUT, inv, I"printing_news_of_light", 1); StandardsElement::activity(OUT, inv, I"refusal_to_act_in_dark", 1); @ = HTML_OPEN("p"); WRITE("How things are described"); HTML_CLOSE("p"); HTML_OPEN("p"); WRITE("These activities control what is printed when naming rooms or " "things, and their descriptions."); HTML_CLOSE("p"); StandardsElement::activity(OUT, inv, I"printing_the_name", 1); StandardsElement::activity(OUT, inv, I"printing_the_plural_name", 1); StandardsElement::activity(OUT, inv, I"printing_a_number_of", 1); StandardsElement::activity(OUT, inv, I"printing_room_desc_details", 1); StandardsElement::activity(OUT, inv, I"printing_inventory_details", 1); StandardsElement::activity(OUT, inv, I"listing_contents", 1); StandardsElement::activity(OUT, inv, I"grouping_together", 1); StandardsElement::activity(OUT, inv, I"writing_a_paragraph_about", 1); StandardsElement::activity(OUT, inv, I"listing_nondescript_items", 1); StandardsElement::activity(OUT, inv, I"printing_locale_description", 1); StandardsElement::activity(OUT, inv, I"choosing_notable_locale_obj", 1); StandardsElement::activity(OUT, inv, I"printing_locale_paragraph", 1); @ = void StandardsElement::activity(OUTPUT_STREAM, tree_inventory *inv, text_stream *id, int indent) { inter_package *av = IndexRules::find_activity(inv, id); if (av) IndexRules::index_activity(OUT, inv->of_tree, av, indent); }