added lights :D
commit
d5cb067538
10
README.txt
10
README.txt
|
@ -8,7 +8,7 @@
|
|||
/ o \ to me, **shadowzone**
|
||||
/ o o\
|
||||
/ o o \ screenshot: http://i.imgur.com/JuO6kgr.jpg
|
||||
/ o o o \
|
||||
/ o o o \ link: https://github.com/crazyginger72/xmas
|
||||
/o o o \
|
||||
--------| |--------
|
||||
| |
|
||||
|
@ -44,3 +44,11 @@ non-profit server clause: The contents of this mod MAY be used
|
|||
on any server or in such settings as provided that the use of
|
||||
said server or other setting does not charge a fee or demand
|
||||
any other forms of financial restitutions or exchanges.
|
||||
|
||||
promotional clause: This content may be distributed on any type of
|
||||
media if said media is used for promoting open-source software even
|
||||
if said promotional media is attatched to a non-fre and or
|
||||
for-profit type of media as long as the origonal content is left
|
||||
intact, content is acredited to author and a link is provided to
|
||||
the origional work.
|
||||
|
||||
|
|
17
init.lua
17
init.lua
|
@ -24,19 +24,18 @@ function grow_tree(data, a, pos)
|
|||
for yindex = 3, 24 do
|
||||
for xindex = -12, 12 do
|
||||
for zindex = -12, 12 do
|
||||
local chance = 7+(yindex/3)
|
||||
if a:contains(x+xindex, y+yindex, z+zindex) and math.abs(xindex) <= (23-yindex)/2 and math.abs(zindex) <= (23-yindex)/2 then
|
||||
local vi = a:index(x+xindex, y+yindex, z+zindex)
|
||||
if data[vi] == (c_air or c_ignore) and math.abs(xindex)+math.abs(zindex) <= (23-yindex)/1.25 then
|
||||
if math.random(100) <=100 then
|
||||
if (math.abs(xindex) == (23-yindex)/2 or math.abs(zindex) == (23-yindex)/2) and math.random(1, 100) <= 16 and yindex < 21 then
|
||||
local c_ball = minetest.get_content_id("xmas:ball_"..math.random(1,4))
|
||||
data[vi] = c_ball
|
||||
if (math.abs(xindex) == (23-yindex)/2 or math.abs(zindex) == (23-yindex)/2) and math.random(1, 100) <= chance and yindex < 21 then
|
||||
local c_ball = minetest.get_content_id("xmas:ball_"..math.random(1,4))
|
||||
data[vi] = c_ball
|
||||
else
|
||||
if math.random(1, 100) <= chance+3 then
|
||||
data[vi] = c_lights
|
||||
else
|
||||
if math.random(1, 100) <= 20 then
|
||||
data[vi] = c_lights
|
||||
else
|
||||
data[vi] = c_leaves
|
||||
end
|
||||
data[vi] = c_leaves
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue