Document the map characters used in lua

This commit is contained in:
Pasi Kallinen
2020-04-14 11:43:32 +03:00
parent caac70c5ec
commit ffb9540295

View File

@@ -34,7 +34,7 @@ Returns a table with the following elements:
| glyph | integer |
| typ | integer | terrain type
| typ_name | text | name of terrain type
| mapchr | text | map character
| mapchr | text | <<_map_characters,map character>>
| seenv | integer | seen vector
| horizontal | boolean |
| lit | boolean |
@@ -349,7 +349,7 @@ describing the map, or a table with multiple parameters.
| coord | Coordinates in table format.
| halign | Horizontal alignment on a rough 3x3 grid.
| valign | Vertical alignment on a rough 3x3 grid.
| map | Multi-line string describing the map.
| map | Multi-line string describing the map. See <<_map_characters>>
| contents | A function called with one parameter, a table with "width" and "height", the map width and height. All coordinates in the function will be relative to the map.
|===
@@ -751,3 +751,32 @@ Example:
local sel = sel:set();
local sel = selection.set(sel);
== Map characters
[%header, cols="10%,90%"]
|===
| Character | Dungeon feature
| `" "` | solid stone wall
| `"#"` | corridor
| `"."` | room floor
| `"-"` | horizontal wall
| `"\|"` | vertical wall
| `"+"` | door
| `"A"` | air
| `"B"` | crosswall / boundary symbol hack
| `"C"` | cloud
| `"S"` | secret door
| `"H"` | secret corridor
| `"{"` | fountain
| `"\"` | throne
| `"K"` | sink
| `"}"` | moat
| `"P"` | pool of water
| `"L"` | lava pool
| `"I"` | ice
| `"W"` | water
| `"T"` | tree
| `"F"` | iron bars
| `"x"` | "transparent" - used for <<_map>> parts.
| `"w"` | "any wall" - see <<_match>>
|===