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({
{bhead2, 0, c.head_brown_bright},
{bhead1, -1, c.head_binge}
{bhead1, -1, c.head_beige}
}) 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]
@ -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
end
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+l*k, pos.y+h-2, pos.z+w*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_beige
end
for l = -bhead1+1, bhead1 do
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},
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}
for _,i in pairs({
@ -980,8 +980,8 @@ for _,i in pairs({
},
{
typ = "head",
name = "binge",
textures = {"head_binge.png", "head_white.png", "head_binge.png"},
name = "beige",
textures = {"head_beige.png", "head_white.png", "head_beige.png"},
sapling = "parasol"
},
{
@ -1034,7 +1034,14 @@ for _,i in pairs({
if add_fence
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
@ -1084,7 +1091,7 @@ c = {
head_blue_bright = minetest.get_content_id("riesenpilz:head_blue_bright"),
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"),
stem_red = minetest.get_content_id("riesenpilz:stem_red"),
@ -1122,6 +1129,11 @@ local function get_grow(name)
local is = {}
for i = 1,#minetest.registered_abms do
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
and table.indexof(ad.nodenames, name) ~= -1 then
is[#is+1] = ad.action
@ -1249,6 +1261,14 @@ if riesenpilz.enable_mapgen then
dofile(modpath.."mapgen.lua")
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 msg = "[riesenpilz] loaded after ca. "..time
if time > 0.05 then

View File

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

View File

Before

Width:  |  Height:  |  Size: 305 B

After

Width:  |  Height:  |  Size: 305 B