Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
sys4-fr | ba3e5711d0 |
|
@ -1,7 +1,7 @@
|
||||||
## moreflowers
|
# moreflowers
|
||||||
>by sys4
|
by sys4
|
||||||
|
|
||||||
A Minetest mod that add more flowers.
|
A Minetest mod that add more flowers
|
||||||
|
|
||||||
This simple mod extend the flowers mod from MT_Game by adding more flowers.
|
This simple mod extend the flowers mod from MT_Game by adding more flowers.
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
flowers
|
||||||
|
farming?
|
||||||
|
vessels?
|
||||||
|
bonemeal?
|
179
init.lua
179
init.lua
|
@ -9,26 +9,25 @@ local function add_simple_flower(name, desc, box, f_groups)
|
||||||
f_groups.flora = 1
|
f_groups.flora = 1
|
||||||
f_groups.attached_node = 1
|
f_groups.attached_node = 1
|
||||||
|
|
||||||
minetest.register_node(
|
minetest.register_node("moreflowers:" .. name, {
|
||||||
"moreflowers:" .. name, {
|
description = desc,
|
||||||
description = desc,
|
drawtype = "plantlike",
|
||||||
drawtype = "plantlike",
|
waving = 1,
|
||||||
waving = 1,
|
tiles = {"moreflowers_"..name..".png"},
|
||||||
tiles = {"moreflowers_"..name..".png"},
|
inventory_image = "moreflowers_"..name..".png",
|
||||||
inventory_image = "moreflowers_"..name..".png",
|
wield_image = "moreflowers_"..name..".png",
|
||||||
wield_image = "moreflowers_"..name..".png",
|
sunlight_propagates = true,
|
||||||
sunlight_propagates = true,
|
paramtype = "light",
|
||||||
paramtype = "light",
|
walkable = false,
|
||||||
walkable = false,
|
buildable_to = true,
|
||||||
buildable_to = true,
|
stack_max = 99,
|
||||||
stack_max = 99,
|
groups = f_groups,
|
||||||
groups = f_groups,
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
selection_box = {
|
||||||
selection_box = {
|
type = "fixed",
|
||||||
type = "fixed",
|
fixed = box
|
||||||
fixed = box
|
}
|
||||||
}
|
})
|
||||||
})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function add_tall_flower(name, desc, box, f_groups)
|
local function add_tall_flower(name, desc, box, f_groups)
|
||||||
|
@ -37,28 +36,27 @@ local function add_tall_flower(name, desc, box, f_groups)
|
||||||
f_groups.flora = 1
|
f_groups.flora = 1
|
||||||
f_groups.attached_node = 1
|
f_groups.attached_node = 1
|
||||||
|
|
||||||
minetest.register_node(
|
minetest.register_node("moreflowers:" .. name, {
|
||||||
"moreflowers:" .. name, {
|
description = desc,
|
||||||
description = desc,
|
drawtype = "plantlike",
|
||||||
drawtype = "plantlike",
|
waving = 1,
|
||||||
waving = 1,
|
tiles = {"moreflowers_"..name..".png"},
|
||||||
tiles = {"moreflowers_"..name..".png"},
|
inventory_image = "moreflowers_"..name..".png",
|
||||||
inventory_image = "moreflowers_"..name..".png",
|
wield_image = "moreflowers_"..name..".png",
|
||||||
wield_image = "moreflowers_"..name..".png",
|
sunlight_propagates = true,
|
||||||
sunlight_propagates = true,
|
paramtype = "light",
|
||||||
paramtype = "light",
|
walkable = false,
|
||||||
walkable = false,
|
buildable_to = true,
|
||||||
buildable_to = true,
|
stack_max = 99,
|
||||||
stack_max = 99,
|
visual_scale = 1.3,
|
||||||
visual_scale = 1.3,
|
wield_scale = {x=1, y=1.5, z=1},
|
||||||
wield_scale = {x=1, y=1.5, z=1},
|
groups = f_groups,
|
||||||
groups = f_groups,
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
selection_box = {
|
||||||
selection_box = {
|
type = "fixed",
|
||||||
type = "fixed",
|
fixed = box
|
||||||
fixed = box
|
}
|
||||||
}
|
})
|
||||||
})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
moreflowers.datas_simple = {
|
moreflowers.datas_simple = {
|
||||||
|
@ -66,7 +64,13 @@ moreflowers.datas_simple = {
|
||||||
"wild_carrot",
|
"wild_carrot",
|
||||||
"Wild Carrot",
|
"Wild Carrot",
|
||||||
{-2 / 16, -0.5, -2 / 16, 2 / 16, 5 / 16, 2 / 16},
|
{-2 / 16, -0.5, -2 / 16, 2 / 16, 5 / 16, 2 / 16},
|
||||||
{flammable = 1}
|
{flammable = 1},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"solanaceae",
|
||||||
|
"Solanaceae",
|
||||||
|
{-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
|
||||||
|
{flammable = 1},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
moreflowers.datas_tall = {
|
moreflowers.datas_tall = {
|
||||||
|
@ -90,50 +94,46 @@ end
|
||||||
|
|
||||||
-- Bunch of flowers
|
-- Bunch of flowers
|
||||||
if minetest.get_modpath("farming") then
|
if minetest.get_modpath("farming") then
|
||||||
|
|
||||||
minetest.register_craftitem(
|
|
||||||
"moreflowers:bunch", {
|
|
||||||
description = "Bunch of flowers",
|
|
||||||
inventory_image = "moreflowers_bunch.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft(
|
minetest.register_craftitem("moreflowers:bunch", {
|
||||||
{
|
description = "Bunch of flowers",
|
||||||
output = "moreflowers:bunch",
|
inventory_image = "moreflowers_bunch.png",
|
||||||
recipe = {
|
})
|
||||||
{"group:flower", "group:flower", "group:flower"},
|
|
||||||
{"group:flower", "group:flower", "group:flower"},
|
minetest.register_craft({
|
||||||
{"", "farming:cotton", ""},
|
output = "moreflowers:bunch",
|
||||||
},
|
recipe = {
|
||||||
})
|
{"group:flower", "group:flower", "group:flower"},
|
||||||
|
{"group:flower", "group:flower", "group:flower"},
|
||||||
|
{"", "farming:cotton", ""},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
if minetest.get_modpath("vessels") then
|
if minetest.get_modpath("vessels") then
|
||||||
|
|
||||||
-- Bunch in a vase
|
-- Bunch in a vase
|
||||||
minetest.register_node(
|
minetest.register_node("moreflowers:bunch_vase", {
|
||||||
"moreflowers:bunch_vase", {
|
description = "Bunch in a vase",
|
||||||
description = "Bunch in a vase",
|
drawtype = "plantlike",
|
||||||
drawtype = "plantlike",
|
tiles = {"moreflowers_bunch_vase.png"},
|
||||||
tiles = {"moreflowers_bunch_vase.png"},
|
inventory_image = "moreflowers_bunch_vase.png",
|
||||||
inventory_image = "moreflowers_bunch_vase.png",
|
wield_image = "moreflowers_bunch_vase.png",
|
||||||
wield_image = "moreflowers_bunch_vase.png",
|
paramtype = "light",
|
||||||
paramtype = "light",
|
is_ground_content = false,
|
||||||
is_ground_content = false,
|
walkable = false,
|
||||||
walkable = false,
|
selection_box = {
|
||||||
selection_box = {
|
type = "fixed",
|
||||||
type = "fixed",
|
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
||||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
},
|
||||||
},
|
groups = {dig_immediate = 3, attached_node = 1, falling_node = 1},
|
||||||
groups = {dig_immediate = 3, attached_node = 1, falling_node = 1},
|
sounds = default.node_sound_glass_defaults(),
|
||||||
sounds = default.node_sound_glass_defaults(),
|
})
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft(
|
minetest.register_craft({
|
||||||
{
|
output = "moreflowers:bunch_vase",
|
||||||
output = "moreflowers:bunch_vase",
|
type = "shapeless",
|
||||||
type = "shapeless",
|
recipe = {"moreflowers:bunch", "group:vessel"},
|
||||||
recipe = {"moreflowers:bunch", "group:vessel"},
|
})
|
||||||
})
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -150,15 +150,16 @@ if minetest.get_modpath("bonemeal") and bonemeal then
|
||||||
local flowers = {
|
local flowers = {
|
||||||
"flowers:dandelion_white", "flowers:dandelion_yellow", "flowers:geranium",
|
"flowers:dandelion_white", "flowers:dandelion_yellow", "flowers:geranium",
|
||||||
"flowers:rose", "flowers:tulip", "flowers:viola", "moreflowers:wild_carrot",
|
"flowers:rose", "flowers:tulip", "flowers:viola", "moreflowers:wild_carrot",
|
||||||
"moreflowers:teosinte",
|
"moreflowers:teosinte", "moreflowers:solanaceae"
|
||||||
}
|
}
|
||||||
|
|
||||||
if minetest.get_modpath("bakedclay") then
|
if minetest.get_modpath("bakedclay") then
|
||||||
flowers[9] = "bakedclay:delphinium"
|
local index = #flowers
|
||||||
flowers[10] = "bakedclay:thistle"
|
flowers[index+1] = "bakedclay:delphinium"
|
||||||
flowers[11] = "bakedclay:lazarus"
|
flowers[index+2] = "bakedclay:thistle"
|
||||||
flowers[12] = "bakedclay:mannagrass"
|
flowers[index+3] = "bakedclay:lazarus"
|
||||||
flowers[13] = ""
|
flowers[index+4] = "bakedclay:mannagrass"
|
||||||
|
flowers[index+5] = ""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -173,5 +174,3 @@ if minetest.get_modpath("bonemeal") and bonemeal then
|
||||||
bonemeal:add_deco(dirt_with_grass_deco)
|
bonemeal:add_deco(dirt_with_grass_deco)
|
||||||
bonemeal:add_deco(dirt_with_dry_grass_deco)
|
bonemeal:add_deco(dirt_with_dry_grass_deco)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.log("action", "[moreflowers] loaded.")
|
|
||||||
|
|
44
mapgen.lua
44
mapgen.lua
|
@ -18,32 +18,12 @@ local function register_mgv6_flower(name)
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[local function register_flower(seed, name, biomes_list)
|
|
||||||
minetest.register_decoration({
|
|
||||||
deco_type = "simple",
|
|
||||||
place_on = {"default:dirt_with_grass"},
|
|
||||||
sidelen = 16,
|
|
||||||
noise_params = {
|
|
||||||
offset = -0.015,
|
|
||||||
scale = 0.025,
|
|
||||||
spread = {x = 200, y = 200, z = 200},
|
|
||||||
seed = seed,
|
|
||||||
octaves = 3,
|
|
||||||
persist = 0.6
|
|
||||||
},
|
|
||||||
biomes = {"grassland", "deciduous_forest", "coniferous_forest"},
|
|
||||||
y_min = 1,
|
|
||||||
y_max = 31000,
|
|
||||||
decoration = "moreflowers:" .. name,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
--]]
|
|
||||||
function moreflowers.register_mgv6_decorations()
|
function moreflowers.register_mgv6_decorations()
|
||||||
register_mgv6_flower("wild_carrot")
|
register_mgv6_flower("wild_carrot")
|
||||||
|
register_mgv6_flower("solanaceae")
|
||||||
end
|
end
|
||||||
|
|
||||||
function moreflowers.register_decorations()
|
function moreflowers.register_decorations()
|
||||||
-- register_flower(368, "wild_carrot")
|
|
||||||
minetest.register_decoration(
|
minetest.register_decoration(
|
||||||
{
|
{
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
|
@ -57,7 +37,7 @@ function moreflowers.register_decorations()
|
||||||
octaves = 3,
|
octaves = 3,
|
||||||
persist = 0.6
|
persist = 0.6
|
||||||
},
|
},
|
||||||
biomes = {"grassland", "deciduous_forest", "coniferous_forest"},
|
biomes = {"grassland", "deciduous_forest"},
|
||||||
y_min = 1,
|
y_min = 1,
|
||||||
y_max = 31000,
|
y_max = 31000,
|
||||||
decoration = "moreflowers:wild_carrot",
|
decoration = "moreflowers:wild_carrot",
|
||||||
|
@ -73,7 +53,25 @@ function moreflowers.register_decorations()
|
||||||
decoration = "moreflowers:teosinte",
|
decoration = "moreflowers:teosinte",
|
||||||
height = 1,
|
height = 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_decoration(
|
||||||
|
{
|
||||||
|
deco_type = "simple",
|
||||||
|
place_on = {"default:dirt_with_grass"},
|
||||||
|
sidelen = 16,
|
||||||
|
noise_params = {
|
||||||
|
offset = -0.015,
|
||||||
|
scale = 0.025,
|
||||||
|
spread = {x = 200, y = 200, z = 200},
|
||||||
|
seed = 369,
|
||||||
|
octaves = 3,
|
||||||
|
persist = 0.6
|
||||||
|
},
|
||||||
|
biomes = {"grassland", "deciduous_forest"},
|
||||||
|
y_min = 64,
|
||||||
|
y_max = 31000,
|
||||||
|
decoration = "moreflowers:solanaceae",
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- detect mapgen
|
-- detect mapgen
|
||||||
|
|
5
mod.conf
5
mod.conf
|
@ -1,5 +0,0 @@
|
||||||
name = moreflowers
|
|
||||||
title = More Flowers
|
|
||||||
description = This simple mod extend the flowers mod from MT_Game by adding more flowers.
|
|
||||||
depends = flowers
|
|
||||||
optional_depends = farming,vessels,bonemeal
|
|
Binary file not shown.
After Width: | Height: | Size: 258 B |
Loading…
Reference in New Issue