From af2fedcf9998bb4a854c2cfd63e4cdad91a6dd5d Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Fri, 11 May 2018 10:08:51 -0400 Subject: add readme.md ...and some change to plantlife that I can't remember what for ;) --- dryplants/moregrass.lua | 66 ++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'dryplants/moregrass.lua') diff --git a/dryplants/moregrass.lua b/dryplants/moregrass.lua index 88761c8..2593d73 100644 --- a/dryplants/moregrass.lua +++ b/dryplants/moregrass.lua @@ -1,33 +1,33 @@ ------------------------------------------------------------------------------------------------ --- Grasses - More Tall Grass 0.0.2 ------------------------------------------------------------------------------------------------ --- by Mossmanikin - --- License (everything): WTFPL --- Contains code from: biome_lib --- Looked at code from: default ------------------------------------------------------------------------------------------------ - -abstract_dryplants.grow_grass = function(pos) - local right_here = {x=pos.x, y=pos.y+1, z=pos.z} - 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}) - end -end - -biome_lib:register_generate_plant({ - surface = { - "default:dirt_with_grass", - "stoneage:grass_with_silex", - "sumpf:peat", - "sumpf:sumpf" - }, - max_count = TALL_GRASS_PER_MAPBLOCK, - rarity = 101 - TALL_GRASS_RARITY, - min_elevation = 1, -- above sea level - plantlife_limit = -0.9, - }, - abstract_dryplants.grow_grass -) +----------------------------------------------------------------------------------------------- +-- Grasses - More Tall Grass 0.0.2 +----------------------------------------------------------------------------------------------- +-- by Mossmanikin + +-- License (everything): WTFPL +-- Contains code from: biome_lib +-- Looked at code from: default +----------------------------------------------------------------------------------------------- + +abstract_dryplants.grow_grass = function(pos) + local right_here = {x=pos.x, y=pos.y+1, z=pos.z} + 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}) + end +end + +biome_lib:register_generate_plant({ + surface = { + "default:dirt_with_grass", + "stoneage:grass_with_silex", + "sumpf:peat", + "sumpf:sumpf" + }, + max_count = TALL_GRASS_PER_MAPBLOCK, + rarity = 101 - TALL_GRASS_RARITY, + min_elevation = 1, -- above sea level + plantlife_limit = -0.9, + }, + abstract_dryplants.grow_grass +) -- cgit v1.2.3