mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
GenericNodeMetadata and an example furnace
This commit is contained in:
parent
e880cc40e9
commit
705f142b8d
7 changed files with 964 additions and 156 deletions
|
@ -1007,8 +1007,13 @@ void Map::addNodeAndUpdate(v3s16 p, MapNode n,
|
|||
std::string metadata_name = nodemgr->get(n).metadata_name;
|
||||
if(metadata_name != ""){
|
||||
NodeMetadata *meta = NodeMetadata::create(metadata_name, m_gamedef);
|
||||
meta->setOwner(player_name);
|
||||
setNodeMetadata(p, meta);
|
||||
if(!meta){
|
||||
errorstream<<"Failed to create node metadata \""
|
||||
<<metadata_name<<"\""<<std::endl;
|
||||
} else {
|
||||
meta->setOwner(player_name);
|
||||
setNodeMetadata(p, meta);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue