Switched farmed shrooms for default mt shrooms

This commit is contained in:
TenPlus1 2015-09-30 16:24:13 +01:00
parent bf889c4bfc
commit 7b3deef14a
8 changed files with 185 additions and 185 deletions

View File

@ -12,7 +12,8 @@ Ethereal v7 Mapgen mod for Minetest
- Added new Glacier biome filled with snow and ice - Added new Glacier biome filled with snow and ice
- Changed Mesa biome to have more coloured clay patterns - Changed Mesa biome to have more coloured clay patterns
- Changed Bamboo biome to have tall tree-like stalks with leaves that give - Changed Bamboo biome to have tall tree-like stalks with leaves that give
bamboo sprouts to grow new stalks Bamboo sprouts are now saplings to grow new stalks
removed farmed mushrooms and replaced with new default game mushrooms with spores
### 1.16 ### 1.16

View File

@ -429,7 +429,7 @@ minetest.register_biome({
node_filler = "default:dirt", node_filler = "default:dirt",
depth_filler = 5, depth_filler = 5,
y_min = 3, y_min = 3,
y_max = 61, y_max = 25, -- was 61
heat_point = 55, heat_point = 55,
humidity_point = 25, humidity_point = 25,
}) })
@ -668,17 +668,6 @@ minetest.register_decoration({
height_max = 6, height_max = 6,
}) })
--[[ bamboo stalks
minetest.register_decoration({
deco_type = "simple",
place_on = "ethereal:bamboo_dirt",
sidelen = 80,
fill_ratio = 0.05,
biomes = {"bamboo"},
decoration = "ethereal:bamboo",
height_max = 5,
})--]]
-- bamboo tree -- bamboo tree
minetest.register_decoration({ minetest.register_decoration({
deco_type = "schematic", deco_type = "schematic",
@ -708,7 +697,6 @@ minetest.register_decoration({
sidelen = 80, sidelen = 80,
fill_ratio = 0.35, fill_ratio = 0.35,
biomes = {"bamboo"}, biomes = {"bamboo"},
--decoration = {"ethereal:bamboo_sprout", "default:grass_2", "default:grass_3"},
decoration = {"default:grass_2", "default:grass_3"}, decoration = {"default:grass_2", "default:grass_3"},
}) })
@ -804,14 +792,33 @@ minetest.register_decoration({
height_max = 4, height_max = 4,
}) })
-- wild mushroom -- wild mushrooms
minetest.register_decoration({ minetest.register_decoration({
deco_type = "simple", deco_type = "simple",
place_on = "ethereal:mushroom_dirt", place_on = "ethereal:mushroom_dirt",
sidelen = 80, sidelen = 80,
fill_ratio = 0.015, fill_ratio = 0.01,
biomes = {"mushroom"}, biomes = {"mushroom"},
decoration = "ethereal:mushroom_plant", decoration = "flowers:mushroom_fertile_red",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"ethereal:green_dirt", "ethereal:jungle_dirt",
"ethereal:prairie_dirt", "ethereal:mushroom_dirt"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.009,
spread = {x = 200, y = 200, z = 200},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"junglee", "grassy", "grassytwo", "prairie", "mushroom"},
y_min = 1,
y_max = 120,
decoration = {"flowers:mushroom_fertile_brown", "flowers:mushroom_fertile_red"},
}) })
-- jungle grass -- jungle grass
@ -968,4 +975,26 @@ minetest.register_decoration({
decoration = "farming:beanbush", decoration = "farming:beanbush",
}) })
end end
-- is waterlily in game?
if minetest.registered_nodes["flowers:waterlily"] then
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:sand", "default:dirt"},
sidelen = 16,
noise_params = {
offset = -0.12,
scale = 0.3,
spread = {x = 200, y = 200, z = 200},
seed = 33,
octaves = 3,
persist = 0.7
},
--biomes = {"junglee", "jumble", "grassy"},
y_min = 0,
y_max = 0,
schematic = minetest.get_modpath("flowers").."/schematics/waterlily.mts",
rotation = "random",
})
end

View File

@ -1,147 +1,147 @@
-- Mushroom Spores
minetest.register_craftitem("ethereal:mushroom_craftingitem", { -- does flowers:mushroom_red exists?
description = "Mushroom Spores", -- if not then create temporary shroom stuff
groups = {not_in_creative_inventory = 1},
inventory_image = "mushroom_spores.png", if minetest.registered_nodes["flowers:mushroom_red"] then
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "ethereal:mushroom_garden_1") print ("[Ethereal] Using current mushrooms in flowers mod")
end,
else
print ("[Ethereal] Defining temporary mushrooms")
-- The following code was taken from minetest 0.4.13's flowers mod
-- incase players are using older version of minetest
local mushrooms_datas = {
{"brown", 2},
{"red", -6}
}
for _, m in pairs(mushrooms_datas) do
local name, nut = m[1], m[2]
-- Register fertile mushrooms (these spawn on map and drop spores)
minetest.register_node(":flowers:mushroom_fertile_" .. name, {
description = string.sub(string.upper(name), 0, 1) ..
string.sub(name, 2) .. " Fertile Mushroom",
tiles = {"flowers_mushroom_" .. name .. ".png"},
inventory_image = "flowers_mushroom_" .. name .. ".png",
wield_image = "flowers_mushroom_" .. name .. ".png",
drawtype = "plantlike",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, flammable = 3, attached_node = 1,
not_in_creative_inventory = 1},
drop = {
items = {
{items = {"flowers:mushroom_" .. name}},
{items = {"flowers:mushroom_spores_" .. name}, rarity = 4},
{items = {"flowers:mushroom_spores_" .. name}, rarity = 2},
{items = {"flowers:mushroom_spores_" .. name}, rarity = 2}
}
},
sounds = default.node_sound_leaves_defaults(),
on_use = minetest.item_eat(nut),
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
}
})
-- Register infertile mushrooms (these do not drop spores)
minetest.register_node(":flowers:mushroom_" .. name, {
description = string.sub(string.upper(name), 0, 1) ..
string.sub(name, 2) .. " Mushroom",
tiles = {"flowers_mushroom_" .. name .. ".png"},
inventory_image = "flowers_mushroom_" .. name .. ".png",
wield_image = "flowers_mushroom_" .. name .. ".png",
drawtype = "plantlike",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, flammable = 3, attached_node = 1},
sounds = default.node_sound_leaves_defaults(),
on_use = minetest.item_eat(nut),
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
}
})
-- Register mushroom spores
minetest.register_node(":flowers:mushroom_spores_" .. name, {
description = string.sub(string.upper(name), 0, 1) ..
string.sub(name, 2) .. " Mushroom Spores",
drawtype = "signlike",
tiles = {"flowers_mushroom_spores_" .. name .. ".png"},
inventory_image = "flowers_mushroom_spores_" .. name .. ".png",
wield_image = "flowers_mushroom_spores_" .. name .. ".png",
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
selection_box = {
type = "wallmounted",
},
groups = {dig_immediate = 3, attached_node = 1},
})
end
end -- END if red mushroom exists already
-- Register growing ABM
minetest.register_abm({
nodenames = {"flowers:mushroom_spores_brown", "flowers:mushroom_spores_red"},
interval = 11,
chance = 50,
action = function(pos, node)
local node_under = minetest.get_node_or_nil({x = pos.x,
y = pos.y - 1, z = pos.z})
if not node_under then
return
end
if minetest.get_item_group(node_under.name, "soil") ~= 0 and
minetest.get_node_light(pos, nil) <= 13 then
if node.name == "flowers:mushroom_spores_brown" then
minetest.set_node(pos, {name = "flowers:mushroom_fertile_brown"})
elseif node.name == "flowers:mushroom_spores_red" then
minetest.set_node(pos, {name = "flowers:mushroom_fertile_red"})
end
end
end
}) })
-- Mushroom Plant (Must be farmed to become edible) -- set compatibility with old ethereal shrooms
minetest.register_node("ethereal:mushroom_plant", { minetest.register_alias("ethereal:mushroom_craftingitem", "flowers:mushroom_spores_brown")
description = "Mushroom (edible)", minetest.register_alias("ethereal:mushroom_plant", "flowers:mushroom_brown")
drawtype = "plantlike", minetest.register_alias("ethereal:mushroom_soup_cooked", "ethereal:mushroom_soup")
tiles = {"mushroom.png"}, minetest.register_alias("ethereal:mushroom_1", "flowers:mushroom_spores_brown")
inventory_image = "mushroom.png", minetest.register_alias("ethereal:mushroom_2", "flowers:mushroom_spores_brown")
selection_box = { minetest.register_alias("ethereal:mushroom_3", "flowers:mushroom_fertile_brown")
type = "fixed", minetest.register_alias("ethereal:mushroom_4", "flowers:mushroom_fertile_brown")
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
},
drop = "ethereal:mushroom_craftingitem",
wield_image = "mushroom.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
groups = {snappy = 2, dig_immediate = 3, flammable = 2},
sounds = default.node_sound_defaults(),
on_use = minetest.item_eat(1),
})
-- Mushroom Soup (Heals 1 heart) -- mushroom soup (Heals 1 heart)
minetest.register_craftitem("ethereal:mushroom_soup", { minetest.register_craftitem("ethereal:mushroom_soup", {
description = "Mushroom Soup", description = "Mushroom Soup",
inventory_image = "mushroom_soup.png", inventory_image = "mushroom_soup.png",
on_use = minetest.item_eat(2, "ethereal:bowl"), on_use = minetest.item_eat(5, "ethereal:bowl"),
}) })
minetest.register_craft({ minetest.register_craft({
output = "ethereal:mushroom_soup", output = "ethereal:mushroom_soup",
recipe = { recipe = {
{"ethereal:mushroom_plant", ""}, {"flowers:mushroom_brown"},
{"ethereal:mushroom_plant", ""}, {"flowers:mushroom_brown"},
{"ethereal:bowl", ""}, {"ethereal:bowl"},
} }
}) })
-- Cooked Mushroom Soup (Heals 1 and half heart)
minetest.register_craftitem("ethereal:mushroom_soup_cooked", {
description = "Mushroom Soup Cooked",
inventory_image = "mushroom_soup_cooked.png",
on_use = minetest.item_eat(3, "ethereal:bowl"),
})
minetest.register_craft({
type = "cooking",
cooktime = 10,
output = "ethereal:mushroom_soup_cooked",
recipe = "ethereal:mushroom_soup"
})
-- Define Mushroom growth stages
local ndef = {
drawtype = "plantlike",
tiles = {"ethereal_mushroom_garden_1.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
drop = {
items = {
{items = {"ethereal:mushroom_craftingitem"},rarity = 1},
{items = {"ethereal:mushroom_plant"},rarity = 14},
}
},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
},
groups = {
snappy = 3, flammable = 2, plant = 1, mushroom = 1,
attached_node = 1, growing = 1, not_in_creative_inventory = 1
},
sounds = default.node_sound_leaves_defaults(),
}
minetest.register_node("ethereal:mushroom_1", table.copy(ndef))
ndef.tiles[1] = "ethereal_mushroom_garden_2.png"
ndef.drop.items[2].rarity = 7
ndef.groups.mushroom = 2
minetest.register_node("ethereal:mushroom_2", table.copy(ndef))
ndef.tiles[1] = "ethereal_mushroom_garden_3.png"
ndef.drop.items[2] = {items = {"ethereal:mushroom_plant 3"}, rarity = 3}
ndef.groups.mushroom = 3
minetest.register_node("ethereal:mushroom_3", table.copy(ndef))
ndef.tiles[1] = "ethereal_mushroom_garden_4.png"
ndef.drop.items[2].rarity = 1
ndef.drop.items[3] = {items = {"ethereal:mushroom_plant 3"}, rarity = 7}
ndef.groups.mushroom = 4
ndef.groups.growing = nil
minetest.register_node("ethereal:mushroom_4", table.copy(ndef))
-- Abm for growing Mushroom
if farming.mod ~= "redo" then
minetest.register_abm({
nodenames = {"group:mushroom"},
neighbors = {"farming:soil_wet"},
interval = 30,
chance = 2,
action = function(pos, node)
-- return if already full grown
if minetest.get_item_group(node.name, "growing") < 1 then
return
end
-- check if on wet soil
pos.y = pos.y - 1
if minetest.get_item_group(minetest.get_node(pos).name, "soil") < 3 then
return
end
pos.y = pos.y + 1
-- check light
local light = minetest.get_node_light(pos)
if not light
or light < 5 then
return
end
-- grow
node.name = "ethereal:mushroom_garden_"..minetest.get_item_group(node.name, "mushroom") + 1
minetest.set_node(pos, node)
end
})
end
-- legacy
for i = 1, 4 do
minetest.register_alias("ethereal:mushroom_garden_"..i, "ethereal:mushroom_"..i)
end
-- Temporary compatibility lines for Xanadu server
minetest.register_alias("ethereal:mushroom_7", "ethereal:mushroom_3")
minetest.register_alias("ethereal:mushroom_8", "ethereal:mushroom_4")

View File

@ -316,6 +316,7 @@ minetest.register_node("ethereal:bamboo_sprout", {
type = "fixed", type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}, fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
}, },
on_use = minetest.item_eat(-2),
}) })
-- Wooden Bowl (for Mushroom Soup) -- Wooden Bowl (for Mushroom Soup)
@ -333,29 +334,14 @@ minetest.register_craft({
} }
}) })
-- Hearty Stew (Heals 4 hearts - thanks to ZonerDarkRevention for his DokuCraft DeviantArt bowl texture) -- Hearty Stew (Heals 5 hearts - thanks to ZonerDarkRevention for his DokuCraft DeviantArt bowl texture)
minetest.register_craftitem("ethereal:hearty_stew", { minetest.register_craftitem("ethereal:hearty_stew", {
description = "Hearty Stew", description = "Hearty Stew",
inventory_image = "hearty_stew.png", inventory_image = "hearty_stew.png",
on_use = minetest.item_eat(8, "ethereal:bowl"),
})
-- Cooked Hearty Stew (Heals 5 hearts)
minetest.register_craftitem("ethereal:hearty_stew_cooked", {
description = "Hearty Stew Cooked",
inventory_image = "hearty_stew_cooked.png",
on_use = minetest.item_eat(10, "ethereal:bowl"), on_use = minetest.item_eat(10, "ethereal:bowl"),
}) })
-- Hearty Stew minetest.register_alias("ethereal:hearty_stew_cooked", "ethereal:hearty_stew")
minetest.register_craft({
output = "ethereal:hearty_stew",
recipe = {
{"ethereal:wild_onion_plant","ethereal:mushroom_plant", "ethereal:bamboo_sprout"},
{"","ethereal:mushroom_plant", ""},
{"","ethereal:bowl", ""},
}
})
minetest.register_craft({ minetest.register_craft({
output = "ethereal:hearty_stew", output = "ethereal:hearty_stew",
@ -366,22 +352,6 @@ minetest.register_craft({
} }
}) })
-- Cooked Hearty Stew
minetest.register_craft({
type = "cooking",
cooktime = 10,
output = "ethereal:hearty_stew_cooked",
recipe = "ethereal:hearty_stew"
})
-- Mushroom Tops give 4x Mushrooms for Planting
minetest.register_craft({
output = "ethereal:mushroom_craftingitem 4",
recipe = {
{"ethereal:mushroom"},
}
})
-- Bamboo Flooring -- Bamboo Flooring
minetest.register_node("ethereal:bamboo_floor", { minetest.register_node("ethereal:bamboo_floor", {
description = ("Bamboo Floor"), description = ("Bamboo Floor"),

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 B