Grammar:Indefinite Articles
All assets have an indefinite article, which is determined using a simple
algorithm. The default values for are "a" and "an", but custom
values can be set manually. For example you might use "the" if the
object is unique, as in "the Singing Sword". Change it for individual
assets or classes by setting asset.indefinite_article = "foo".
For example, consider this antique chair, which we want to appear in
lists as the antique chair.
MyGame.createAsset({
class: "Chair",
name: "antique chair",
definite_article: "the",
place: "Sitting Room",
description:
"The antique Victorian armchair is carved of supple walnut and upholstered with purple embroidery.",
});
Alternately you may use the shortcut a to set indefinite_article.
MyGame.createAsset({
class: "Chair",
name: "antique chair",
place: "Sitting Room",
a: "the", // shortcut to indefinite article
description:
"The antique Victorian armchair is carved of supple walnut and upholstered with purple embroidery.",
});
Additionally, all assets have an indefinite_name property which
will always return the asset's name preceded by its indefinite article:
an antique chair.
Finally, all assets have an article_name property which may
return a proper name, or the name preceded by the definite article, or the
name preceded by the indefinite article, depending on related settings.
(There is also a use_indefinite_article property though it's only
used in a couple of places so don't get expect much of it.)
MyGame.createAsset({
class: "Edible",
name: "cherries",
synonyms: ["cherry"],
place: { in: "red bowl" },
is: { plural: true },
// indefinite articles are handled automatically,
// but they can be set manually
indefinite_article: "some",
use_indefinite_article: true, // only used in a couple of places
});