aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-04-07 10:43:06 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-04-07 10:43:06 +0300
commit18d8e3acec44a60a0ee1bbf0b515654fa2102ee9 (patch)
treec6c1a226144eb15fc33f467e4237bad995923b98 /src
parent578fc5bb4418b0746fea373f382f5921058382c4 (diff)
downloadminetest-18d8e3acec44a60a0ee1bbf0b515654fa2102ee9.tar.gz
minetest-18d8e3acec44a60a0ee1bbf0b515654fa2102ee9.tar.bz2
minetest-18d8e3acec44a60a0ee1bbf0b515654fa2102ee9.zip
Support custom textures installed as /textures/all/*.png
Diffstat (limited to 'src')
-rw-r--r--src/tile.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tile.cpp b/src/tile.cpp
index 25f8a000b..73c286fb3 100644
--- a/src/tile.cpp
+++ b/src/tile.cpp
@@ -132,6 +132,18 @@ std::string getTexturePath(const std::string &filename)
}
/*
+ Check from $user/textures/all
+ */
+ if(fullpath == "")
+ {
+ std::string texture_path = porting::path_user + DIR_DELIM
+ + "textures" + DIR_DELIM + "all";
+ std::string testpath = texture_path + DIR_DELIM + filename;
+ // Check all filename extensions. Returns "" if not found.
+ fullpath = getImagePath(testpath);
+ }
+
+ /*
Check from default data directory
*/
if(fullpath == "")