forked from mtcontrib/plantlife_modpack
[youngtrees] Optimize math.random call function
This commit is contained in:
parent
d4e83d7e78
commit
031260a62d
@ -1,6 +1,8 @@
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("youngtrees")
|
||||
|
||||
local random = math.random
|
||||
|
||||
abstract_youngtrees = {}
|
||||
|
||||
minetest.register_node("youngtrees:bamboo", {
|
||||
@ -104,8 +106,7 @@ minetest.register_node("youngtrees:youngtree_bottom", {
|
||||
|
||||
|
||||
abstract_youngtrees.grow_youngtree = function(pos)
|
||||
local height = math.random(1,3)
|
||||
abstract_youngtrees.grow_youngtree_node(pos,height)
|
||||
abstract_youngtrees.grow_youngtree_node(pos, random(1,3))
|
||||
end
|
||||
|
||||
abstract_youngtrees.grow_youngtree_node = function(pos, height)
|
||||
|
Loading…
Reference in New Issue
Block a user