[Package Index | Mudlib Index | Effect Index]
File /std/room/inherit/room_save.c
A saving room inheritable. This handles rooms which save their inventory,
or more specifically part of their inventory.
Which objects should be saved or not saved can be controlled by overriding
test_save.
Containers in this room that need to cause it to save its inventory should
generate a save event.
See also:
test_save.c and event_save
.c
Written by ceres
Inherits
This class inherits the following classes /global/auto_load.cIncludes
This class includes the following files /include/player.h, /include/playtesters.h and /include/move_failures.hMethod index
- debug_log(string, mixed args)
- door_action()
- event_save(object)
Objects that need to make this room save such as containers in the room
should generate a save event to make the room save its inventory.
- query_save_file()
This method returns the current save file for the object.
- set_save_file(string)
Set the filename that this object should use to save its inventory to.
- test_save(object)
This method determines if a given object should be saved or not.
Public Functions
These are functions that everyone can access.
.
void debug_log(string fmt,
mixed args ...)
void door_action()
void event_save(object thing)
Objects that need to make this room save such as containers in the room
should generate a save event to make the room save its inventory.
eg. event(environment(this_object()), "save");
string query_save_file()
This method returns the current save file for the object.
- Returns:
the current save file
void set_save_file(string file)
Set the filename that this object should use to save its inventory to.
- Parameters:
file - The file.
int test_save(object ob)
This method determines if a given object should be saved or not. When
inheriting this room you should define your own test_save function and use
it to decide which parts of the inventory are saved and which are not.
- Parameters:
ob - The object to be tested.
- Returns:
1 for yes 0 for no.