SYNOPSIS
mapping P_NOISES "Noises"
mapping Set(P_NOISES, mapping value)
mapping Query(P_NOISES)
or
mapping SetNoises(mapping value)
mapping QueryNoises()
Accessible via:
void AddNoise(string|string * id, string desc)
void AddNoise(string|string * id, string * desc)
void AddNoise(string|string * id, closure desc)
void RemoveNoise(string|string * id)
string|string* GetNoise(string id)
DESCRIPTION
This property implements the noises of a room, i.e. things which
can be listened to, but need not be represented with an own object.
The value of the property is a mapping of the noise descriptions,
with the id of each noise indexing its description.
The description may be:
- a single string with the description,
- a closure returning the description string.
The closure will be called with the id of the noise as
argument.
The noises cooperate with /std/room/description::DoExplore() to
implement the explorer facilities.
The noises should be accessed via AddNoise(), RemoveNoise() and
GetNoise().
string|string* GetNoise(string id)
Return the description for noise <id>, or 0 if it isn't
defined. This takes care of closure evaluation.
void AddNoise(string|string * id, string desc)
Add/redefine a noise <id> with the description <desc>.
If an array of ids is given, each of the noises gets the same
description (this is also valid for the other AddNoise()
forms).
void AddNoise(string|string * id, string * desc)
Add/redefine a noise <id> with the description <desc>.
<desc> is of the form ({ "#call_other", <object>, "functionname", ... }),
which will be compiled into a closure and stored as such.
void AddNoise(string|string * id, closure desc)
Add/redefine a noise <id> with the closure <desc> returning the
actual description.
void RemoveNoise(string id)
Remove the noise <id> if existing.
void RemoveNoise(string * ids)
Remove the noises <ids> if existing.
EXAMPLE
// Add a noise to listen to.
AddNoise("tree", "It's leafs rattle quietly in the wind.\n");
// Add a noise to resolved by a local function 'theoak()'.
AddNoise("oak", #'theoak);
// Remove all the noises added above.
RemoveNoise(({"tree", "oak"}));
AVAILABILITY
Include: <properties.h>
Availability: /std/room/(details), /std/npc and descendants.
SEE ALSO
room(S), explorable(P), details(P), readmsgs(P), smells(P)