mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Support custom textures installed as /textures/all/*.png
This commit is contained in:
parent
578fc5bb44
commit
18d8e3acec
3 changed files with 14 additions and 0 deletions
12
src/tile.cpp
12
src/tile.cpp
|
@ -131,6 +131,18 @@ std::string getTexturePath(const std::string &filename)
|
|||
fullpath = getImagePath(testpath);
|
||||
}
|
||||
|
||||
/*
|
||||
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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue