diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-04-07 10:43:06 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-04-07 10:43:06 +0300 |
commit | 18d8e3acec44a60a0ee1bbf0b515654fa2102ee9 (patch) | |
tree | c6c1a226144eb15fc33f467e4237bad995923b98 /src | |
parent | 578fc5bb4418b0746fea373f382f5921058382c4 (diff) | |
download | minetest-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.cpp | 12 |
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 == "") |