From c9f6ea9b38c36aa34964a2b6800cb9430e0c2c8e Mon Sep 17 00:00:00 2001 From: Zed Lopez Date: Sat, 22 Apr 2023 16:13:31 -0700 Subject: [PATCH] completed concealment fixes --- .../WorldModelKit/Sections/ListWriter.i6t | 8 +-- inform7/Tests/Test Cases/Concealment.txt | 50 ------------------- .../Test Cases/_Results_Ideal/Undescribed.txt | 10 ++-- .../standard_rules/Sections/Actions.w | 10 ++-- .../standard_rules/Sections/Activities.w | 10 ++-- 5 files changed, 21 insertions(+), 67 deletions(-) delete mode 100644 inform7/Tests/Test Cases/Concealment.txt diff --git a/inform7/Internal/Inter/WorldModelKit/Sections/ListWriter.i6t b/inform7/Internal/Inter/WorldModelKit/Sections/ListWriter.i6t index 8f44cd594..33e5253e0 100644 --- a/inform7/Internal/Inter/WorldModelKit/Sections/ListWriter.i6t +++ b/inform7/Internal/Inter/WorldModelKit/Sections/ListWriter.i6t @@ -344,10 +344,10 @@ account. @h Having Evident Content This is true when something has at least one unconcealed thing in it. It's false when something is truly empty or when all the things in -it are concealed, and is used to ensure that output is consistent -in both those cases. The player shouldn't count for these purposes, -but since the player has the concealed attribute, the player gets -excluded anyway. +it are concealed or undescribed, and is used to ensure that output +is consistent in both those cases. The player shouldn't count for +these purposes, but since the player is undescribed, they're excluded +anyway. = [ ObviouslyOccupied o x; diff --git a/inform7/Tests/Test Cases/Concealment.txt b/inform7/Tests/Test Cases/Concealment.txt deleted file mode 100644 index 68092c014..000000000 --- a/inform7/Tests/Test Cases/Concealment.txt +++ /dev/null @@ -1,50 +0,0 @@ -Lab is a room. - -A thing can be occulted. - -For deciding the concealed possessions of a thing when the particular possession is occulted: rule succeeds. - -The table is a scenery supporter in the lab. -The plans are an occulted thing. The plans are on the table. -The journal is an occulted thing. The journal is on the table. - -The desk is a scenery supporter in the lab. -The letter is an occulted thing. The letter is on the desk. - -The settee is a scenery supporter in the lab. -The postcard is an occulted thing. The postcard is on the settee. -The cushion is on the settee. - -The stool is a scenery supporter in the lab. -The shoe is on the stool. - -The lava floor is a scenery supporter in the lab. - -The cardboard box is a closed openable container. The limited edition She-Ra action figure is an occulted thing in the cardboard box. The Power of Greyskull is an occulted thing in the cardboard box. The cardboard box is in the lab. - -The pouch is a closed openable container. The love letter is an occulted thing in the pouch. The pouch is in the lab. - -The gift box is a closed openable container. The card is an occulted thing. The card is in the gift box. The ball is in the gift box. The gift box is in the lab. - -The jar is a closed openable container. The cookie is a thing. The jar contains the cookie. The jar is in the lab. - -The crate is a closed openable enterable container. The crate is in the lab. - -The tray is a portable supporter. The wine glass is an occulted thing on the tray. The player carries the tray. - -The platform is an enterable supporter. It is in the Lab. - -The deck is an enterable supporter. It is in the Lab. -The invisible jet is an occulted thing. -The invisible jet is on the deck. - -The stage is an enterable supporter. It is in the Lab. -The mask is on the stage. - -The beam is an enterable supporter. It is in the Lab. -The wrench is on the beam. -The tape is an occulted thing. -The tape is on the beam. - -Test me with "x table / x desk / x settee / x stool / x lava floor / open cardboard box / open pouch / open gift box / open jar / open crate / x cardboard box / x pouch / x gift box / x jar / x crate / l / i / x tray / get glass / x deck / stand on deck / x deck / l / exit / x platform / stand on platform / x platform / l / exit / x stage / stand on stage / x stage / l / exit / x beam / stand on beam / x beam / l / exit". - diff --git a/inform7/Tests/Test Cases/_Results_Ideal/Undescribed.txt b/inform7/Tests/Test Cases/_Results_Ideal/Undescribed.txt index caff7729a..9f108ec97 100644 --- a/inform7/Tests/Test Cases/_Results_Ideal/Undescribed.txt +++ b/inform7/Tests/Test Cases/_Results_Ideal/Undescribed.txt @@ -1,23 +1,23 @@ Bar Welcome An Interactive Fiction - Release 1 / Serial number 150512 / Inform 7 build 6M22 (I6/v6.33 lib 6/12N) SD + Release 1 / Serial number 160428 / Inform 7 v10.2.0 / D Bar - You can see a counter (on which is a glass jar) and an obvious item here. + You can see a counter (on which is a glass jar (empty)) and an obvious item here. > > Bar (Testing.) >[1] x jar - The glass jar is empty. + You see nothing special about the glass jar. >[2] x hidden object You see nothing special about the hidden object. >[3] look Bar - You can see a counter (on which is a glass jar) and an obvious item here. + You can see a counter (on which is a glass jar (empty)) and an obvious item here. >[4] take all obvious item: Taken. @@ -102,7 +102,7 @@ Dropped. >[23] x glass jar - The glass jar is empty. + You see nothing special about the glass jar. >[24] search glass jar The glass jar is empty. diff --git a/inform7/extensions/standard_rules/Sections/Actions.w b/inform7/extensions/standard_rules/Sections/Actions.w index b02bb16f1..8f0aa0fdb 100644 --- a/inform7/extensions/standard_rules/Sections/Actions.w +++ b/inform7/extensions/standard_rules/Sections/Actions.w @@ -1193,11 +1193,11 @@ Carry out examining (this is the examine containers rule): concealed items, prefacing with is/are; say "."; now examine text printed is true; - otherwise if examine text printed is false: - if the player is in the noun: - make no decision; - say "[The noun] [are] empty." (B); - now examine text printed is true; + otherwise if examine text printed is false and the first thing held by the noun is nothing: + if the player is in the noun: + make no decision; + say "[The noun] [are] empty." (B); + now examine text printed is true; Carry out examining (this is the examine supporters rule): if the noun is a supporter and the noun is not falsely-unoccupied: diff --git a/inform7/extensions/standard_rules/Sections/Activities.w b/inform7/extensions/standard_rules/Sections/Activities.w index 0ff66fece..4e46d3059 100644 --- a/inform7/extensions/standard_rules/Sections/Activities.w +++ b/inform7/extensions/standard_rules/Sections/Activities.w @@ -112,9 +112,12 @@ To say the deceitfully empty inventory details of (box - a container): end if; For printing inventory details of a container (called the box) when the box is falsely-unoccupied (this is the falsely-unoccupied container inventory details rule): - say text of list writer internal rule response (A); [ "(" ] - say the deceitfully empty inventory details of box; - say text of list writer internal rule response (B); [ ")" ] + let the tag be "[the deceitfully empty inventory details of box]"; + if tag is not empty begin; + say text of list writer internal rule response (A); [ "(" ] + say tag; + say text of list writer internal rule response (B); [ ")" ] + end if; @ Names of things are often formed up into lists, in which they are sometimes grouped together: @@ -127,6 +130,7 @@ The standard contents listing rule is defined by Inter as "STANDARD_CONTENTS_LIS Grouping together something (documented at act_gt) is an activity. The grouping together activity is accessible to Inter as "GROUPING_TOGETHER_ACT". + @ And such lists of names are formed up in turn into room descriptions. Something which is visible in a room can either have a paragraph of its own or can be relegated to the list of "nondescript" items at the end.