From the NannyMUD documentation
2001-07-09
port - A port in a transport system.
/std/room
/std/special/transport/port
set_callmessage set_failmsg_busy set_failmsg_coming set_failmsg_here set_portname set_controller add_callcmd add_route
query_route query_portname
call_transport
This is the port in a transport system.
transport in std/transport/transport
NAME
set_callmessage - Message when calling a transport.LOCATION
/std/special/transport/portSYNTAX
void set_callmessage(string msg)DESCRIPTION
This function sets the message displayed when a transport is called. The message is run through std/msg.EXAMPLE
set_callmessage("\bPRON call\b$ a transport.\n");
FUNCTION
NAME
set_failmsg_busy - Message when transports are busy.LOCATION
/std/special/transport/portSYNTAX
void set_failmsg_busy(string msg);DESCRIPTION
Sets the message to be displayed when a player calls a transport, but all transports are busy. The message is run through std/msg.EXAMPLE
set_busymessage("\bPRON fail\b$ to call a transport.\n");
FUNCTION
NAME
set_failmsg_coming - Message when transport is already on way.LOCATION
/std/special/transport/portSYNTAX
void set_failmsg_coming(string msg);DESCRIPTION
Sets the message to be displayed when a player calls a transport, but there is already a transport on its way to that port. The message is run through std/msg.EXAMPLE
set_comingmessage("\bPRON tr\b{y,ies} to call a transport, but " + "there is already one on its way.\n");
FUNCTION
NAME
set_failmsg_here - Message when transport is already here.LOCATION
/std/special/transport/portSYNTAX
void set_failmsg_here(string msg);DESCRIPTION
Sets the message to be displayed when a player calls a transport, but there is already a transport in that port. The message is run through std/msg.EXAMPLE
set_heremessage("\bPRON tr\b{y,ies} to call a transport, but there " + "is already one here.\n");
FUNCTION
NAME
set_port_name - Set the name of the port.LOCATION
/std/special/transport/portSYNTAX
void set_portname(string portname);DESCRIPTION
This function sets the name of the port. This name is used when specifying destination for travelling.
FUNCTION
NAME
set_controller - Set the transport controller daemon.LOCATION
/std/special/transport/portSYNTAX
void set_controller(string filename);DESCRIPTION
Specifies which controller daemon the transport belongs to. The argument is the filename of the controller object.
FUNCTION
NAME
add_callcmd - Add a command that calls the transport.LOCATION
/std/special/transport/portSYNTAX
void add_callcmd(string command);DESCRIPTION
This function adds a command that can be used to call a transport. One port can have several different commands.EXAMPLE
add_travelcmd("call ferry");EXAMPLE
add_travelcmd("signal ferry");
FUNCTION
NAME
add_route - Add the route to another port.LOCATION
/std/special/transport/portSYNTAX
void add_route(string port, string *route);DESCRIPTION
In each port in a transport system that uses routes, all outbound routes need to be defined with this function. The first argument is the filename of the destination port for the route. The second argument is the path, an array of directions.NOTE
The directions need to be exits in the rooms along the path, but not necessarily accessible for players (can be blocked with a check-function).EXAMPLE
in port1.c: add_route("/players/wizard/port2",({"east","north","east","up"})); in port2.c: add_route("/players/wizard/port1",({"down","west","south","west"}));
FUNCTION
NAME
query_route - The route to another port.LOCATION
/std/special/transport/portSYNTAX
string *query_route(string port);DESCRIPTION
Returns the route to the specified port. The argument is the filename of the destination port.
FUNCTION
NAME
query_portname - The name of the port.LOCATION
/std/special/transport/portDESCRIPTION
Returns the name of the port.
FUNCTION
NAME
call_transport - Call a transport to this port.LOCATION
/std/special/transport/portSYNTAX
void call_transport();DESCRIPTION
This function calls a transport to the port. Read the source before calling this function yourself.NOTE
This can be called when making your own callfunction, because you want a different behaviour. Normally, don't use this function.