[Package Index | Mudlib Index | Effect Index]
File /std/room/graffbase.c
This is an inherit to be inherited along with a room to add
a surface into a room that can be written on using the
command "scrawl". The description of the surface, the writing
and the item used to write with can be customised. But they
default to writing graffiti on walls with charcoal (for the
sake of backwards compatibility).
Example
#include
inherit "/std/room/basic/graffbase";
inherit "/std/outsides/road";
int _stones;
void setup() {
set_light(100);
set_short("carriage stop on the Klatch Road");
add_property( "determinate" , "a " );
set_writing_stick("charcoal");
set_wall_short("shellter");
set_graffiti("graffiti");
set_terrain_map_character("#");
set_climate("Aw");
set_long("This is the middle of an extremely well used road, "
"with huge ruts made by the many cart-wheels that pass this way every "
"day. At the side of the road here stands a small shelter where "
"travellers can wait for a passing carriage or caravan. A few pieces "
"of charcoal litter the floor where someone has recently cooked their "
"dinner.");
set_room_jump_size(10);
set_follow_road(1);
}
/d/klatch/Maps/terrains/160_400/176_412/terrain_handler:12:30:0
[/d/klatch/Maps/roads/klatch/istanzia_carriage_stop]
(-214013184,-30011520,0)
This is the middle of an extremely well used road, with huge ruts made
by the many cart-wheels that pass this way every day. At the side of the road
here stands a small shelter where travellers can wait for a passing carriage or
caravan. A few pieces of charcoal litter the floor where someone has recently
cooked their dinner. The Crumpled bridge is to the west, the river Istanzia is
visible to the south and northwest, a road runs by to the east and some plains
are to the north, northeast, southeast and southwest.
It is a reasonably hot secundus autumn's afternoon with a gentle breeze and some
puffy clouds.
There are three obvious exits: west, journey east and enter djelibeybi caravan.
A wooden pole with a maroon note and a purple note attached to it is here and
the Djelibeybi Caravan is waiting here.
> syntax scrawl
Forms of syntax available for the command "scrawl":
scrawl on shelter with charcoal
scrawl with charcoal on shelter
> scrawl on shelter with charcoal
You start scrawling on a shelter with some charcoal.
Enter your text. Use ** on a line by itself to exit.
1 ]
Includes
This class includes the following files /include/language.hMethod index
- query_graffiti()
This function returns the short description of the graffiti on the wall.
- query_wall_short()
This function returns the short description for what is being written on.
- query_writing_stick()
This function returns the short description for what is being written with.
- set_graffiti(string)
This function sets the short description for the graffiti on the wall,
it defaults to "graffiti" if not defined in the room.
- set_wall_short(string)
This function sets the short description for what is being written on,
it defaults to "wall" if not defined in the room.
- set_writing_stick(string)
This function sets the short description for what is being written with,
it defaults to "charcoal" if not defined in the room.
Public Functions
These are functions that everyone can access.
-
query_graffiti
string query_graffiti()
This function returns the short description of the graffiti on the wall.
if it hasn't been set to something else, it will have defaulted to "graffiti".
It could, for example be "writing" or "notes".
-
query_wall_short
string query_wall_short()
This function returns the short description for what is being written on.
if it hasn't been set to something else, it will have defaulted to "wall".
-
query_writing_stick
string query_writing_stick()
This function returns the short description for what is being written with.
if it hasn't been set to something else, it will have defaulted to "charcoal".
-
set_graffiti
void set_graffiti(string word)
This function sets the short description for the graffiti on the wall,
it defaults to "graffiti" if not defined in the room. It will appear
in the room description referring to their being some graffiti (or
whatever) on the wall here.
- Parameters:
word - The short for the graffiti
-
set_wall_short
void set_wall_short(string word)
This function sets the short description for what is being written on,
it defaults to "wall" if not defined in the room. It will be used in the
command (scrawl on _wall_short with _writing_stick).
- Parameters:
word - The short for the wall
-
set_writing_stick
void set_writing_stick(string word)
This function sets the short description for what is being written with,
it defaults to "charcoal" if not defined in the room. It will be used in the
command (scrawl on _wall_short with _writing_stick).
- Parameters:
word - The short for the writing stick