diff --git a/src/app/script/tile_class.cpp b/src/app/script/tile_class.cpp index 439b57d0c..2299296f7 100644 --- a/src/app/script/tile_class.cpp +++ b/src/app/script/tile_class.cpp @@ -33,6 +33,13 @@ struct Tile { } }; +int Tile_get_index(lua_State* L) +{ + auto tile = get_obj(L, 1); + lua_pushinteger(L, tile->ti); + return 1; +} + int Tile_get_image(lua_State* L) { auto tile = get_obj(L, 1); @@ -165,6 +172,7 @@ const luaL_Reg Tile_methods[] = { }; const Property Tile_properties[] = { + { "index", Tile_get_index, nullptr }, { "image", Tile_get_image, nullptr }, // TODO Tile_set_image { "data", Tile_get_data, Tile_set_data }, { "color", Tile_get_color, Tile_set_color },