master
HybridDog 2013-07-19 18:41:39 +02:00
parent b91481dc6b
commit 9882b7c967
23 changed files with 96 additions and 14 deletions

View File

@ -1,11 +1,10 @@
-- Crafting of extrablocks
minetest.register_craft({
output = "wool:white 9",
output = "extrablocks:eating_chest",
recipe = {
{"default:leaves", "default:leaves", "default:leaves"},
{"default:leaves", "default:leaves", "default:leaves"},
{"default:leaves", "default:leaves", "default:leaves"}
{"default:apple"},
{"default:chest"}
}
})
@ -17,18 +16,11 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "extrablocks:flour 8",
recipe = {
{"extrablocks:wheat"},
}
})
minetest.register_craft({
output = "extrablocks:muffin_uncooked 7",
recipe = {
{"extrablocks:sugar", "extrablocks:sugar", "extrablocks:sugar"},
{"extrablocks:flour", "extrablocks:flour", "extrablocks:flour"},
{"farming:flour", "farming:flour", "farming:flour"},
{"default:paper", "bucket:bucket_water", "default:paper"},
},
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}},
@ -38,7 +30,7 @@ minetest.register_craft({
output = "extrablocks:torte 2",
recipe = {
{"extrablocks:muffin", "extrablocks:sugar", "extrablocks:muffin"},
{"extrablocks:flour", "extrablocks:flour", "extrablocks:flour"},
{"farming:flour", "farming:flour", "farming:flour"},
{"bucket:bucket_water", "extrablocks:muffin", "bucket:bucket_water"},
},
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}, {"bucket:bucket_water", "bucket:bucket_empty"}},

View File

@ -87,6 +87,29 @@ minetest.register_node("extrablocks:"..name, {
end
plantnode("wheat", "Weizen", {-1/3, -1/2, -1/3, 1/3, 1/4, 1/3})
plantnode("dry_grass", "Dry Grass", {-1/3, -1/2, -1/3, 1/3, 1/4, 1/3})
minetest.register_node("extrablocks:bush", {
description = "Bush",
drawtype = "nodebox",
tiles = {"extrablocks_bush_top.png", "extrablocks_bush_bottom.png", "extrablocks_bush.png"},
inventory_image = "extrablocks_bush.png",
paramtype = "light",
walkable = false,
node_box = {
type = "fixed",
fixed = {
{-1/16, -8/16, -1/16, 1/16, -6/16, 1/16},
{-4/16, -6/16, -4/16, 4/16, 5/16, 4/16},
{-5/16, -5/16, -5/16, 5/16, 3/16, 5/16},
{-6/16, -4/16, -6/16, 6/16, 2/16, 6/16},
{-6.5/16, -3/16, -6.5/16, 6.5/16, -2/16, 6.5/16},
{-3/16, 5/16, -3/16, 3/16, 6/16, 3/16},
{-2/16, 5/16, -2/16, 2/16, 7/16, 2/16},
}
},
groups = {snappy=3,flammable=2,attached_node=1},
sounds = default.node_sound_defaults(),
})
---------------------------------------------------pl-----------------------------------------------------------------
local function fencelikenode(name, desc)
@ -180,6 +203,63 @@ minetest.register_node("extrablocks:torte", {
})
minetest.register_node("extrablocks:eating_chest", {
description = "Eating Chest",
tiles = {{name="extrablocks_eating_chest.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1.5}},
"default_chest_top.png", "default_chest_side.png"},
groups = {choppy=2,oddly_breakable_by_hand=2},
sounds = default.node_sound_wood_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", default.chest_formspec)
meta:set_string("infotext", "Hungry Chest")
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
end,
can_dig = function(pos,player)
local meta = minetest.get_meta(pos);
local inv = meta:get_inventory()
return inv:is_empty("main")
end,
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
minetest.log("action", player:get_player_name()..
" moves stuff in hungry chest at "..minetest.pos_to_string(pos))
end,
on_metadata_inventory_put = function(pos, listname, index, stack, player)
minetest.log("action", player:get_player_name()..
" moves stuff to hungry chest at "..minetest.pos_to_string(pos))
end,
on_metadata_inventory_take = function(pos, listname, index, stack, player)
minetest.log("action", player:get_player_name()..
" takes stuff from hungry chest at "..minetest.pos_to_string(pos))
end,
})
minetest.register_abm({
nodenames = {"extrablocks:eating_chest"},
interval = 1,
chance = 1,
action = function(pos, node)
local inv = minetest.env:get_meta(pos):get_inventory()
for _, object in pairs(minetest.env:get_objects_inside_radius({x = pos.x, y = pos.y+0.5, z = pos.z}, .5)) do
l = object:get_luaentity()
if not object:is_player() and l and l.name == "__builtin:item" then
item = l.itemstring
if item ~= "" then
if inv:room_for_item("main", item) then
inv:add_item("main", item)
object:remove()
minetest.sound_play("survival_hunger_eat", {pos = pos, gain = 0.5, max_hear_distance = 10})--sounds from hungry games
print("[extrablocks] a hungry chest ("..pos.x..", "..pos.y..", "..pos.z..") ate "..item)
end
end
end
end
end,
})
local function moitem(name, desc)
minetest.register_craftitem("extrablocks:"..name, {
description = desc,
@ -187,7 +267,6 @@ minetest.register_craftitem("extrablocks:"..name, {
})
end
moitem("lapis_lazuli_lump", "Lapis Lazuli")
moitem("flour", "Flour")
moitem("sugar", "Sugar")
moitem("muffin_uncooked", "Put me into the furnace!")
moitem("iringnite_lump", "Iringnite Lump")
@ -251,6 +330,17 @@ minetest.register_ore({
noise_params = {offset=0, scale=1, spread={x=10, y=10, z=10}, seed=114, octaves=3, persist=0.70}
})
minetest.register_ore({
ore_type = "sheet",
ore = "default:cobble",
wherein = "air",
clust_size = 1,
height_min = 100,
height_max = 320,
noise_params = {offset=0, scale=1, spread={x=1, y=1, z=1}, seed=114, octaves=3, persist=0.70}
})
extrablocks = {}

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

BIN
rest/default_chest_lock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 864 B

BIN
rest/default_chest_side.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 709 B

BIN
rest/default_chest_top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

View File

Before

Width:  |  Height:  |  Size: 258 B

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 474 B

BIN
rest/m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

BIN
rest/mmm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

BIN
rest/o2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
sounds/survival_hunger_eat.wav Executable file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 540 B

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB