Bigmap (Programming)

From HellWiki
Jump to: navigation, search

Big maps ($bigmap) can be used instead of the old contiguous map system. They work as a central settings database that rooms use when rendering maps.

When a room renders its map ($room:_render_map) it will look to see if the room's area has a valid .bigmap property, if it does, it uses the bigmap for data instead of the area.

The following verbs are available:

@setup-areas <bigmap object>
Will set .bigmap on all areas in .areas to this object, if it already isn't set to this object.
@reset-maps <bigmap object>
Will go through every area in .areas and cause them to reset their maps.

The following properties are available:

.areas
A list of areas in the big map.
.blank_normal_icon
The blank icon for the normal map (non-client).
.blank_client_icon
The blank icon for client mode.
.sky_z
A room.z lesser or equal to this value (negative values represent up in coordinate system) will result in sky_normal_icon / sky_client_icon instead of the blanks and that Z entry in icon block data always being used for coordinates below or equal to sky_z value.
.sky_normal_icon, .sky_client_icon
Icons for rooms that meet sky_z criteria.
.underground_z
A room.z greater or equal to this value (positive values represent down in coordinate system) will result in using underground_normal_icon / sky_client_icon instead of the blanks and that Z entry in icon block data always being used for coordinates greater or equal to underground_z value.
.underground_normal_icon', .underground_client_icon
Icons for rooms that meet underground_z criteria.
.icon_block_z
A list of Z values, this corresponds with icon_block_data, so you can find the appropriate icon block data for your z (bigmap.icon_block_data[room.z in bigmap.icon_block_z]). This helps efficiency when a large number of icon blocks are present.
.icon_block_data
Icon block data, a list of lists, the top level is per-z. For each Z the format is the same as normal $area icon blocks, {z, x1, y1, x2, y2, icon}. For big maps, the Z in the actual icon block data is ignored.