aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-25 18:57:17 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:51 +0200
commitff1ae29f97a9923c54655dd05a2dc394ee151b34 (patch)
tree857f369cd51513ad4373441ba6dbd45ad06b9666 /src
parentfdf6eecd59df8608d93faff369d19a9c1868c16a (diff)
downloadminetest-ff1ae29f97a9923c54655dd05a2dc394ee151b34.tar.gz
minetest-ff1ae29f97a9923c54655dd05a2dc394ee151b34.tar.bz2
minetest-ff1ae29f97a9923c54655dd05a2dc394ee151b34.zip
Duplicate last tile image automatically to all for lua node definitions
Diffstat (limited to 'src')
-rw-r--r--src/scriptapi.cpp8
1 files changed, 8 insertions, 0 deletions
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);