SYNOPSIS
string * P_ADS "Ads"
string * Set(P_ADS, string * value)
string * Query(P_ADS)
or
string SetAds(string * value)
string QueryAds()
also:
string * AddAdjective (string|string * id)
string * RemoveAdjective (string|string * id)
DESCRIPTION
The property holds an array of strings with the required adjectives of
the object. When specifying an object (like in present()), any of the
adjectives may appear in random order in the designation before the
id string.
The strings set are mapped to lowercase, leading and trailing spaces
are removed, sequences of embedded spaces are shrunk to just one
space each.
The adjectives of an object are to differentiate between objects of
the same id.
As the /std-things initialise P_ADS with generic id strings (to make
'all things' possible), changes to P_ADS should happen JUST through
these two lfuns:
string * AddAdjective (string|string * ad)
Adds <ad> to P_ADS and returns the new value of P_ADS.
<id> may an array of strings as well.
string * RemoveAdjective (string|string * ad)
Removes <id> to P_ADS and returns the new value of P_ADS.
<ad> may an array of strings as well.
Note: any change to an object's current adjectives sets the value
of the P_ID_PATTERN property back to 0.
EXAMPLE
AddAdjective("red");
AddAdjective(({"weird", "bunch of"});
RemoveAdjective("fooish");
Set(P_ADS, ({ "green" })); -- Sets "green" as only id. DO NOT DO THIS!
To distinguish two sword objects, program them as:
blue sword: AddId("sword"); AddAdjective("blue");
red sword: AddId("sword"); AddAdjective("red");
DO NOT use constructs like AddId(({"sword", "red sword"}))!
AVAILABILITY
Include: <properties.h>
Availability: /std/thing(/description) and descendants.
SEE ALSO
thing(S), ids(P), idpattern(P)