[Package Index | Mudlib Index | Effect Index]

File /obj/handlers/map_helper.c

This is the map helper object. It contains all the current information about the files. It stores the current directory and keeps track of if things have changed so it does not save or load excessively.

Written by Wodan

Includes

This class includes the following files /include/map_handler.h

Method index

Public Functions

These are functions that everyone can access.

change_changetimes
void change_changetimes(string dir,
                        string room,
                        int time)

This method changes the time at which the specified room was last changed.

Parameters:
dir - the directory to change the last modified date for
room - the room to set the modied time for
time - the new time


change_clusters
void change_clusters(string dir,
                     string room,
                     int cluster)

This method will change the cluster for the specified room.

Parameters:
dir - the directory to change the cluster for
room - the room to change the cluster for
cluster - the new cluster number


change_co_ords
void change_co_ords(string dir,
                    string room,
                    int * coord)

This method changes the coordinates for the specified room/.

Parameters:
dir - the directory to change the room in
room - the room to change in the directory
coord - the new coordinate


change_map
void change_map(string dir,
                string room,
                string * dd)

This method will change the destination direction array for the given room.

Parameters:
dir - the directory to change
room - the room to change
dd - the new destination directory


change_movezones
void change_movezones(string dir,
                      string room,
                      string * zones)

This method changes the move zones for the specified room.

Parameters:
dir - the directory to change the move zones in
room - the room to change the move zones in
zones - the new move zones


change_shorts
void change_shorts(string dir,
                   string room,
                   string sh)

This method changes the short for the specified directory and room.

Parameters:
dir - the directory to change the short for
room - the room the change the short for
sh - the new short for the room


change_sizes
void change_sizes(string dir,
                  string room,
                  int size)

This method changes the roomsize for the specified room.

Parameters:
dir - the directory to change the room in
room - the room to change in the directory
coord - the new size;


check_dir
void check_dir(string dir)

This method attempts to load in the save file information for the specified directory. If the directory has no save file then the mappings will all be initialised to empty. It will cause the previous directory to be saved if this is attempting to load a different one.

Parameters:
dir - the directory to load the save information for

See also:
save_dir()


del
void del(string dir,
         string room)

This method deletes the specified room from the directory.

Parameters:
dir - the directory to remove the room from
room - the room to remove


query_changetimes
mapping query_changetimes(string dir)

This method returns the mapping of rooms to last modified dates.

Parameters:
dir - the directory to return the mapping for

Returns:
the mapping of last modified dates


query_clusters
mapping query_clusters(string dir)

This method returns the cluster mapping for the specified directory.

Parameters:
dir - the directory to return the cluster mapping for

Returns:
the cluster mapping for the directory


query_co_ords
mapping query_co_ords(string dir)

This method returns the mapping of coordinates to rooms.

Parameters:
dir - the directory to return the mapping for

Returns:
the mapping of coordinates to rooms


query_map
mapping query_map(string dir)

This method returns the current destination direction mapping for the given directory.

Parameters:
dir - the directory to return the mapping for

Returns:
the destination direction mapping


query_movezones
mapping query_movezones(string dir)

This method returns the mapping of move zones for the specified room.

Parameters:
dir - the directory to return the move zones for

Returns:
the move zone mapping


query_shorts
mapping query_shorts(string dir)

This method returns the mapping containing all the shorts for the specified directory.

Parameters:
dir - the directory to return the shorts for

Returns:
the mapping of short descriptions


query_sizes
mapping query_sizes(string dir)

This method returns the mapping of sizes for rooms.

Parameters:
dir - the directory to return the mapping for

Returns:
the mapping of sizes for rooms.


save_dir
void save_dir()

This method saves the state of the currently loaded directory.

See also:
check_dir()