From 01cdf519935b01fc62b5191b67e3c49bc1365af4 Mon Sep 17 00:00:00 2001 From: copperwater Date: Fri, 28 Feb 2025 17:27:51 -0500 Subject: [PATCH] Add a bit of detail in selection.room() documentation It wasn't clear to me how selection.room() handles room edges and unusual terrain in the room, so I looked at the code and wrote down how it behaves for posterity. I don't believe the one room currently capable of getting a random fill while already containing some odd terrain, "Blocked center", actually has unusual terrain in the room fill. This is because filler_region creates an irregular region (i.e. a room containing the ROOM points in a square ring around the blocked center). The points in the middle don't share the same roomno, so they won't be returned in the selection created by selection.room(). But there's no reason a room couldn't be added in the future which does specify some nonstandard terrain and then a themeroom fill. --- doc/lua.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/lua.adoc b/doc/lua.adoc index f75de0b1d..58669e9ec 100644 --- a/doc/lua.adoc +++ b/doc/lua.adoc @@ -1319,6 +1319,8 @@ Example: === room Create a selection of locations inside the (current) room. +Does not include the edges of the room, such as its walls. +Does not do any check on terrain type, so if there are non-ROOM locations inside the room, they remain part of the selection. Example: