From 220ee604beb1f53b9472c2112bab1296e003e790 Mon Sep 17 00:00:00 2001 From: Bob Omb Date: Sun, 25 Oct 2015 11:40:16 -0700 Subject: [PATCH] starting on trees --- init.lua | 7 ++++++- schems/tree.mts | Bin 0 -> 204 bytes 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 schems/tree.mts diff --git a/init.lua b/init.lua index 0da8aa3..cd3afbf 100644 --- a/init.lua +++ b/init.lua @@ -191,8 +191,9 @@ minetest.register_on_generated(function(minp, maxp, seed) local elev, biome, water, road = realterrain.get_pixel(x, z) -- elevation in meters from DEM and water true/false --print("elev: "..elev..", biome: "..biome..", water: "..water..", road: "..road) - local ground, shrub, sprob, tprob + local ground, shrub, sprob, tprob, tree sprob, tprob = 10, 5 + tree = "tree" if biome < tonumber(realterrain.get_setting("b01cut")) then ground = cids[1].ground shrub = cids[1].shrub @@ -271,6 +272,10 @@ minetest.register_on_generated(function(minp, maxp, seed) if math.random(0,100) <= sprob then data[vi] = shrub end + if math.random(0,100) <= tprob then + --import appropriate tree .mts + minetest.place_schematic({x=x,y=y,z=z}, MODPATH.."/schems/"..tree..".mts") + end elseif y <= tonumber(realterrain.settings.waterlevel) then data[vi] = c_water end diff --git a/schems/tree.mts b/schems/tree.mts new file mode 100644 index 0000000000000000000000000000000000000000..d8df3da541ea5331a97771e6f037d58091daaf66 GIT binary patch literal 204 zcmeYb3HD`RVPI$AW?-*J00w3T=ETe*2ELTkw8YY!604ll#In?41|Ar{q$oADV$Rzs z-dqP1cwFY@EO~H>`}?b}w~uM5K4{mQqgT?Qw%&13$n*>4wX+tiNI0y$D=cBR2ivos zI}NX>l=$23KP|82x54AA