5 Commits

3 changed files with 29 additions and 9 deletions

View File

@ -334,7 +334,7 @@ function riesenpilz.parasol(pos, nodes, area, w, h)
for _,j in pairs({ for _,j in pairs({
{bhead2, 0, c.head_brown_bright}, {bhead2, 0, c.head_brown_bright},
{bhead1, -1, c.head_binge} {bhead1, -1, c.head_beige}
}) do }) do
for i in area:iter(pos.x-j[1], pos.y+h+j[2], pos.z-j[1], pos.x+j[1], pos.y+h+j[2], pos.z+j[1]) do for i in area:iter(pos.x-j[1], pos.y+h+j[2], pos.z-j[1], pos.x+j[1], pos.y+h+j[2], pos.z+j[1]) do
nodes[i] = j[3] nodes[i] = j[3]
@ -348,8 +348,8 @@ function riesenpilz.parasol(pos, nodes, area, w, h)
nodes[area:index(pos.x+l*k, pos.y+rh, pos.z+k)] = c.head_white nodes[area:index(pos.x+l*k, pos.y+rh, pos.z+k)] = c.head_white
end end
for l = -w+1, w do for l = -w+1, w do
nodes[area:index(pos.x+w*k, pos.y+h-2, pos.z-l*k)] = c.head_binge nodes[area:index(pos.x+w*k, pos.y+h-2, pos.z-l*k)] = c.head_beige
nodes[area:index(pos.x+l*k, pos.y+h-2, pos.z+w*k)] = c.head_binge nodes[area:index(pos.x+l*k, pos.y+h-2, pos.z+w*k)] = c.head_beige
end end
for l = -bhead1+1, bhead1 do for l = -bhead1+1, bhead1 do
nodes[area:index(pos.x+bhead1*k, pos.y+h-2, pos.z-l*k)] = c.head_white nodes[area:index(pos.x+bhead1*k, pos.y+h-2, pos.z-l*k)] = c.head_white
@ -895,7 +895,7 @@ local head_sounds = default.node_sound_wood_defaults({
dig = {name="riesenpilz_head", gain=0.2}, dig = {name="riesenpilz_head", gain=0.2},
dug = {name="riesenpilz_stem", gain=0.1} dug = {name="riesenpilz_stem", gain=0.1}
}) })
local add_fence = minetest.register_fence local add_fence = default.register_fence
local node_groups = {oddly_breakable_by_hand=3, fall_damage_add_percent=-80, bouncy=10} local node_groups = {oddly_breakable_by_hand=3, fall_damage_add_percent=-80, bouncy=10}
for _,i in pairs({ for _,i in pairs({
@ -980,8 +980,8 @@ for _,i in pairs({
}, },
{ {
typ = "head", typ = "head",
name = "binge", name = "beige",
textures = {"head_binge.png", "head_white.png", "head_binge.png"}, textures = {"head_beige.png", "head_white.png", "head_beige.png"},
sapling = "parasol" sapling = "parasol"
}, },
{ {
@ -1034,7 +1034,14 @@ for _,i in pairs({
if add_fence if add_fence
and i.fence ~= false then and i.fence ~= false then
add_fence({fence_of = nodename}) add_fence(
nodename.."_fence",
{
material = nodename,
texture = textures[#textures],
groups = node_groups,
sounds = sounds,
})
end end
end end
@ -1084,7 +1091,7 @@ c = {
head_blue_bright = minetest.get_content_id("riesenpilz:head_blue_bright"), head_blue_bright = minetest.get_content_id("riesenpilz:head_blue_bright"),
head_white = minetest.get_content_id("riesenpilz:head_white"), head_white = minetest.get_content_id("riesenpilz:head_white"),
head_binge = minetest.get_content_id("riesenpilz:head_binge"), head_beige = minetest.get_content_id("riesenpilz:head_beige"),
head_brown_bright = minetest.get_content_id("riesenpilz:head_brown_bright"), head_brown_bright = minetest.get_content_id("riesenpilz:head_brown_bright"),
stem_red = minetest.get_content_id("riesenpilz:stem_red"), stem_red = minetest.get_content_id("riesenpilz:stem_red"),
@ -1122,6 +1129,11 @@ local function get_grow(name)
local is = {} local is = {}
for i = 1,#minetest.registered_abms do for i = 1,#minetest.registered_abms do
local ad = minetest.registered_abms[i] local ad = minetest.registered_abms[i]
if type(ad.nodenames) ~= "table" then
minetest.log("warning", "ABM nodenames is not a table: " ..
dump(ad))
return
end
if ad.chance > 1 if ad.chance > 1
and table.indexof(ad.nodenames, name) ~= -1 then and table.indexof(ad.nodenames, name) ~= -1 then
is[#is+1] = ad.action is[#is+1] = ad.action
@ -1249,6 +1261,14 @@ if riesenpilz.enable_mapgen then
dofile(modpath.."mapgen.lua") dofile(modpath.."mapgen.lua")
end end
-- Legacy
minetest.register_alias("riesenpilz:head_binge", "riesenpilz:head_beige")
local time = math.floor(tonumber(os.clock()-load_time_start)*100+0.5)/100 local time = math.floor(tonumber(os.clock()-load_time_start)*100+0.5)/100
local msg = "[riesenpilz] loaded after ca. "..time local msg = "[riesenpilz] loaded after ca. "..time
if time > 0.05 then if time > 0.05 then

View File

@ -19,7 +19,7 @@ riesenpilz.inform_all = false--minetest.is_singleplayer()
riesenpilz.max_spam = 2 riesenpilz.max_spam = 2
--3d apple --3d apple
riesenpilz.change_apple = true riesenpilz.change_apple = false
--disallows growing a mushroom if it not every node would have a free place --disallows growing a mushroom if it not every node would have a free place
riesenpilz.giant_restrict_area = false riesenpilz.giant_restrict_area = false

View File

Before

Width:  |  Height:  |  Size: 305 B

After

Width:  |  Height:  |  Size: 305 B