mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Strip unneeded variables from NodeMetadata
This commit is contained in:
parent
704782c95b
commit
c4315a7afa
5 changed files with 36 additions and 133 deletions
|
@ -31,11 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
NodeMetadata::NodeMetadata(IGameDef *gamedef):
|
||||
m_stringvars(),
|
||||
m_inventory(new Inventory(gamedef->idef())),
|
||||
m_inventorydrawspec(""),
|
||||
m_formspec(""),
|
||||
m_infotext(""),
|
||||
m_allow_removal(true)
|
||||
m_inventory(new Inventory(gamedef->idef()))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -55,10 +51,6 @@ void NodeMetadata::serialize(std::ostream &os) const
|
|||
}
|
||||
|
||||
m_inventory->serialize(os);
|
||||
os<<serializeString(m_inventorydrawspec);
|
||||
os<<serializeString(m_formspec);
|
||||
os<<serializeString(m_infotext);
|
||||
writeU8(os, m_allow_removal);
|
||||
}
|
||||
|
||||
void NodeMetadata::deSerialize(std::istream &is)
|
||||
|
@ -72,20 +64,12 @@ void NodeMetadata::deSerialize(std::istream &is)
|
|||
}
|
||||
|
||||
m_inventory->deSerialize(is);
|
||||
m_inventorydrawspec = deSerializeString(is);
|
||||
m_formspec = deSerializeString(is);
|
||||
m_infotext = deSerializeString(is);
|
||||
m_allow_removal = readU8(is);
|
||||
}
|
||||
|
||||
void NodeMetadata::clear()
|
||||
{
|
||||
m_stringvars.clear();
|
||||
m_inventory->clear();
|
||||
m_inventorydrawspec = "";
|
||||
m_formspec = "";
|
||||
m_infotext = "";
|
||||
m_allow_removal = true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue