mirror of
https://github.com/minetest/minetest.git
synced 2024-12-22 22:22:23 +01:00
Fix L-System trees fruit node regression (#15513)
This commit is contained in:
parent
05d31222f7
commit
88c845166c
@ -23,8 +23,7 @@ void TreeDef::resolveNodeNames()
|
||||
getIdFromNrBacklog(&leavesnode.param0, "", CONTENT_IGNORE);
|
||||
if (leaves2_chance)
|
||||
getIdFromNrBacklog(&leaves2node.param0, "", CONTENT_IGNORE);
|
||||
if (fruit_chance)
|
||||
getIdFromNrBacklog(&fruitnode.param0, "", CONTENT_IGNORE);
|
||||
getIdFromNrBacklog(&fruitnode.param0, "", CONTENT_IGNORE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2032,12 +2032,11 @@ bool read_tree_def(lua_State *L, int idx, const NodeDefManager *ndef,
|
||||
getstringfield(L, idx, "trunk_type", tree_def.trunk_type);
|
||||
getboolfield(L, idx, "thin_branches", tree_def.thin_branches);
|
||||
tree_def.fruit_chance = 0;
|
||||
fruit = "air";
|
||||
getstringfield(L, idx, "fruit", fruit);
|
||||
if (!fruit.empty()) {
|
||||
if (!fruit.empty())
|
||||
getintfield(L, idx, "fruit_chance", tree_def.fruit_chance);
|
||||
if (tree_def.fruit_chance)
|
||||
tree_def.m_nodenames.push_back(fruit);
|
||||
}
|
||||
tree_def.m_nodenames.push_back(fruit);
|
||||
tree_def.explicit_seed = getintfield(L, idx, "seed", tree_def.seed);
|
||||
|
||||
// Resolves the node IDs for trunk, leaves, leaves2 and fruit at runtime,
|
||||
|
Loading…
Reference in New Issue
Block a user