[Package Index | Mudlib Index | Effect Index]

File /std/room/player_housing.c

This is the standard inheritable for a player-owned house room. All you need to do is inherit this file and call a couple of setup functions and off you go. In addition you will need to register the house with the housing command if you wish the house to be available for sale or rent using the normal processes. Make sure you have permission and have read the help on the housing command before you do this.

Written by Belle, Gototh, Ceres

Example

inherit "/std/room/player_housing";

void setup() {
  set_light(100);
  set_theft_handler(HOSPITAL);
  set_save_file("/save/player_housing/am/short/flat1");

  set_short("front room");
  set_base_desc("a small and cosy front room" );
  add_surface( "floor", "finished pine board" );
  add_surface( "ceiling", "plain plaster" );
  add_surface( "north wall", "plain plaster" );
  add_surface( "south wall", "plain plaster" );
  add_surface( "east wall", "plain plaster" );
  add_surface( "west wall", "plain plaster" );
  add_exit("out", PATH+"courtyard", "door");
  add_exit("north", PATH+"flat1bed", "door");
}

In the room outside the house you also need to add the following line to
make sure the doors from the street to the house get setup correctly (ie.
know if the user left the door locked or not and what kind of lock/trap
is in use in the door):
(PATH+"flat1")->setup_doors();

Inherits

This class inherits the following classes /std/room/inherit/player_housing.c and /std/room/basic_room.c

Includes

This class includes the following files /include/housing.h, /include/login_handler.h, /include/dirs.h and /include/player_handler.h

Method index

Public Functions

These are functions that everyone can access.

.