Room Description Control
version 9 by Emily Short
Section 1 - Priority and Concealment Rules
Include Complex Listing by Emily Short. Include version 4 of Plurality by Emily Short.
The new object description rule is listed instead of the room description paragraphs about objects rule in the carry out looking rules.
When play begins:
now every thing is unmentioned.
Before reading a command:
now every thing is unmentioned.
This is the new object description rule:
follow the description-priority rules.
The description-priority rules are a rulebook.
A description-priority rule (this is the marking rule):
now every thing is not marked for listing;
call the swift rule on everything in scope.
A description-priority rule (this is the mentioning tedious things rule):
now the player is not marked for listing;
now every thing enclosed by the player is not marked for listing;
now every scenery thing is not marked for listing;
A description-priority rule (this is the determining concealment rule):
follow the description-concealing rules.
The description-concealing rules are a rulebook.
A description-concealing rule (this is the concealing parts rule):
now everything that is part of something is not marked for listing.
A description-concealing rule (this is the ordinary-concealment rule):
repeat with special-target running through marked for listing people
begin;
repeat with second special-target running through things carried by special-target
begin;
if special-target conceals second special-target, now second special-target is not marked for listing;
end repeat;
end repeat.
A description-concealing rule (this is the don't mention things out of play rule):
repeat with special-target running through marked for listing things
begin;
if the holder of the special-target is nothing, now the special-target is not marked for listing;
end repeat;
A description-priority rule (this is the loading table rule):
empty out the table of seen things;
repeat with item running through mentionable things
begin;
choose a blank row in the Table of Seen things;
change output entry to item;
end repeat;
lowest-rank is a number that varies.
A description-priority rule (this is the description-ranking rule):
change lowest-rank to 1000;
repeat through the Table of Seen Things
begin;
now the description-rank of the output entry is 0;
consider the ranking rules for the output entry;
change the current rank entry to the description-rank of the output entry;
if description-rank of the output entry is less than lowest-rank, change lowest-rank to description-rank of the output entry;
end repeat;
sort the Table of Seen Things in reverse current rank order;
A description-priority rule (this is the reporting descriptions rule):
repeat through the Table of Seen things
begin;
if the output entry is unmentioned, carry out the writing a paragraph about activity with the output entry;
end repeat.
[A description-priority rule (this is the final description rule):
say paragraph break.]
After printing the name of something (called special-target) while writing a paragraph about something:
now the special-target is not marked for listing;
now the special-target is mentioned.
A thing has a number called description-rank.
Ranking rules are an object-based rulebook.
Table of Seen Things
| output | current rank |
| an object | a number |
| with 60 blank rows. |
Definition: a thing is mentionable if it is marked for listing and it is unmentioned. Definition: a thing is unmentionable if it is not mentionable.
Definition: a thing is descriptively dull if the description-rank of it is lowest-rank.
[This portion makes sure that items that are listed together in groups get properly flagged 'mentioned':]
After printing the plural name of something (called target):
repeat with item running through things held by the holder of target
begin;
if the item nominally matches the target
begin;
now the item is mentioned;
end if;
end repeat;
To decide whether (X - a thing) nominally matches (Y - a thing):
(- ({X}.list_together == {Y}.list_together) -)
To call (RL - a rule) on everything in scope:
(-
processing_rule = {RL};
LoopOverScope(Process_single_item);
-)
The scope processing rules are an object-based rulebook.
Include (-
Global processing_rule = 0;
[ Process_single_item o;
FollowRulebook(processing_rule, o, true);
];
-) after "Definitions.i6t".
A scope processing rule for a thing (called n) (this is the swift rule): now n is marked for listing.