Default game has flowers now, so this removes all duplicate stuff from

my flowers mod, and renames it to flowers_plus.
This commit is contained in:
Vanessa Ezekowitz
2013-04-25 17:18:21 -04:00
parent 6cd55af894
commit 680e802af0
24 changed files with 9 additions and 29 deletions

1
flowers_plus/depends.txt Normal file
View File

@ -0,0 +1 @@
plants_lib

View File

@ -0,0 +1,24 @@
Changelog
---------
2012-08-06: Tweaked selection boxes on all nodes. Tweaked seaweed to use
signlike instead of raillike drawtype, (still forced to only spawn flat as
usual). Adjusted light level limits to give it more time to grow. Created
this changelog file using github commit messages as the basis. Shrunk the
geranium flower down a bit to better match the others.
2012-08-03: Tuned out the random-numbers-inside-ABM stuff. Uses the ABM's
chance setting instead. Should be approximately the same as before, but
hopefully using a tad less CPU. Minor tweak to ABM interval/growing delay.
2012-08-01: Added blue geranium to the collection of flowers.
2012-07-31: Disable debug by default.
2012-07-30: many updates over the course of the day - first commit, removed
some redundant files, added wield/inventory image entries for each item, to
force the game to draw them properly (these shouldn't be needed, must be a
bug). Tweaked spawn code so that the radius check also includes the name of
the item being spawned as well as items in group:flower, that way all items can
have a radius test, and not just those in group:flower. Fiddled with the spawn
rates a bit.

329
flowers_plus/init.lua Normal file
View File

@ -0,0 +1,329 @@
-- This file supplies a few additional flowers and some related crafts
-- for the plantlife modpack. Last revision: 2013-04-24
local SPAWN_DELAY = 1000
local SPAWN_CHANCE = 200
local flowers_seed_diff = 329
-- register cotton plant
minetest.register_node(":flowers:cotton_plant", {
description = flowerdesc,
drawtype = "plantlike",
tiles = { "flowers_cotton_plant.png" },
inventory_image = "flowers_cotton_plant.png",
wield_image = "flowers_cotton_plant.png",
sunlight_propagates = true,
paramtype = "light",
walkable = false,
buildable_to = true,
groups = { snappy = 3,flammable=2, flower=1, attached_node=1 },
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
},
buildable_to = true,
})
minetest.register_alias("flowers:flower_cotton", "flowers:cotton_plant")
minetest.register_alias("flowers:flower_cotton_pot", "flowers:potted_cotton_plant")
-- register the various rotations of waterlilies
minetest.register_node(":flowers:waterlily", {
description = "Waterlily",
drawtype = "nodebox",
tiles = { "flowers_waterlily.png" },
inventory_image = "flowers_waterlily.png",
wield_image = "flowers_waterlily.png",
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = { snappy = 3,flammable=2,flower=1 },
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
},
buildable_to = true,
})
minetest.register_node(":flowers:waterlily_225", {
description = "Waterlily",
drawtype = "nodebox",
tiles = { "flowers_waterlily_22.5.png" },
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 },
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
},
drop = "flowers:waterlily",
buildable_to = true,
})
minetest.register_node(":flowers:waterlily_45", {
description = "Waterlily",
drawtype = "raillike",
tiles = { "flowers_waterlily_45.png" },
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 },
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
},
drop = "flowers:waterlily",
buildable_to = true,
})
minetest.register_node(":flowers:waterlily_675", {
description = "Waterlily",
drawtype = "nodebox",
tiles = { "flowers_waterlily_67.5.png" },
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 },
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
},
drop = "flowers:waterlily",
buildable_to = true,
})
minetest.register_node(":flowers:seaweed", {
description = "Seaweed",
drawtype = "signlike",
tiles = { "flowers_seaweed.png" },
inventory_image = "flowers_seaweed.png",
wield_image = "flowers_seaweed.png",
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "wallmounted",
walkable = false,
groups = { snappy = 3,flammable=2,flower=1 },
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, -0.4, 0.5 },
},
buildable_to = true,
})
-- register all potted plant nodes, crafts, and most backward-compat aliases
local flowers_list = {
{ "Rose", "rose"},
{ "Tulip", "tulip"},
{ "Yellow Dandelion", "dandelion_yellow"},
{ "White Dandelion", "dandelion_white"},
{ "Blue Geranium", "geranium"},
{ "Viola", "viola"},
{ "Cotton Plant", "cotton_plant"},
}
for i in ipairs(flowers_list) do
local flowerdesc = flowers_list[i][1]
local flower = flowers_list[i][2]
minetest.register_node(":flowers:potted_"..flower, {
description = "Potted "..flowerdesc,
drawtype = "plantlike",
tiles = { "flowers_potted_"..flower..".png" },
inventory_image = "flowers_potted_"..flower..".png",
wield_image = "flowers_potted_"..flower..".png",
sunlight_propagates = true,
paramtype = "light",
walkable = false,
groups = { snappy = 3,flammable=2 },
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0.5, 0.25 },
},
})
minetest.register_craft( {
type = "shapeless",
output = "flowers:potted_"..flower,
recipe = {
"flowers:flower_pot",
"flowers:flower_"..flower
}
})
minetest.register_alias("flowers:flower_"..flower.."_pot", "flowers:potted_"..flower)
end
local extra_aliases = {
"waterlily",
"waterlily_225",
"waterlily_45",
"waterlily_675",
"seaweed"
}
for i in ipairs(extra_aliases) do
flower = extra_aliases[i]
minetest.register_alias("flowers:flower_"..flower, "flowers:"..flower)
end
-- spawn ABM registrations
plantslib:spawn_on_surfaces({
spawn_delay = SPAWN_DELAY,
spawn_plants = {
"flowers:rose",
"flowers:tulip",
"flowers:geranium",
"flowers:viola",
},
avoid_radius = 10,
spawn_chance = SPAWN_CHANCE*2,
spawn_surfaces = {"default:dirt_with_grass"},
avoid_nodes = {"group:flower", "group:poisonivy"},
seed_diff = flowers_seed_diff,
light_min = 9
})
plantslib:spawn_on_surfaces({
spawn_delay = SPAWN_DELAY,
spawn_plants = {
"flowers:dandelion_yellow",
"flowers:dandelion_white",
"flowers:cotton_plant",
},
avoid_radius = 7,
spawn_chance = SPAWN_CHANCE,
spawn_surfaces = {"default:dirt_with_grass"},
avoid_nodes = {"group:flower", "group:poisonivy"},
seed_diff = flowers_seed_diff,
light_min = 9
})
plantslib:spawn_on_surfaces({
spawn_delay = SPAWN_DELAY/2,
spawn_plants = {
"flowers:waterlily",
"flowers:waterlily_225",
"flowers:waterlily_45",
"flowers:waterlily_675"
},
avoid_radius = 2.5,
spawn_chance = SPAWN_CHANCE*4,
spawn_surfaces = {"default:water_source"},
avoid_nodes = {"group:flower"},
seed_diff = flowers_seed_diff,
light_min = 9,
depth_max = 2,
random_facedir = {0,3}
})
plantslib:spawn_on_surfaces({
spawn_delay = SPAWN_DELAY*2,
spawn_plants = {"flowers:seaweed"},
spawn_chance = SPAWN_CHANCE*2,
spawn_surfaces = {"default:water_source"},
avoid_nodes = {"group:flower"},
seed_diff = flowers_seed_diff,
light_min = 4,
light_max = 10,
neighbors = {"default:dirt_with_grass"},
facedir = 1
})
plantslib:spawn_on_surfaces({
spawn_delay = SPAWN_DELAY*2,
spawn_plants = {"flowers:seaweed"},
spawn_chance = SPAWN_CHANCE*2,
spawn_surfaces = {"default:dirt_with_grass"},
avoid_nodes = {"group:flower"},
seed_diff = flowers_seed_diff,
light_min = 4,
light_max = 10,
neighbors = {"default:water_source"},
ncount = 1,
facedir = 1
})
plantslib:spawn_on_surfaces({
spawn_delay = SPAWN_DELAY*2,
spawn_plants = {"flowers:seaweed"},
spawn_chance = SPAWN_CHANCE*2,
spawn_surfaces = {"default:stone"},
avoid_nodes = {"group:flower"},
seed_diff = flowers_seed_diff,
light_min = 4,
light_max = 10,
neighbors = {"default:water_source"},
ncount = 6,
facedir = 1
})
-- crafting recipes!
minetest.register_craftitem(":flowers:flower_pot", {
description = "Flower Pot",
inventory_image = "flowers_flowerpot.png",
})
minetest.register_craft( {
output = "flowers:flower_pot",
recipe = {
{ "default:clay_brick", "", "default:clay_brick" },
{ "", "default:clay_brick", "" }
},
})
minetest.register_alias("flowers:cotton", "flowers:cotton_wad")
minetest.register_craftitem(":flowers:cotton_wad", {
description = "Cotton wad",
image = "flowers_cotton_wad.png",
})
minetest.register_craft({
output = "flowers:cotton_wad 3",
recipe ={
{"flowers:cotton_plant"},
}
})
minetest.register_craft({
output = "wool:white 2",
recipe = {
{'flowers:cotton_wad', 'flowers:cotton_wad', ''},
{'flowers:cotton_wad', 'flowers:cotton_wad', ''},
}
})
print("[Flowers] Loaded.")

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B