flowers fix

master
Victor Hackeridze 2012-03-14 16:07:07 +06:00
parent bb3986816b
commit d8007c5301
19 changed files with 32 additions and 58 deletions

View File

@ -1,2 +1 @@
default

View File

@ -7,15 +7,16 @@ math.randomseed(os.time())
local DEBUG = 0
local FLOWERS = {
"rose",
"dandelion_yellow",
"dandelion_white",
"tulip",
"viola",
"red",
"yellow",
"white",
"orange",
"violet",
"cotton",
}
local MAX_RATIO = 2000
local GROWING_DELAY = 3600
local GROWING_DELAY = 7200
-- Local Functions
local dbg = function(s)
@ -121,6 +122,12 @@ minetest.register_craftitem('flowers:flower_pot', {
material = minetest.digprop_constanttime(0.5),
})
minetest.register_craftitem('flowers:cotton', {
image = 'cotton.png',
furnace_burntime = 15;
on_place_on_ground = minetest.craftitem_place_item,
})
for _, color in ipairs(FLOWERS) do
local fname = 'flower_' .. color
local pname = fname .. '_pot'
@ -151,7 +158,7 @@ for _, color in ipairs(FLOWERS) do
local pname = fname .. '_pot'
minetest.register_craft({
output = 'CraftItem "' .. pname .. '" 1',
output = 'CraftItem "' .. pname .. '" 9',
recipe = {
{'NodeItem "' .. fname .. '" 1'},
{'CraftItem "flowers:flower_pot" 1'},
@ -159,22 +166,35 @@ for _, color in ipairs(FLOWERS) do
})
end
minetest.register_craft({
output = 'CraftItem "flowers:cotton" 1',
recipe = {
{'NodeItem "flowers:flower_cotton" 1'},
}
})
-- Make it grow !
grow_blocks_on_surfaces(GROWING_DELAY * 2, {
"flowers:flower_rose",
"flowers:flower_dandelion_white",
"flowers:flower_viola",
"flowers:flower_red",
"flowers:flower_white",
"flowers:flower_violet",
}, {
{name = "dirt_with_grass", chance = 4, spacing = 15},
})
grow_blocks_on_surfaces(GROWING_DELAY, {
"flowers:flower_dandelion_yellow",
"flowers:flower_tulip",
"flowers:flower_yellow",
"flowers:flower_orange",
}, {
{name = "dirt_with_grass", chance = 2, spacing = 10},
})
grow_blocks_on_surfaces(GROWING_DELAY*2, {
"flowers:flower_cotton",
}, {
{name = "dirt_with_grass", chance = 5, spacing = 7},
})
grow_blocks_on_surfaces(GROWING_DELAY / 2, {
"flowers:flower_waterlily",
}, {

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

View File

Before

Width:  |  Height:  |  Size: 159 B

After

Width:  |  Height:  |  Size: 159 B

View File

Before

Width:  |  Height:  |  Size: 470 B

After

Width:  |  Height:  |  Size: 470 B

View File

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 171 B

View File

Before

Width:  |  Height:  |  Size: 479 B

After

Width:  |  Height:  |  Size: 479 B

View File

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 140 B

View File

Before

Width:  |  Height:  |  Size: 465 B

After

Width:  |  Height:  |  Size: 465 B

View File

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 169 B

View File

Before

Width:  |  Height:  |  Size: 464 B

After

Width:  |  Height:  |  Size: 464 B

View File

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 166 B

View File

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 462 B

View File

@ -1 +0,0 @@
default

View File

@ -1,44 +0,0 @@
minetest.register_craft({
output = 'CraftItem "steel_ingot" 9',
recipe = {
{'NodeItem "steelblock"'},
}
})
minetest.register_craft({
output = 'NodeItem "wood" 4',
recipe = {
{'NodeItem "jungletree"'},
}
})
minetest.register_craft({
output = 'node "moarcraft:stone_brick" 4',
recipe = {
{'node "default:stone"','node "default:stone"'},
{'node "default:stone"','node "default:stone"'},
}
})
minetest.register_node("moarcraft:stone_brick", {
tile_images = {"default_stone.png^moarcraft_stone_brick.png"},
inventory_image = minetest.inventorycube("default_stone.png^moarcraft_stone_brick.png"),
paramtype = "mineral",
is_ground_content = true,
often_contains_mineral = true, -- Texture atlas hint
material = minetest.digprop_stonelike(1.7),
dug_item = 'node "moarcraft:stone_brick" 1',
})
minetest.register_craftitem(":default:stick", {
image = "default_stick.png",
cookresult_itemstring = 'craft "moarcraft:ash" 1',
on_place_on_ground = minetest.craftitem_place_item,
})
minetest.register_craftitem("moarcraft:ash", {
image = "moarcraft_ash.png",
on_place_on_ground = minetest.craftitem_place_item,
})
print("[Moarcraft] Loaded!")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 607 B