SYNOPSIS
mapping P_NOWAY_MSGS "NowayMsgs"
mapping Set(P_NOWAY_MSGS, mapping value)
mapping Query(P_NOWAY_MSGS)
or
mapping SetNowayMsgs(mapping value)
mapping QueryNowayMsgs()
Modified via:
void AddNowayMsg (string verb, string message)
void AddNowayMsg (string * verbs, string message)
void RemoveNowayMsg (string verb)
void RemoveNowayMsg (string * verbs)
/std/room expects also:
string QueryNowayMsgs(string verb, string arg)
DESCRIPTION
To allow more specific messages when a player tries to use a
non-existant exit, this property stores for each direction verb
the appropriate message in a mapping.
During actual commands the property is queried through the
QueryNowayMsg() function, which, in case that P_NOWAY_MSGS does
not cover the actual verb, will return the default P_NOWAY_MSG
(note the missing 'S' at the end).
EXAMPLE
// Add two messages (the preferred form!)
AddNowayMsg("north", "You don't dare to go there.\n");
AddNowayMsg("west", "You bump into a wall.\n");
// This is equivalent to the above.
Set(P_NOWAY_MSGS, (["north" : "You don't dare to go there.\n"
, "west" : "You bump into a wall.\n"]) );
// Set several directions at once.
AddNowayMsg(({"north", "west"}), "You bump into a wall.\n");
// Remove settings.
RemoveNowayMsg(({"north", "west"}));
RemoveNowayMsg("north");
RemoveNowayMsg("west");
AVAILABILITY
Include: <properties.h>
Availability: /std/room(/exits) and descendants.
SEE ALSO
room(S), nowaymsg(P)