From ff1ae29f97a9923c54655dd05a2dc394ee151b34 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Fri, 25 Nov 2011 18:57:17 +0200 Subject: [PATCH] Duplicate last tile image automatically to all for lua node definitions --- src/scriptapi.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp index 6f16c72e7..5ef4f9972 100644 --- a/src/scriptapi.cpp +++ b/src/scriptapi.cpp @@ -529,6 +529,14 @@ static int l_register_node(lua_State *L) break; } } + // Copy last value to all remaining textures + if(i >= 1){ + std::string lastname = f.tname_tiles[i-1]; + while(i < 6){ + f.tname_tiles[i] = lastname; + i++; + } + } } lua_pop(L, 1); -- 2.25.1