-
add_feature
void add_feature(string feature)
This method adds a feature into the world map.
- Parameters:
feature - the feature to add
-
add_terrain
int add_terrain(string path,
int x1,
int y1,
int x2,
int y2)
This method adds the specified terrain to the world map.
-
find_room_at
string find_room_at(int x,
int y)
This method finds the specific room at the specific location
- Parameters:
x - the x co-ordinate
y - the y co-ordinate
- Returns:
the path to the room
-
find_terrain_at
string find_terrain_at(int x,
int y)
This method finds the terrain at the specific location.
- Parameters:
x - the x co-ordinate
y - the y co-ordinate
- Returns:
the path to the terrain
-
generate_blocking
mixed * generate_blocking(int x,
int y,
string * start,
string * straight,
string * diagonal)
-
query_blocking_template
string * query_blocking_template(int x,
int y,
int type)
Find the template to use for the area blocked by an obstacle.
This will do nifty template fitting stuff for obstacles.
- Parameters:
x - the x co-ordinate of the blockage
y - the y co-ordinate of the blockage
type - the type is 0 for normal, 1 for straight, 2 for diagonal
-
query_features_at
string * query_features_at(int x,
int y)
This method returns the list of all the features available at the
specific location.
- Parameters:
x - the x position
y - the y position
- Returns:
the features at the location
-
query_features_in_region
string * query_features_in_region(int x1_orig,
int y1_orig,
int x2_orig,
int y2_orig)
This method finds all the features inside the specified region. This
is quite expensive in terms of evaluation cost, so do not try and call
this too much. Cache the results if possible.
- Parameters:
x1 - the top x location
y1 - the top y location
x2 - the bottom x location
y2 - the bottom y location
- Returns:
the features in the region
-
query_map_template
mixed * query_map_template(int size)
This method returns the template for the specific size of the
map. This is for visibility considerations.
- Parameters:
size - the size of the template
- Returns:
the template
-
remove_feature
void remove_feature(string feature)
This method removes a feature from the world map.
- Parameters:
feature - the feature to remove