Rename mod: flowers to mcl_flowers

This commit is contained in:
Wuzzy 2017-01-31 12:03:18 +01:00
parent 7c62c8fe6c
commit 89b30ae108
29 changed files with 108 additions and 113 deletions

View file

@ -238,7 +238,7 @@ crafting.set_creative_formspec = function(player, start_i, pagenum, show, page,
"item_image_button[-0.1,0;1,1;default:brick;blocks;]".. --build blocks
tab(name, "blocks") ..
"tooltip[blocks;Building Blocks]"..
"item_image_button[1.15,0;1,1;flowers:peony;deco;]".. --decoration blocks
"item_image_button[1.15,0;1,1;mcl_flowers:peony;deco;]".. --decoration blocks
tab(name, "deco") ..
"tooltip[deco;Decoration Blocks]"..
"item_image_button[2.415,0;1,1;mesecons:redstone;redstone;]".. --redstone

View file

@ -437,19 +437,19 @@ minetest.after(0.5, function()
plant_tab[4] = "default:grass"
plant_tab[5] = "default:grass"
if minetest.get_modpath("flowers") ~= nil then
if minetest.get_modpath("mcl_flowers") ~= nil then
rnd_max = 16
plant_tab[6] = "flowers:dandelion_yellow"
plant_tab[7] = "flowers:rose"
plant_tab[8] = "flowers:oxeye_daisy"
plant_tab[9] = "flowers:tulip_orange"
plant_tab[10] = "flowers:tulip_red"
plant_tab[11] = "flowers:tulip_white"
plant_tab[12] = "flowers:tulip_pink"
plant_tab[13] = "flowers:allium"
plant_tab[14] = "flowers:paeonia"
plant_tab[15] = "flowers:houstonia"
plant_tab[16] = "flowers:blue_orchid"
plant_tab[6] = "mcl_flowers:dandelion_yellow"
plant_tab[7] = "mcl_flowers:rose"
plant_tab[8] = "mcl_flowers:oxeye_daisy"
plant_tab[9] = "mcl_flowers:tulip_orange"
plant_tab[10] = "mcl_flowers:tulip_red"
plant_tab[11] = "mcl_flowers:tulip_white"
plant_tab[12] = "mcl_flowers:tulip_pink"
plant_tab[13] = "mcl_flowers:allium"
plant_tab[14] = "mcl_flowers:paeonia"
plant_tab[15] = "mcl_flowers:houstonia"
plant_tab[16] = "mcl_flowers:blue_orchid"
end
end)

View file

@ -415,7 +415,7 @@ minetest.register_tool("default:pole", {
elseif r == 5 then
itemname = "mcl_mobitems:saddle"
elseif r == 6 then
itemname = "flowers:waterlily"
itemname = "mcl_flowers:waterlily"
end
end
local inv = user:get_inventory()

View file

@ -1 +1 @@
flowers
mcl_flowers

View file

@ -177,59 +177,59 @@ minetest.register_craft({
-- Dye creation
minetest.register_craft({
output = "mcl_dye:yellow",
recipe = {{"flowers:dandelion_yellow"}},
recipe = {{"mcl_flowers:dandelion_yellow"}},
})
minetest.register_craft({
output = "mcl_dye:yellow 2",
recipe = {{"flowers:sunflower"}},
recipe = {{"mcl_flowers:sunflower"}},
})
minetest.register_craft({
output = "mcl_dye:lightblue",
recipe = {{"flowers:blue_orchid"}},
recipe = {{"mcl_flowers:blue_orchid"}},
})
minetest.register_craft({
output = "mcl_dye:grey",
recipe = {{"flowers:azure_bluet"}},
recipe = {{"mcl_flowers:azure_bluet"}},
})
minetest.register_craft({
output = "mcl_dye:grey",
recipe = {{"flowers:oxeye_daisy"}},
recipe = {{"mcl_flowers:oxeye_daisy"}},
})
minetest.register_craft({
output = "mcl_dye:grey",
recipe = {{"flowers:tulip_white"}},
recipe = {{"mcl_flowers:tulip_white"}},
})
minetest.register_craft({
output = "mcl_dye:magenta",
recipe = {{"flowers:allium"}},
recipe = {{"mcl_flowers:allium"}},
})
minetest.register_craft({
output = "mcl_dye:magenta 2",
recipe = {{"flowers:lilac"}},
recipe = {{"mcl_flowers:lilac"}},
})
minetest.register_craft({
output = "mcl_dye:orange",
recipe = {{"flowers:tulip_orange"}},
recipe = {{"mcl_flowers:tulip_orange"}},
})
minetest.register_craft({
output = "mcl_dye:pink",
recipe = {{"flowers:tulip_pink"}},
recipe = {{"mcl_flowers:tulip_pink"}},
})
minetest.register_craft({
output = "mcl_dye:pink 2",
recipe = {{"flowers:peony"}},
recipe = {{"mcl_flowers:peony"}},
})
minetest.register_craft({
output = "mcl_dye:red",
recipe = {{"flowers:poppy"}},
recipe = {{"mcl_flowers:poppy"}},
})
minetest.register_craft({
output = "mcl_dye:red",
recipe = {{"flowers:tulip_red"}},
recipe = {{"mcl_flowers:tulip_red"}},
})
minetest.register_craft({
output = "mcl_dye:red 2",
recipe = {{"flowers:rose_bush"}},
recipe = {{"mcl_flowers:rose_bush"}},
})
minetest.register_craft({
type = "cooking",

View file

@ -1,4 +1,4 @@
minetest.register_entity("flowers:item",{
minetest.register_entity("mcl_flowers:item",{
hp_max = 1,
visual="wielditem",
visual_size={x=.25,y=.25},
@ -44,12 +44,12 @@ facedir[3] = {x=-1,y=0,z=0}
local flower_pot_remove_item = function(pos, node)
local objs = nil
if node and node.name == "flowers:pot" then
if node and node.name == "mcl_flowers:pot" then
objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, .5)
end
if objs then
for _, obj in ipairs(objs) do
if obj and obj:get_luaentity() and obj:get_luaentity().name == "flowers:item" then
if obj and obj:get_luaentity() and obj:get_luaentity().name == "mcl_flowers:item" then
obj:remove()
end
end
@ -60,19 +60,19 @@ flower_pot_update_item = function(pos, node)
flower_pot_remove_item(pos, node)
local meta = minetest.get_meta(pos)
if meta and meta:get_string("item") ~= "" then
if node.name == "flowers:pot" then
if node.name == "mcl_flowers:pot" then
pos.y = pos.y
end
flower_tmp.nodename = node.name
flower_tmp.texture = ItemStack(meta:get_string("item")):get_name()
local e = minetest.add_entity(pos,"flowers:item")
local e = minetest.add_entity(pos,"mcl_flowers:item")
end
end
flower_pot_drop_item = function(pos, node)
local meta = minetest.get_meta(pos)
if meta:get_string("item") ~= "" then
if node.name == "flowers:pot" then
if node.name == "mcl_flowers:pot" then
minetest.add_item({x=pos.x,y=pos.y+1,z=pos.z}, meta:get_string("item"))
end
meta:set_string("item","")

View file

@ -5,8 +5,8 @@ flower_tmp={}
-- Map Generation
dofile(minetest.get_modpath("flowers").."/mapgen.lua")
dofile(minetest.get_modpath("flowers").."/func.lua")
dofile(minetest.get_modpath("mcl_flowers").."/mapgen.lua")
dofile(minetest.get_modpath("mcl_flowers").."/func.lua")
@ -16,7 +16,7 @@ dofile(minetest.get_modpath("flowers").."/func.lua")
local function add_simple_flower(name, desc, image, color)
minetest.register_node("flowers:"..name.."", {
minetest.register_node("mcl_flowers:"..name.."", {
description = desc,
drawtype = "plantlike",
tiles = { image..".png" },
@ -36,17 +36,17 @@ local function add_simple_flower(name, desc, image, color)
})
end
add_simple_flower("poppy", "Poppy", "flowers_coqlicot", "color_red")
add_simple_flower("poppy", "Poppy", "mcl_flowers_poppy", "color_red")
add_simple_flower("dandelion", "Dandelion", "flowers_dandelion_yellow", "color_yellow")
add_simple_flower("oxeye_daisy", "Oxeye Daisy", "flower_oxeye_daisy", "color_yellow")
add_simple_flower("tulip_orange", "Orange Tulip", "flower_tulip_orange", "color_orange")
add_simple_flower("oxeye_daisy", "Oxeye Daisy", "mcl_flowers_oxeye_daisy", "color_yellow")
add_simple_flower("tulip_orange", "Orange Tulip", "flowers_tulip", "color_orange")
minetest.register_node("flowers:tulip_pink", {
minetest.register_node("mcl_flowers:tulip_pink", {
description = "Pink Tulip",
drawtype = "plantlike",
tiles = { "flower_tulip_pink.png" },
inventory_image = "flower_tulip_pink.png",
wield_image = "flower_tulip_pink.png",
tiles = { "mcl_flowers_tulip_pink.png" },
inventory_image = "mcl_flowers_tulip_pink.png",
wield_image = "mcl_flowers_tulip_pink.png",
sunlight_propagates = true,
paramtype = "light",
walkable = false,
@ -60,12 +60,12 @@ minetest.register_node("flowers:tulip_pink", {
},
})
minetest.register_node("flowers:tulip_red", {
minetest.register_node("mcl_flowers:tulip_red", {
description = "Red Tulip",
drawtype = "plantlike",
tiles = { "flower_tulip_red.png" },
inventory_image = "flower_tulip_red.png",
wield_image = "flower_tulip_red.png",
tiles = { "mcl_flowers_tulip_red.png" },
inventory_image = "mcl_flowers_tulip_red.png",
wield_image = "mcl_flowers_tulip_red.png",
sunlight_propagates = true,
paramtype = "light",
walkable = false,
@ -80,12 +80,12 @@ minetest.register_node("flowers:tulip_red", {
})
minetest.register_node("flowers:tulip_white", {
minetest.register_node("mcl_flowers:tulip_white", {
description = "White Tulip",
drawtype = "plantlike",
tiles = { "flower_tulip_white.png" },
inventory_image = "flower_tulip_white.png",
wield_image = "flower_tulip_white.png",
tiles = { "mcl_flowers_tulip_white.png" },
inventory_image = "mcl_flowers_tulip_white.png",
wield_image = "mcl_flowers_tulip_white.png",
sunlight_propagates = true,
paramtype = "light",
walkable = false,
@ -102,12 +102,12 @@ minetest.register_node("flowers:tulip_white", {
--- allium ---
minetest.register_node("flowers:allium", {
minetest.register_node("mcl_flowers:allium", {
description = "Allium",
drawtype = "plantlike",
tiles = { "flower_allium.png" },
inventory_image = "flower_allium.png",
wield_image = "flower_allium.png",
tiles = { "mcl_flowers_allium.png" },
inventory_image = "mcl_flowers_allium.png",
wield_image = "mcl_flowers_allium.png",
sunlight_propagates = true,
paramtype = "light",
walkable = false,
@ -123,12 +123,12 @@ minetest.register_node("flowers:allium", {
--- peony ---
minetest.register_node("flowers:peony", {
minetest.register_node("mcl_flowers:peony", {
description = "Peony",
drawtype = "plantlike",
tiles = { "flower_peony.png" },
inventory_image = "flower_peony.png",
wield_image = "flower_peony.png",
tiles = { "mcl_flowers_peony.png" },
inventory_image = "mcl_flowers_peony.png",
wield_image = "mcl_flowers_peony.png",
sunlight_propagates = true,
paramtype = "light",
walkable = false,
@ -145,12 +145,12 @@ minetest.register_node("flowers:peony", {
--- azure bluet ---
minetest.register_node("flowers:azure_bluet", {
minetest.register_node("mcl_flowers:azure_bluet", {
description = "Azure Bluet",
drawtype = "plantlike",
tiles = { "flower_azure_bluet.png" },
inventory_image = "flower_azure_bluet.png",
wield_image = "flower_azure_bluet.png",
tiles = { "mcl_flowers_azure_bluet.png" },
inventory_image = "mcl_flowers_azure_bluet.png",
wield_image = "mcl_flowers_azure_bluet.png",
sunlight_propagates = true,
paramtype = "light",
walkable = false,
@ -166,12 +166,12 @@ minetest.register_node("flowers:azure_bluet", {
---blue_orchid ---
minetest.register_node("flowers:blue_orchid", {
minetest.register_node("mcl_flowers:blue_orchid", {
description = "Blue Orchid",
drawtype = "plantlike",
tiles = { "flower_blue_orchid.png" },
inventory_image = "flower_blue_orchid.png",
wield_image = "flower_blue_orchid.png",
tiles = { "mcl_flowers_blue_orchid.png" },
inventory_image = "mcl_flowers_blue_orchid.png",
wield_image = "mcl_flowers_blue_orchid.png",
sunlight_propagates = true,
paramtype = "light",
walkable = false,
@ -187,12 +187,12 @@ minetest.register_node("flowers:blue_orchid", {
--- Fern ---
minetest.register_node("flowers:fern", {
minetest.register_node("mcl_flowers:fern", {
description = "Fern",
drawtype = "plantlike",
tiles = { "fern.png" },
inventory_image = "fern.png",
wield_image = "fern.png",
tiles = { "mcl_flowers_fern.png" },
inventory_image = "mcl_flowers_fern.png",
wield_image = "mcl_flowers_fern.png",
sunlight_propagates = true,
paramtype = "light",
walkable = false,
@ -216,7 +216,7 @@ minetest.register_node("flowers:fern", {
})
function register_large(name, desc, inv_img, bot_img, colr) --change in function
minetest.register_node("flowers:"..name.."_bottom", {
minetest.register_node("mcl_flowers:"..name.."_bottom", {
description = desc.." Bottom",
drawtype = "plantlike",
tiles = { "double_plant_"..name.."_bottom.png" },
@ -233,19 +233,19 @@ function register_large(name, desc, inv_img, bot_img, colr) --change in function
if minetest.get_item_group(name, "soil") ~= 0 then
pointed_thing.under = pointed_thing.under+1
local height = 0
while minetest.get_node(pointed_thing.under).name == "flowers:"..name.."_bottom" and height < 2 do
while minetest.get_node(pointed_thing.under).name == "mcl_flowers:"..name.."_bottom" and height < 2 do
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
minetest.set_node(pointed_thing.under, {name="flowers:"..name.."_top"})
minetest.set_node(pointed_thing.under, {name="mcl_flowers:"..name.."_top"})
end
end
end
end,
]]
drop = "flowers:"..name,
drop = "mcl_flowers:"..name,
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},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
@ -255,7 +255,7 @@ function register_large(name, desc, inv_img, bot_img, colr) --change in function
})
-- Top
minetest.register_node("flowers:"..name.."_top", {
minetest.register_node("mcl_flowers:"..name.."_top", {
description = desc.." Top",
drawtype = "plantlike",
tiles = { "double_plant_"..name.."_top.png" },
@ -265,7 +265,7 @@ function register_large(name, desc, inv_img, bot_img, colr) --change in function
paramtype = "light",
walkable = false,
buildable_to = true,
drop = "flowers:"..name,
drop = "mcl_flowers:"..name,
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},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
@ -280,7 +280,7 @@ end
-- Flower Pot
--
minetest.register_node("flowers:pot",{
minetest.register_node("mcl_flowers:pot",{
description = "Flower Pot",
drawtype = "nodebox",
is_ground_content = false,
@ -327,12 +327,12 @@ minetest.register_node("flowers:pot",{
local node = minetest.get_node(pos)
flower_pot_drop_item(pos,node)
minetest.add_node(pos, {name="air"})
minetest.add_item(pos, "flowers:pot")
minetest.add_item(pos, "mcl_flowers:pot")
end,
})
-- Lily Pad
minetest.register_node("flowers:waterlily", {
minetest.register_node("mcl_flowers:waterlily", {
description = "Lily Pad",
drawtype = "nodebox",
paramtype = "light",
@ -371,7 +371,7 @@ minetest.register_node("flowers:waterlily", {
(minetest.get_item_group(node, "frosted_ice") > 0)) and
(def_above.buildable_to and minetest.get_item_group(node_above, "liquid") == 0) then
if not minetest.is_protected(pos, player_name) then
minetest.set_node(pos, {name = "flowers:waterlily",
minetest.set_node(pos, {name = "mcl_flowers:waterlily",
param2 = math.random(0, 3)})
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
@ -389,8 +389,3 @@ minetest.register_node("flowers:waterlily", {
local time_to_load= os.clock() - init
print(string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load))
minetest.register_alias("flowers:houstonia", "flowers:azure_bluet")
minetest.register_alias("flowers:paeonia", "flowers:peony")
minetest.register_alias("flowers:rose", "flowers:poppy")
minetest.register_alias("flowers:dandelion_yellow", "flowers:dandelion")

View file

@ -1,20 +1,20 @@
minetest.register_alias("mapgen_dandelion", "flowers:dandelion_yellow")
minetest.register_alias("mapgen_rose", "flowers:rose")
minetest.register_alias("mapgen_dandelion", "mcl_flowers:dandelion_yellow")
minetest.register_alias("mapgen_rose", "mcl_flowers:rose")
minetest.register_alias("mapgen_oxeye_daisy", "flowers:oxeye_daisy")
minetest.register_alias("mapgen_oxeye_daisy", "mcl_flowers:oxeye_daisy")
minetest.register_alias("mapgen_tulip_orange", "flowers:tulip_orange")
minetest.register_alias("mapgen_tulip_pink", "flowers:tulip_pink")
minetest.register_alias("mapgen_tulip_red", "flowers:tulip_red")
minetest.register_alias("mapgen_tulip_white", "flowers:tulip_white")
minetest.register_alias("mapgen_tulip_orange", "mcl_flowers:tulip_orange")
minetest.register_alias("mapgen_tulip_pink", "mcl_flowers:tulip_pink")
minetest.register_alias("mapgen_tulip_red", "mcl_flowers:tulip_red")
minetest.register_alias("mapgen_tulip_white", "mcl_flowers:tulip_white")
minetest.register_alias("mapgen_allium", "flowers:allium")
minetest.register_alias("mapgen_allium", "mcl_flowers:allium")
minetest.register_alias("mapgen_paeonia", "flowers:paeonia")
minetest.register_alias("mapgen_paeonia", "mcl_flowers:paeonia")
minetest.register_alias("mapgen_houstonia", "flowers:houstonia")
minetest.register_alias("mapgen_houstonia", "mcl_flowers:houstonia")
minetest.register_alias("mapgen_blue_orchid", "flowers:blue_orchid")
minetest.register_alias("mapgen_blue_orchid", "mcl_flowers:blue_orchid")
minetest.register_on_generated(function(minp, maxp, seed)
if maxp.y >= 3 and minp.y <= 0 then
@ -57,40 +57,40 @@ minetest.register_on_generated(function(minp, maxp, seed)
local flower_choice = math.random(0, 11)
local flower = "default:grass"
if flower_choice == 1 then
flower = "flowers:dandelion_yellow"
flower = "mcl_flowers:dandelion_yellow"
minetest.set_node(p, {name=flower})
elseif flower_choice == 2 then
flower = "flowers:rose"
flower = "mcl_flowers:rose"
minetest.set_node(p, {name=flower})
elseif flower_choice == 3 then
flower = "flowers:oxeye_daisy"
flower = "mcl_flowers:oxeye_daisy"
minetest.set_node(p, {name=flower})
elseif flower_choice == 4 then
flower = "flowers:tulip_orange"
flower = "mcl_flowers:tulip_orange"
minetest.set_node(p, {name=flower})
elseif flower_choice == 5 then
flower = "flowers:tulip_pink"
flower = "mcl_flowers:tulip_pink"
minetest.set_node(p, {name=flower})
elseif flower_choice == 6 then
flower = "flowers:tulip_red"
flower = "mcl_flowers:tulip_red"
minetest.set_node(p, {name=flower})
elseif flower_choice == 7 then
flower = "flowers:tulip_white"
flower = "mcl_flowers:tulip_white"
minetest.set_node(p, {name=flower})
elseif flower_choice == 8 then
flower = "flowers:allium"
flower = "mcl_flowers:allium"
minetest.set_node(p, {name=flower})
elseif flower_choice == 9 then
flower = "flowers:paeonia"
flower = "mcl_flowers:paeonia"
minetest.set_node(p, {name=flower})
elseif flower_choice == 10 then
flower = "flowers:houstonia"
flower = "mcl_flowers:houstonia"
minetest.set_node(p, {name=flower})
elseif flower_choice == 11 then
flower = "flowers:blue_orchid"
flower = "mcl_flowers:blue_orchid"
minetest.set_node(p, {name=flower})
elseif flower_choice == 12 then
flower = "flowers:fern"
flower = "mcl_flowers:fern"
minetest.set_node(p, {name=flower})
else
flower = "default:grass"

View file

Before

Width:  |  Height:  |  Size: 192 B

After

Width:  |  Height:  |  Size: 192 B

View file

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 311 B

View file

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 627 B

View file

Before

Width:  |  Height:  |  Size: 460 B

After

Width:  |  Height:  |  Size: 460 B

View file

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 220 B

View file

Before

Width:  |  Height:  |  Size: 436 B

After

Width:  |  Height:  |  Size: 436 B

View file

Before

Width:  |  Height:  |  Size: 520 B

After

Width:  |  Height:  |  Size: 520 B

View file

Before

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 273 B

View file

Before

Width:  |  Height:  |  Size: 225 B

After

Width:  |  Height:  |  Size: 225 B

View file

Before

Width:  |  Height:  |  Size: 255 B

After

Width:  |  Height:  |  Size: 255 B

View file

Before

Width:  |  Height:  |  Size: 301 B

After

Width:  |  Height:  |  Size: 301 B

View file

Before

Width:  |  Height:  |  Size: 430 B

After

Width:  |  Height:  |  Size: 430 B

View file

Before

Width:  |  Height:  |  Size: 336 B

After

Width:  |  Height:  |  Size: 336 B

View file

Before

Width:  |  Height:  |  Size: 302 B

After

Width:  |  Height:  |  Size: 302 B

View file

Before

Width:  |  Height:  |  Size: 424 B

After

Width:  |  Height:  |  Size: 424 B

View file

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 414 B

View file

Before

Width:  |  Height:  |  Size: 435 B

After

Width:  |  Height:  |  Size: 435 B

View file

@ -266,8 +266,8 @@ minetest.register_craft({
minetest.register_craft({
output = "mcl_mobitems:feather 3",
recipe = {
{ "flowers:oxeye_daisy" },
{ "flowers:oxeye_daisy" },
{ "mcl_flowers:oxeye_daisy" },
{ "mcl_flowers:oxeye_daisy" },
}
})