Allow matching any wall map terrain in lua scripts

When matching a terrain, allow using a "w" placeholder that matches
any solid wall:

For example:
   local s = selection.match([[w.w]]);
would match all floor locations with a wall to the left and right of it.
The walls can be solid stone, horizontal, vertical, etc.

This applies to selection.match(), selection.filter_mapchar(), and
des.replace_terrain()
This commit is contained in:
Pasi Kallinen
2020-04-13 19:59:03 +03:00
parent 9513b73169
commit d78dcdcb9b
5 changed files with 62 additions and 4 deletions

View File

@@ -74,6 +74,7 @@ enum levl_typ_types {
CLOUD = 35,
MAX_TYPE = 36,
MATCH_WALL = 37,
INVALID_TYPE = 127
};