2015-06-29 17:55:56 +00:00
|
|
|
-- Minetest 0.4 mod: default
|
|
|
|
-- See README.txt for licensing and other information.
|
2015-07-03 04:57:09 +00:00
|
|
|
local init = os.clock()
|
2015-06-29 17:55:56 +00:00
|
|
|
flower_tmp={}
|
|
|
|
|
|
|
|
-------------------------------
|
|
|
|
--- Fleur Simple (une case) ---
|
|
|
|
-------------------------------
|
|
|
|
|
2017-03-11 00:51:06 +00:00
|
|
|
local smallflowerlongdesc = "This is a small flower. Small flowers are mainly used for dye production and can also be potted."
|
2015-06-29 17:55:56 +00:00
|
|
|
|
|
|
|
local function add_simple_flower(name, desc, image, color)
|
2017-01-31 22:32:56 +00:00
|
|
|
minetest.register_node("mcl_flowers:"..name, {
|
2015-06-29 17:55:56 +00:00
|
|
|
description = desc,
|
2017-03-11 00:51:06 +00:00
|
|
|
_doc_items_longdesc = smallflowerlongdesc,
|
2015-06-29 17:55:56 +00:00
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = { image..".png" },
|
|
|
|
inventory_image = image..".png",
|
|
|
|
wield_image = image..".png",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
stack_max = 64,
|
2017-01-20 03:54:09 +00:00
|
|
|
groups = {dig_immediate=3,flammable=2,flower=1,attached_node=1,dig_by_water=1,color=1,deco_block=1},
|
2017-02-11 17:46:23 +00:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
2017-01-05 05:37:07 +00:00
|
|
|
buildable_to = true,
|
2015-06-29 17:55:56 +00:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
|
|
|
|
},
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2017-01-31 11:03:18 +00:00
|
|
|
add_simple_flower("poppy", "Poppy", "mcl_flowers_poppy", "color_red")
|
2017-01-05 06:23:25 +00:00
|
|
|
add_simple_flower("dandelion", "Dandelion", "flowers_dandelion_yellow", "color_yellow")
|
2017-01-31 11:03:18 +00:00
|
|
|
add_simple_flower("oxeye_daisy", "Oxeye Daisy", "mcl_flowers_oxeye_daisy", "color_yellow")
|
|
|
|
add_simple_flower("tulip_orange", "Orange Tulip", "flowers_tulip", "color_orange")
|
2015-06-29 17:55:56 +00:00
|
|
|
|
2017-01-31 11:03:18 +00:00
|
|
|
minetest.register_node("mcl_flowers:tulip_pink", {
|
2015-06-29 17:55:56 +00:00
|
|
|
description = "Pink Tulip",
|
2017-03-11 00:51:06 +00:00
|
|
|
_doc_items_longdesc = smallflowerlongdesc,
|
2015-06-29 17:55:56 +00:00
|
|
|
drawtype = "plantlike",
|
2017-01-31 11:03:18 +00:00
|
|
|
tiles = { "mcl_flowers_tulip_pink.png" },
|
|
|
|
inventory_image = "mcl_flowers_tulip_pink.png",
|
|
|
|
wield_image = "mcl_flowers_tulip_pink.png",
|
2015-06-29 17:55:56 +00:00
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
stack_max = 64,
|
2017-01-20 03:54:09 +00:00
|
|
|
groups = {dig_immediate=3,flammable=2,flower=1,attached_node=1,color_pink=1,dig_by_water=1,deco_block=1},
|
2017-01-05 05:37:07 +00:00
|
|
|
buildable_to = true,
|
2017-02-11 17:46:23 +00:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
2015-06-29 17:55:56 +00:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2017-01-31 11:03:18 +00:00
|
|
|
minetest.register_node("mcl_flowers:tulip_red", {
|
2015-06-29 17:55:56 +00:00
|
|
|
description = "Red Tulip",
|
2017-03-11 00:51:06 +00:00
|
|
|
_doc_items_longdesc = smallflowerlongdesc,
|
2015-06-29 17:55:56 +00:00
|
|
|
drawtype = "plantlike",
|
2017-01-31 11:03:18 +00:00
|
|
|
tiles = { "mcl_flowers_tulip_red.png" },
|
|
|
|
inventory_image = "mcl_flowers_tulip_red.png",
|
|
|
|
wield_image = "mcl_flowers_tulip_red.png",
|
2015-06-29 17:55:56 +00:00
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
stack_max = 64,
|
2017-01-20 03:54:09 +00:00
|
|
|
groups = {dig_immediate=3,flammable=2,flower=1,attached_node=1,color_red=1,dig_by_water=1,deco_block=1},
|
2017-01-05 05:37:07 +00:00
|
|
|
buildable_to = true,
|
2017-02-11 17:46:23 +00:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
2015-06-29 17:55:56 +00:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
|
2017-01-31 11:03:18 +00:00
|
|
|
minetest.register_node("mcl_flowers:tulip_white", {
|
2015-06-29 17:55:56 +00:00
|
|
|
description = "White Tulip",
|
2017-03-11 00:51:06 +00:00
|
|
|
_doc_items_longdesc = smallflowerlongdesc,
|
2015-06-29 17:55:56 +00:00
|
|
|
drawtype = "plantlike",
|
2017-01-31 11:03:18 +00:00
|
|
|
tiles = { "mcl_flowers_tulip_white.png" },
|
|
|
|
inventory_image = "mcl_flowers_tulip_white.png",
|
|
|
|
wield_image = "mcl_flowers_tulip_white.png",
|
2015-06-29 17:55:56 +00:00
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
stack_max = 64,
|
2017-01-20 03:54:09 +00:00
|
|
|
groups = {dig_immediate=3,flammable=2,flower=1,attached_node=1,color_white=1,dig_by_water=1,deco_block=1},
|
2017-01-05 05:37:07 +00:00
|
|
|
buildable_to = true,
|
2017-02-11 17:46:23 +00:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
2015-06-29 17:55:56 +00:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
--- allium ---
|
|
|
|
|
2017-01-31 11:03:18 +00:00
|
|
|
minetest.register_node("mcl_flowers:allium", {
|
2015-06-29 17:55:56 +00:00
|
|
|
description = "Allium",
|
2017-03-11 00:51:06 +00:00
|
|
|
_doc_items_longdesc = smallflowerlongdesc,
|
2015-06-29 17:55:56 +00:00
|
|
|
drawtype = "plantlike",
|
2017-01-31 11:03:18 +00:00
|
|
|
tiles = { "mcl_flowers_allium.png" },
|
|
|
|
inventory_image = "mcl_flowers_allium.png",
|
|
|
|
wield_image = "mcl_flowers_allium.png",
|
2015-06-29 17:55:56 +00:00
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
stack_max = 64,
|
2017-01-20 03:54:09 +00:00
|
|
|
groups = {dig_immediate=3,flammable=2,flower=1,attached_node=1,color_pink=1,dig_by_water=1,deco_block=1},
|
2017-01-05 05:37:07 +00:00
|
|
|
buildable_to = true,
|
2017-02-11 17:46:23 +00:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
2015-06-29 17:55:56 +00:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2017-01-04 05:20:13 +00:00
|
|
|
--- peony ---
|
2015-06-29 17:55:56 +00:00
|
|
|
|
2017-01-31 11:03:18 +00:00
|
|
|
minetest.register_node("mcl_flowers:peony", {
|
2017-01-04 05:20:13 +00:00
|
|
|
description = "Peony",
|
2015-06-29 17:55:56 +00:00
|
|
|
drawtype = "plantlike",
|
2017-01-31 11:03:18 +00:00
|
|
|
tiles = { "mcl_flowers_peony.png" },
|
|
|
|
inventory_image = "mcl_flowers_peony.png",
|
|
|
|
wield_image = "mcl_flowers_peony.png",
|
2015-06-29 17:55:56 +00:00
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
stack_max = 64,
|
2017-01-20 03:54:09 +00:00
|
|
|
groups = {dig_immediate=3,flammable=2,flower=1,attached_node=1,color_pink=1,dig_by_water=1,deco_block=1},
|
2017-01-05 05:37:07 +00:00
|
|
|
buildable_to = true,
|
2017-02-11 17:46:23 +00:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
2015-06-29 17:55:56 +00:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
|
2017-01-04 05:20:13 +00:00
|
|
|
--- azure bluet ---
|
2015-06-29 17:55:56 +00:00
|
|
|
|
2017-01-31 11:03:18 +00:00
|
|
|
minetest.register_node("mcl_flowers:azure_bluet", {
|
2017-01-04 05:20:13 +00:00
|
|
|
description = "Azure Bluet",
|
2017-03-11 00:51:06 +00:00
|
|
|
_doc_items_longdesc = smallflowerlongdesc,
|
2015-06-29 17:55:56 +00:00
|
|
|
drawtype = "plantlike",
|
2017-01-31 11:03:18 +00:00
|
|
|
tiles = { "mcl_flowers_azure_bluet.png" },
|
|
|
|
inventory_image = "mcl_flowers_azure_bluet.png",
|
|
|
|
wield_image = "mcl_flowers_azure_bluet.png",
|
2015-06-29 17:55:56 +00:00
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
stack_max = 64,
|
2017-01-20 03:54:09 +00:00
|
|
|
groups = {dig_immediate=3,flammable=2,flower=1,attached_node=1,color_white=1,dig_by_water=1,deco_block=1},
|
2017-01-05 05:37:07 +00:00
|
|
|
buildable_to = true,
|
2017-02-11 17:46:23 +00:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
2015-06-29 17:55:56 +00:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
---blue_orchid ---
|
|
|
|
|
2017-01-31 11:03:18 +00:00
|
|
|
minetest.register_node("mcl_flowers:blue_orchid", {
|
2015-06-29 17:55:56 +00:00
|
|
|
description = "Blue Orchid",
|
2017-03-11 00:51:06 +00:00
|
|
|
_doc_items_longdesc = smallflowerlongdesc,
|
2015-06-29 17:55:56 +00:00
|
|
|
drawtype = "plantlike",
|
2017-01-31 11:03:18 +00:00
|
|
|
tiles = { "mcl_flowers_blue_orchid.png" },
|
|
|
|
inventory_image = "mcl_flowers_blue_orchid.png",
|
|
|
|
wield_image = "mcl_flowers_blue_orchid.png",
|
2015-06-29 17:55:56 +00:00
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
stack_max = 64,
|
2017-01-20 03:54:09 +00:00
|
|
|
groups = {dig_immediate=3,flammable=2,flower=1,attached_node=1,color_blue=1,dig_by_water=1,deco_block=1},
|
2017-01-05 05:37:07 +00:00
|
|
|
buildable_to = true,
|
2017-02-11 17:46:23 +00:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
2015-06-29 17:55:56 +00:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
--- Fern ---
|
|
|
|
|
2017-01-31 11:03:18 +00:00
|
|
|
minetest.register_node("mcl_flowers:fern", {
|
2015-06-29 17:55:56 +00:00
|
|
|
description = "Fern",
|
2017-03-11 00:51:06 +00:00
|
|
|
_doc_items_longdesc = "Ferns are small plants which occour naturally in grasslands. They can be harvested for wheat seeds.",
|
2015-06-29 17:55:56 +00:00
|
|
|
drawtype = "plantlike",
|
2017-01-31 11:03:18 +00:00
|
|
|
tiles = { "mcl_flowers_fern.png" },
|
|
|
|
inventory_image = "mcl_flowers_fern.png",
|
|
|
|
wield_image = "mcl_flowers_fern.png",
|
2015-06-29 17:55:56 +00:00
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
stack_max = 64,
|
2017-01-20 03:54:09 +00:00
|
|
|
groups = {dig_immediate=3,flammable=2,flower=1,attached_node=1,dig_by_water=1,deco_block=1},
|
2017-01-05 05:37:07 +00:00
|
|
|
buildable_to = true,
|
2017-02-11 17:46:23 +00:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
2015-06-29 17:55:56 +00:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
|
|
|
|
},
|
2017-01-07 23:33:30 +00:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
|
|
|
{
|
2017-02-10 16:00:29 +00:00
|
|
|
items = {'mcl_farming:wheat_seeds'},
|
2017-02-01 20:19:30 +00:00
|
|
|
rarity = 8,
|
2017-01-07 23:33:30 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
2015-06-29 17:55:56 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
function register_large(name, desc, inv_img, bot_img, colr) --change in function
|
2017-01-31 11:03:18 +00:00
|
|
|
minetest.register_node("mcl_flowers:"..name.."_bottom", {
|
2015-06-29 17:55:56 +00:00
|
|
|
description = desc.." Bottom",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = { "double_plant_"..name.."_bottom.png" },
|
|
|
|
inventory_image = "flowers_"..inv_img..".png",
|
|
|
|
wield_image = "flowers_"..inv_img..".png",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
--[[
|
|
|
|
on_place = function(itemstack, placer, pointed_thing)
|
|
|
|
pointed_thing.under = pointed_thing.under-1
|
|
|
|
local name = minetest.get_node({x=pointed_thing.under, y=pointed_thing.under-1, z=pointed_thing.under}).name
|
|
|
|
if minetest.get_item_group(name, "soil") ~= 0 then
|
|
|
|
pointed_thing.under = pointed_thing.under+1
|
|
|
|
local height = 0
|
2017-01-31 11:03:18 +00:00
|
|
|
while minetest.get_node(pointed_thing.under).name == "mcl_flowers:"..name.."_bottom" and height < 2 do
|
2015-06-29 17:55:56 +00:00
|
|
|
height = height+1
|
|
|
|
pointed_thing.under = pointed_thing.under+1
|
|
|
|
end
|
|
|
|
if height <2 then
|
|
|
|
if minetest.get_node(pointed_thing.under).name == "air" then
|
2017-01-31 11:03:18 +00:00
|
|
|
minetest.set_node(pointed_thing.under, {name="mcl_flowers:"..name.."_top"})
|
2015-06-29 17:55:56 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
]]
|
2017-01-31 11:03:18 +00:00
|
|
|
drop = "mcl_flowers:"..name,
|
2017-01-20 03:54:09 +00:00
|
|
|
groups = {dig_immediate=3,flammable=2,flower=1,attached_node=1,colr=1, dig_by_water=1, double_bottom =1,deco_block=1,deco_block=1},
|
2017-02-11 17:46:23 +00:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
2015-06-29 17:55:56 +00:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.25, -0.5, -0.25, 0.25, 0.5, 0.25 },
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Top
|
2017-01-31 11:03:18 +00:00
|
|
|
minetest.register_node("mcl_flowers:"..name.."_top", {
|
2015-06-29 17:55:56 +00:00
|
|
|
description = desc.." Top",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = { "double_plant_"..name.."_top.png" },
|
|
|
|
inventory_image = "double_plant_"..inv_img.."_top.png",
|
|
|
|
wield_image = "double_plant_"..inv_img.."_top.png",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
2017-01-31 11:03:18 +00:00
|
|
|
drop = "mcl_flowers:"..name,
|
2017-01-07 23:51:19 +00:00
|
|
|
groups = {dig_immediate=3,flammable=2,flower=1,attached_node=1,colr=1, dig_by_water=1, not_in_creative_inventory = 1, double_top =1},
|
2017-02-11 17:46:23 +00:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
2015-06-29 17:55:56 +00:00
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = { -0.25, -0.5, -0.25, 0.25, 0.5, 0.25 },
|
|
|
|
},
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2017-01-12 03:37:36 +00:00
|
|
|
-- Lily Pad
|
2017-01-31 11:03:18 +00:00
|
|
|
minetest.register_node("mcl_flowers:waterlily", {
|
2017-01-12 03:37:36 +00:00
|
|
|
description = "Lily Pad",
|
2017-03-11 00:51:06 +00:00
|
|
|
_doc_items_longdesc = "A lily pad is a flat plant block which can be walked on. They can be placed on water sources, ice and frosted ice.",
|
2017-01-12 03:37:36 +00:00
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
2017-01-31 23:35:04 +00:00
|
|
|
tiles = {"flowers_waterlily.png", "flowers_waterlily.png^[transformFY"},
|
2017-01-12 03:37:36 +00:00
|
|
|
inventory_image = "flowers_waterlily.png",
|
|
|
|
wield_image = "flowers_waterlily.png",
|
|
|
|
liquids_pointable = true,
|
|
|
|
walkable = true,
|
|
|
|
sunlight_propagates = true,
|
2017-01-20 03:54:09 +00:00
|
|
|
groups = {dig_immediate = 3, dig_by_water = 1, deco_block=1},
|
2017-02-11 17:46:23 +00:00
|
|
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
2017-01-12 03:37:36 +00:00
|
|
|
node_placement_prediction = "",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
2017-02-10 06:35:45 +00:00
|
|
|
fixed = {-0.5, -31/64, -0.5, 0.5, -15/32, 0.5}
|
2017-01-12 03:37:36 +00:00
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, -15 / 32, 7 / 16}
|
|
|
|
},
|
|
|
|
|
|
|
|
on_place = function(itemstack, placer, pointed_thing)
|
|
|
|
local pos = pointed_thing.above
|
2017-03-02 15:20:19 +00:00
|
|
|
local node = minetest.get_node(pointed_thing.under)
|
|
|
|
local nodename = node.name
|
|
|
|
local def = minetest.registered_nodes[nodename]
|
2017-01-12 03:37:36 +00:00
|
|
|
local node_above = minetest.get_node(pointed_thing.above).name
|
|
|
|
local def_above = minetest.registered_nodes[node_above]
|
|
|
|
local player_name = placer:get_player_name()
|
|
|
|
|
2017-03-02 15:20:19 +00:00
|
|
|
if def then
|
|
|
|
-- Use pointed node's on_rightclick function first, if present
|
|
|
|
if placer and not placer:get_player_control().sneak then
|
|
|
|
if def and def.on_rightclick then
|
|
|
|
return def.on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
if (pointed_thing.under.x == pointed_thing.above.x and pointed_thing.under.z == pointed_thing.above.z) and
|
|
|
|
((def.liquidtype == "source" and minetest.get_item_group(nodename, "water") > 0) or
|
|
|
|
(nodename == "mcl_core:ice") or
|
|
|
|
(minetest.get_item_group(nodename, "frosted_ice") > 0)) and
|
2017-01-12 03:37:36 +00:00
|
|
|
(def_above.buildable_to and minetest.get_item_group(node_above, "liquid") == 0) then
|
|
|
|
if not minetest.is_protected(pos, player_name) then
|
2017-01-31 11:03:18 +00:00
|
|
|
minetest.set_node(pos, {name = "mcl_flowers:waterlily",
|
2017-01-12 03:37:36 +00:00
|
|
|
param2 = math.random(0, 3)})
|
|
|
|
if not minetest.setting_getbool("creative_mode") then
|
|
|
|
itemstack:take_item()
|
|
|
|
end
|
|
|
|
else
|
|
|
|
minetest.chat_send_player(player_name, "Node is protected")
|
|
|
|
minetest.record_protection_violation(pos, player_name)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
})
|
2017-01-05 06:23:25 +00:00
|
|
|
|
2015-07-03 04:57:09 +00:00
|
|
|
local time_to_load= os.clock() - init
|
|
|
|
print(string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load))
|