]> granicus.if.org Git - nethack/commitdiff
Document the map characters used in lua
authorPasi Kallinen <paxed@alt.org>
Tue, 14 Apr 2020 08:43:32 +0000 (11:43 +0300)
committerPasi Kallinen <paxed@alt.org>
Tue, 14 Apr 2020 08:46:57 +0000 (11:46 +0300)
doc/lua.adoc

index e4d590d7c9d1d9fe7cecc8c91efec8874718b2db..99312cd8a9c440ff6cc72acb3a952cf74341e049 100644 (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>>
+|===