Reindent code
- Add load message into "action" log
This commit is contained in:
parent
a08d5f21a3
commit
fdc371d8ea
154
init.lua
154
init.lua
@ -9,25 +9,26 @@ 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("moreflowers:" .. name, {
|
minetest.register_node(
|
||||||
description = desc,
|
"moreflowers:" .. name, {
|
||||||
drawtype = "plantlike",
|
description = desc,
|
||||||
waving = 1,
|
drawtype = "plantlike",
|
||||||
tiles = {"moreflowers_"..name..".png"},
|
waving = 1,
|
||||||
inventory_image = "moreflowers_"..name..".png",
|
tiles = {"moreflowers_"..name..".png"},
|
||||||
wield_image = "moreflowers_"..name..".png",
|
inventory_image = "moreflowers_"..name..".png",
|
||||||
sunlight_propagates = true,
|
wield_image = "moreflowers_"..name..".png",
|
||||||
paramtype = "light",
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
paramtype = "light",
|
||||||
buildable_to = true,
|
walkable = false,
|
||||||
stack_max = 99,
|
buildable_to = true,
|
||||||
groups = f_groups,
|
stack_max = 99,
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
groups = f_groups,
|
||||||
selection_box = {
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
type = "fixed",
|
selection_box = {
|
||||||
fixed = box
|
type = "fixed",
|
||||||
}
|
fixed = box
|
||||||
})
|
}
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local function add_tall_flower(name, desc, box, f_groups)
|
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.flora = 1
|
||||||
f_groups.attached_node = 1
|
f_groups.attached_node = 1
|
||||||
|
|
||||||
minetest.register_node("moreflowers:" .. name, {
|
minetest.register_node(
|
||||||
description = desc,
|
"moreflowers:" .. name, {
|
||||||
drawtype = "plantlike",
|
description = desc,
|
||||||
waving = 1,
|
drawtype = "plantlike",
|
||||||
tiles = {"moreflowers_"..name..".png"},
|
waving = 1,
|
||||||
inventory_image = "moreflowers_"..name..".png",
|
tiles = {"moreflowers_"..name..".png"},
|
||||||
wield_image = "moreflowers_"..name..".png",
|
inventory_image = "moreflowers_"..name..".png",
|
||||||
sunlight_propagates = true,
|
wield_image = "moreflowers_"..name..".png",
|
||||||
paramtype = "light",
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
paramtype = "light",
|
||||||
buildable_to = true,
|
walkable = false,
|
||||||
stack_max = 99,
|
buildable_to = true,
|
||||||
visual_scale = 1.3,
|
stack_max = 99,
|
||||||
wield_scale = {x=1, y=1.5, z=1},
|
visual_scale = 1.3,
|
||||||
groups = f_groups,
|
wield_scale = {x=1, y=1.5, z=1},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
groups = f_groups,
|
||||||
selection_box = {
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
type = "fixed",
|
selection_box = {
|
||||||
fixed = box
|
type = "fixed",
|
||||||
}
|
fixed = box
|
||||||
})
|
}
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
moreflowers.datas_simple = {
|
moreflowers.datas_simple = {
|
||||||
@ -89,45 +91,49 @@ end
|
|||||||
-- Bunch of flowers
|
-- Bunch of flowers
|
||||||
if minetest.get_modpath("farming") then
|
if minetest.get_modpath("farming") then
|
||||||
|
|
||||||
minetest.register_craftitem("moreflowers:bunch", {
|
minetest.register_craftitem(
|
||||||
description = "Bunch of flowers",
|
"moreflowers:bunch", {
|
||||||
inventory_image = "moreflowers_bunch.png",
|
description = "Bunch of flowers",
|
||||||
})
|
inventory_image = "moreflowers_bunch.png",
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft(
|
||||||
output = "moreflowers:bunch",
|
{
|
||||||
recipe = {
|
output = "moreflowers:bunch",
|
||||||
{"group:flower", "group:flower", "group:flower"},
|
recipe = {
|
||||||
{"group:flower", "group:flower", "group:flower"},
|
{"group:flower", "group:flower", "group:flower"},
|
||||||
{"", "farming:cotton", ""},
|
{"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("moreflowers:bunch_vase", {
|
minetest.register_node(
|
||||||
description = "Bunch in a vase",
|
"moreflowers:bunch_vase", {
|
||||||
drawtype = "plantlike",
|
description = "Bunch in a vase",
|
||||||
tiles = {"moreflowers_bunch_vase.png"},
|
drawtype = "plantlike",
|
||||||
inventory_image = "moreflowers_bunch_vase.png",
|
tiles = {"moreflowers_bunch_vase.png"},
|
||||||
wield_image = "moreflowers_bunch_vase.png",
|
inventory_image = "moreflowers_bunch_vase.png",
|
||||||
paramtype = "light",
|
wield_image = "moreflowers_bunch_vase.png",
|
||||||
is_ground_content = false,
|
paramtype = "light",
|
||||||
walkable = false,
|
is_ground_content = false,
|
||||||
selection_box = {
|
walkable = false,
|
||||||
type = "fixed",
|
selection_box = {
|
||||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
|
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(),
|
groups = {dig_immediate = 3, attached_node = 1, falling_node = 1},
|
||||||
})
|
sounds = default.node_sound_glass_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft(
|
||||||
output = "moreflowers:bunch_vase",
|
{
|
||||||
type = "shapeless",
|
output = "moreflowers:bunch_vase",
|
||||||
recipe = {"moreflowers:bunch", "group:vessel"},
|
type = "shapeless",
|
||||||
})
|
recipe = {"moreflowers:bunch", "group:vessel"},
|
||||||
|
})
|
||||||
end
|
end
|
||||||
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_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.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user