mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Store metadata as metadata name in node definition
This commit is contained in:
parent
704d8a62bf
commit
6a8f9135de
6 changed files with 16 additions and 33 deletions
|
@ -994,11 +994,10 @@ void Map::addNodeAndUpdate(v3s16 p, MapNode n,
|
|||
/*
|
||||
Add intial metadata
|
||||
*/
|
||||
|
||||
NodeMetadata *meta_proto = nodemgr->get(n).initial_metadata;
|
||||
if(meta_proto)
|
||||
{
|
||||
NodeMetadata *meta = meta_proto->clone(m_gamedef);
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue