Reindent code
- Add load message into "action" log
This commit is contained in:
parent
a08d5f21a3
commit
fdc371d8ea
158
init.lua
158
init.lua
@ -9,25 +9,26 @@ local function add_simple_flower(name, desc, box, f_groups)
|
||||
f_groups.flora = 1
|
||||
f_groups.attached_node = 1
|
||||
|
||||
minetest.register_node("moreflowers:" .. name, {
|
||||
description = desc,
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"moreflowers_"..name..".png"},
|
||||
inventory_image = "moreflowers_"..name..".png",
|
||||
wield_image = "moreflowers_"..name..".png",
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
stack_max = 99,
|
||||
groups = f_groups,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = box
|
||||
}
|
||||
})
|
||||
minetest.register_node(
|
||||
"moreflowers:" .. name, {
|
||||
description = desc,
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"moreflowers_"..name..".png"},
|
||||
inventory_image = "moreflowers_"..name..".png",
|
||||
wield_image = "moreflowers_"..name..".png",
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
stack_max = 99,
|
||||
groups = f_groups,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = box
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
local function add_tall_flower(name, desc, box, f_groups)
|
||||
@ -36,27 +37,28 @@ local function add_tall_flower(name, desc, box, f_groups)
|
||||
f_groups.flora = 1
|
||||
f_groups.attached_node = 1
|
||||
|
||||
minetest.register_node("moreflowers:" .. name, {
|
||||
description = desc,
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"moreflowers_"..name..".png"},
|
||||
inventory_image = "moreflowers_"..name..".png",
|
||||
wield_image = "moreflowers_"..name..".png",
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
stack_max = 99,
|
||||
visual_scale = 1.3,
|
||||
wield_scale = {x=1, y=1.5, z=1},
|
||||
groups = f_groups,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = box
|
||||
}
|
||||
})
|
||||
minetest.register_node(
|
||||
"moreflowers:" .. name, {
|
||||
description = desc,
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"moreflowers_"..name..".png"},
|
||||
inventory_image = "moreflowers_"..name..".png",
|
||||
wield_image = "moreflowers_"..name..".png",
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
stack_max = 99,
|
||||
visual_scale = 1.3,
|
||||
wield_scale = {x=1, y=1.5, z=1},
|
||||
groups = f_groups,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = box
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
moreflowers.datas_simple = {
|
||||
@ -88,46 +90,50 @@ end
|
||||
|
||||
-- Bunch of flowers
|
||||
if minetest.get_modpath("farming") then
|
||||
|
||||
minetest.register_craftitem(
|
||||
"moreflowers:bunch", {
|
||||
description = "Bunch of flowers",
|
||||
inventory_image = "moreflowers_bunch.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("moreflowers:bunch", {
|
||||
description = "Bunch of flowers",
|
||||
inventory_image = "moreflowers_bunch.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreflowers:bunch",
|
||||
recipe = {
|
||||
{"group:flower", "group:flower", "group:flower"},
|
||||
{"group:flower", "group:flower", "group:flower"},
|
||||
{"", "farming:cotton", ""},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft(
|
||||
{
|
||||
output = "moreflowers:bunch",
|
||||
recipe = {
|
||||
{"group:flower", "group:flower", "group:flower"},
|
||||
{"group:flower", "group:flower", "group:flower"},
|
||||
{"", "farming:cotton", ""},
|
||||
},
|
||||
})
|
||||
|
||||
if minetest.get_modpath("vessels") then
|
||||
|
||||
-- Bunch in a vase
|
||||
minetest.register_node("moreflowers:bunch_vase", {
|
||||
description = "Bunch in a vase",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"moreflowers_bunch_vase.png"},
|
||||
inventory_image = "moreflowers_bunch_vase.png",
|
||||
wield_image = "moreflowers_bunch_vase.png",
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
||||
},
|
||||
groups = {dig_immediate = 3, attached_node = 1, falling_node = 1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
minetest.register_node(
|
||||
"moreflowers:bunch_vase", {
|
||||
description = "Bunch in a vase",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"moreflowers_bunch_vase.png"},
|
||||
inventory_image = "moreflowers_bunch_vase.png",
|
||||
wield_image = "moreflowers_bunch_vase.png",
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
||||
},
|
||||
groups = {dig_immediate = 3, attached_node = 1, falling_node = 1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "moreflowers:bunch_vase",
|
||||
type = "shapeless",
|
||||
recipe = {"moreflowers:bunch", "group:vessel"},
|
||||
})
|
||||
minetest.register_craft(
|
||||
{
|
||||
output = "moreflowers:bunch_vase",
|
||||
type = "shapeless",
|
||||
recipe = {"moreflowers:bunch", "group:vessel"},
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
@ -167,3 +173,5 @@ if minetest.get_modpath("bonemeal") and bonemeal then
|
||||
bonemeal:add_deco(dirt_with_grass_deco)
|
||||
bonemeal:add_deco(dirt_with_dry_grass_deco)
|
||||
end
|
||||
|
||||
minetest.log("action", "[moreflowers] loaded.")
|
||||
|
Loading…
Reference in New Issue
Block a user