Split themeroom shape from themeroom contents
Previously, the tetris-shaped rooms were always either normal rooms, or turned into shops or other special rooms in NetHack core. Now, the themed room lua code first picks the themed room (which can be a themed or shaped), and some of those will then pick a random filling (eg. ice floor, traps, corpses, 3 altars). Adds a new lua binding to create a selection picking locations in current room. The content-function in special level regions now get passed the room data as a parameter.
This commit is contained in:
14
doc/lua.adoc
14
doc/lua.adoc
@@ -1070,6 +1070,20 @@ Example:
|
||||
local coord = selection.rndcoord(sel);
|
||||
local coord = selection.rndcoord(sel, 1);
|
||||
|
||||
|
||||
=== room
|
||||
|
||||
Create a selection of locations inside the (current) room.
|
||||
|
||||
Example:
|
||||
|
||||
des.room({ type = "ordinary", contents = function(rm)
|
||||
local sel = selection.room();
|
||||
des.terrain(sel, "I");
|
||||
end
|
||||
});
|
||||
|
||||
|
||||
=== set
|
||||
|
||||
Set the value for location (x,y) in the selection.
|
||||
|
||||
Reference in New Issue
Block a user