mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
added docs and fixed desc loading from item def
This commit is contained in:
parent
59d706323a
commit
0caed92baa
5 changed files with 21 additions and 0 deletions
|
|
@ -29,6 +29,7 @@ template<> void ContentUnitLoader<ItemDef>::loadUnit(
|
|||
parentDef->cloneTo(def);
|
||||
}
|
||||
root.at("caption").get(def.caption);
|
||||
root.at("description").get(def.description);
|
||||
|
||||
std::string iconTypeStr = "";
|
||||
root.at("icon-type").get(iconTypeStr);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ ItemDef::ItemDef(const std::string& name) : name(name) {
|
|||
}
|
||||
void ItemDef::cloneTo(ItemDef& dst) {
|
||||
dst.caption = caption;
|
||||
dst.description = description;
|
||||
dst.stackSize = stackSize;
|
||||
dst.generated = generated;
|
||||
std::copy(&emission[0], &emission[3], dst.emission);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue