From ffb95402955ca2239cbf20ab9c79e1336fba4a46 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 14 Apr 2020 11:43:32 +0300 Subject: [PATCH] Document the map characters used in lua --- doc/lua.adoc | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/doc/lua.adoc b/doc/lua.adoc index e4d590d7c..99312cd8a 100644 --- a/doc/lua.adoc +++ b/doc/lua.adoc @@ -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>> +|=== -- 2.50.1