Skip to content

Commit

Permalink
Add mushrooms
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanpatrick.guerrero@gmail.com authored and Ekdohibs committed Jul 17, 2015
1 parent 2ddbf68 commit 0cf4fd4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mods/flowers/README.txt
Expand Up @@ -14,3 +14,6 @@ http://sam.zoy.org/wtfpl/COPYING for more details.
License of media (textures and sounds)
--------------------------------------
WTFPL

Gambit (WTFPL):
flowers_mushroom_*.png
27 changes: 27 additions & 0 deletions mods/flowers/init.lua
Expand Up @@ -57,6 +57,33 @@ for _,item in pairs(flowers.datas) do
add_simple_flower(unpack(item))
end

local mushrooms_datas = {
{"brown", 2}, {"red", -6}
}

for _, m in pairs(mushrooms_datas) do
local name, nut = m[1], m[2]
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,not_in_creative_inventory=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}
}
})
end

minetest.register_abm({
nodenames = {"group:flora"},
neighbors = {"default:dirt_with_grass", "default:desert_sand"},
Expand Down
Binary file added mods/flowers/textures/flowers_mushroom_brown.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mods/flowers/textures/flowers_mushroom_red.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1 comment on commit 0cf4fd4

@HybridDog
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DS-Minetest told me that he would prefer the mushrooms from my riesenpilz mod

Please sign in to comment.