forked from Mirrorlandia_minetest/minetest
Update inventory texture too
This commit is contained in:
parent
01ae0daea5
commit
c1202a2ecc
@ -64,6 +64,7 @@ void ContentFeatures::setInventoryTexture(std::string imgname,
|
|||||||
|
|
||||||
imgname += "^[forcesingle";
|
imgname += "^[forcesingle";
|
||||||
|
|
||||||
|
inventory_texture_name = imgname;
|
||||||
inventory_texture = tsrc->getTextureRaw(imgname);
|
inventory_texture = tsrc->getTextureRaw(imgname);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,6 +85,7 @@ void ContentFeatures::setInventoryTextureCube(std::string top,
|
|||||||
imgname_full += left;
|
imgname_full += left;
|
||||||
imgname_full += "{";
|
imgname_full += "{";
|
||||||
imgname_full += right;
|
imgname_full += right;
|
||||||
|
inventory_texture_name = imgname_full;
|
||||||
inventory_texture = tsrc->getTextureRaw(imgname_full);
|
inventory_texture = tsrc->getTextureRaw(imgname_full);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -181,6 +183,10 @@ public:
|
|||||||
if(f->special_material2)
|
if(f->special_material2)
|
||||||
f->special_material2->setTexture(0, f->special_atlas->atlas);
|
f->special_material2->setTexture(0, f->special_atlas->atlas);
|
||||||
}
|
}
|
||||||
|
if(f->inventory_texture_name != ""){
|
||||||
|
f->inventory_texture =
|
||||||
|
tsrc->getTextureRaw(f->inventory_texture_name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -113,6 +113,7 @@ struct ContentFeatures
|
|||||||
*/
|
*/
|
||||||
TileSpec tiles[6];
|
TileSpec tiles[6];
|
||||||
|
|
||||||
|
std::string inventory_texture_name;
|
||||||
video::ITexture *inventory_texture;
|
video::ITexture *inventory_texture;
|
||||||
|
|
||||||
// Used currently for flowing liquids
|
// Used currently for flowing liquids
|
||||||
|
Loading…
Reference in New Issue
Block a user