Lists of topics...??

In a game I’m working on, I have a restaurant where the player can make an order. The verb is defined like this–

Ordering is an action applying to a topic.  Understand "order [text]", "request [text]", "choose [text]" or "ask for [text]" as ordering.

The player is only going to want one specific thing, and I have written some rules allowing only that one thing to be successfully ordered (and, of course, I have a check rule allowing the action only in the presence of the server). However, the player can conceivably type the name of the thing in a number of ways, for example–as ‘Italian lasagna’ or ‘lasagna italiano’ or ‘traditional lasagna’ etc etc. I have tried to create a list of topics–

Mychoice is a list of topics that varies.  Mychoice is {"Italian lasagna", "lasagna italiano", "traditional lasagna"}.

But ‘topics’ did not work because lists can’t have that as a value. I also tried ‘texts’, etc etc. (various combinations of ‘topic’, ‘text’, ‘topic understood’…

Finally, what I found that worked was having a single-column table, with a column of the optional names–

Table 1 - Hobson's Choices Topic "Italian lasagna" "lasagna italiano" "traditional lasagna"

Then of course I used ‘if the topic understood is a topic listed in table 1’ in my rule for the ordering.
Is there a less cockeyed way of doing this??


“Topics” are different from “text” in that topics are parsing functions, so they can be arbitrarily complex.

[code]Understand “lasagna” or “lasagne” as “[lasagna]”. Understand “italian/traditional [lasagna]” or “[lasagne] italian/italiano” or “[lasagna]” as “[meal]”.

Instead of ordering “[meal]”: say “The waiter nods. ‘One special, coming up!’ He rushes away.”
Instead of ordering a topic: say “That isn’t on the menu.”[/code]

Here the single topic “[meal]” matches “italian lasagna”, “lasagne italiano”, and so on.

Thanks, Daniel. I vaguely recall reading about something similar in the manual, though I can’t recall where…