Lua: coordinate tweaking
Make selection rndcoord return a table with x and y keys. Allow (most) coordinate parameters accept such a table. Fix selection and des lua tests broken by the above changes and an earlier change, because selections tried to set terrain at column 0, and it now causes a complaint.
This commit is contained in:
@@ -95,6 +95,5 @@ des.monster("giant eel", 39, 15)
|
||||
-- Monsters on siege duty.
|
||||
local ogrelocs = selection.floodfill(37,7) & selection.area(40,03, 45,20)
|
||||
for i = 0, 11 do
|
||||
local x,y = ogrelocs:rndcoord(1);
|
||||
des.monster({ id = "ogre", coord={x,y}, peaceful=0 })
|
||||
des.monster({ id = "ogre", coord = ogrelocs:rndcoord(1), peaceful = 0 })
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user