mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Add support for using arbitrary meshes as items
This commit is contained in:
@@ -66,6 +66,8 @@ struct ItemDefinition
|
||||
std::string inventory_image; // Optional for nodes, mandatory for tools/craftitems
|
||||
std::string wield_image; // If empty, inventory_image or mesh (only nodes) is used
|
||||
v3f wield_scale;
|
||||
std::string meshname; // name of internal mesh (or meshfile to use TBD)
|
||||
std::string meshtexture; // meshtexture
|
||||
|
||||
/*
|
||||
Item stack and interaction properties
|
||||
@@ -211,6 +213,13 @@ private:
|
||||
const ItemDefinition& def, INodeDefManager* nodedef,
|
||||
ClientCached* cc, IGameDef* gamedef, ITextureSource* tsrc) const;
|
||||
|
||||
void createMeshItemTexture(const std::string& name,
|
||||
const ItemDefinition& def, INodeDefManager* nodedef,
|
||||
ClientCached* cc, IGameDef* gamedef, ITextureSource* tsrc) const;
|
||||
|
||||
void renderMeshToTexture(const ItemDefinition& def, scene::IMesh* mesh,
|
||||
ClientCached* cc, ITextureSource* tsrc) const;
|
||||
|
||||
ClientCached* createClientCachedDirect(const std::string &name,
|
||||
IGameDef *gamedef) const;
|
||||
|
||||
|
Reference in New Issue
Block a user