Thanks for the suggestion! Unfortunately, I need to be able to print the short-form name as well, since I intend to do a “these are the things you can interact with” thingymajig at the bottom of the screen, and the floral description might not always be appropriate.
To account for this, I added the following:
[code]A thing has a text called floral. The floral is usually “[the item described]”.
A thing has a text called shortform. The shortform is usually “[The item described]”.
Before looking:
Repeat with longform running through visible things:
Now the printed name of longform is the floral of longform.
After looking:
Repeat with backtonormal running through things in location:
Now the printed name of backtonormal is the shortform of backtonormal.
Say “[paragraph break][A list of things in location] are interactable.”
Welcome is a room with the description “You’re overlooking a small room. Two features strike you: [A list of visible things].”
The couch is scenery in Welcome. It has the floral “a couch dominating the middle of the room”. It has the shortform “couch”.
A bookshelf is scenery in Welcome. It has the floral “a bookshelf propped up against a wall”. It has the shortform “bookshelf”.[/code]
Which… I mean, it works, but it’s far from perfect. It has no customizability, and means I have to add yet another property that I have to type out for every item.
Something like what you suggested would work pretty well for smelling, though. You already have a property with the smell, and presumably you have a seperate smelling action. So all you need to do is something in this vein:
Odorizing is an action applying to nothing. Understand "odor" as odorizing.
Rule for printing the name of a thing (called odorizer) while odorizing: say "[odor of odorizer]"
Carry out odorizing:
Say "You smell the unmistakable scents of [a list of things]."
Welcome is a room with the description "an empty room".
A thing has a text called odor. The odor is usually "nothing".
Lilacs are in Welcome. The odor of lilacs is "flowers".
Roses are in Welcome. The odor is "chocolate".
The odor of the player is "yourself".
Test me with "odor / look"