1
0
mirror of https://github.com/mt-mods/plantlife_modpack.git synced 2025-07-16 14:50:32 +02:00

use swap_node() where possible, for speed

This commit is contained in:
Vanessa Dannenberg
2018-10-25 10:27:54 -04:00
parent 2c7a776c7f
commit 77093e428a
22 changed files with 156 additions and 156 deletions

View File

@ -13,7 +13,7 @@ abstract_dryplants.grow_grass = function(pos)
local grass_size = math.random(1,5)
if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
or minetest.get_node(right_here).name == "default:junglegrass" then
minetest.set_node(right_here, {name="default:grass_"..grass_size})
minetest.swap_node(right_here, {name="default:grass_"..grass_size})
end
end