(6M62)
I’m using the duplicates capability (4.14 in the manual) to deal with some empty cups.
My question is, when a player looks at a clump of these cups – which may consist of one or more cups somewhere; in their inventory, on a shelf, on the floor – how can I print a description on the fly that describes either one cup, or more than one cup?
I’ve got example code here that stops the ‘You can’t use multiple objects with that verb’ error happening in response to ‘x cups’ (on any number of cups) but obviously I’m getting the description of a single cup, the only description I currently have. I’d like it to work out how many cups are in the pile and then print a different description if it’s more than one. I can think of ways to do this (run a routine counting cups within the holder of the noun as part of creating the description?) but wondered if there’s anything better I could do.
-Wade
Summary
lab is a room.
a cup is a kind of thing. It is usually privately-named.
The printed name is "cup".
The printed plural name is "cups".
Understand "cup/cups" as a cup.
three cups are in lab.
Description of a cup is "It's a nice cup.".
Test me with "x cup/x cups".