From 5194ce66d60829d7658eaf7c4e570bb88077d326 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Fri, 27 Nov 2009 14:52:31 +1000 Subject: New Lua library: feat. Provides wrappers for all of the feat_is_XXX functions from terrain.cc, as well as a few other functions. Also provides a macro which can wrap a function to take: * a set of co-ordinates (parsed with grd(coord_def(x, y))) * a string (parsed with dungeon_feature_by_name) * an integer (cast into dungeon_feature_type, can be fetched from dgn.grid(x, y)) All of the feat library functions can be used in this manner. For example: * feat.is_wall(x, y) * feat.is_wall(dgn.grid(x, y)) * feat.is_wall(7) * feat.is_wall("rock_wall") --- crawl-ref/source/test/findray.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crawl-ref/source/test') diff --git a/crawl-ref/source/test/findray.lua b/crawl-ref/source/test/findray.lua index 9f66461d4e..648b1cb9a7 100644 --- a/crawl-ref/source/test/findray.lua +++ b/crawl-ref/source/test/findray.lua @@ -50,7 +50,7 @@ local function test_findray() rx, ry = ray:pos() ray_p = dgn.point(rx, ry) while(ray_p ~= p) do - if dgn.is_opaque(rx, ry) then + if feat.is_opaque(rx, ry) then dgn.grid(x, y, "floor_special") debug.dump_map(FAILMAP) assert(false, -- cgit v1.2.3-54-g00ecf