Includes adding a LUA binding dgn.grid_see_grid.
N22Z7L4XI5LX7UVPSONQNHHPPZF3GLDHGUFDJU265JQYZ3JZEZTQC endendendlocal function test_gridseegrid_symmetry()-- Clear messages to prevent them accumulating and forcing a --more--crawl.mesclr()-- Send the player to a random spot on the level.you.random_teleport()checks = checks + 1local you_x, you_y = you.pos()for y = -9, 9 dofor x = -9, 9 dolocal px, py = x + you_x, y + you_yif (x ~= 0 or y ~= 0) and dgn.in_bounds(px, py) thenlocal foreward = dgn.grid_see_grid(you_x, you_y, px, py)local backward = dgn.grid_see_grid(px, py, you_x, you_y)this_p = dgn.point(you_x, you_y)other_p = dgn.point(px, py)if not forward thenyou.moveto(px, py)local temp = this_pthis_p = other_pother_p = tempendif forward ~= backward thendgn.grid(other_p.x, other_p.y, "floor_special")dgn.dbg_dump_map(FAILMAP)assert(false,"grid_see_grid asymmetry detected (iter #" .. checks .. "): ".. this_p .. " sees " .. other_p .. ", but not vice versa.".. " Map saved to " .. FAILMAP)endend