1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 14:16:06 +02:00

MinetestForFun Game : Update all (but doors)

- Everything is updated, except doors
 - Some textures are moved to other mods (removed from default, but still used by those mods)
This commit is contained in:
LeMagnesium
2016-04-09 21:56:43 +02:00
parent 9a649b77f0
commit de031dddf1
79 changed files with 1673 additions and 1348 deletions

View File

@ -24,54 +24,29 @@ minetest.register_node("vessels:shelf", {
local meta = minetest.get_meta(pos)
meta:set_string("formspec", vessels_shelf_formspec)
local inv = meta:get_inventory()
inv:set_size("vessels", 8*2)
inv:set_size("vessels", 8 * 2)
end,
can_dig = function(pos,player)
local meta = minetest.get_meta(pos);
local inv = meta:get_inventory()
local inv = minetest.get_meta(pos):get_inventory()
return inv:is_empty("vessels")
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local to_stack = inv:get_stack(listname, index)
if listname == "vessels" then
if minetest.get_item_group(stack:get_name(), "vessel") ~= 0
and to_stack:is_empty() then
return 1
else
return 0
end
if minetest.get_item_group(stack:get_name(), "vessel") ~= 0 then
return stack:get_count()
end
return 0
end,
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local stack = inv:get_stack(from_list, from_index)
local to_stack = inv:get_stack(to_list, to_index)
if to_list == "vessels" then
if minetest.get_item_group(stack:get_name(), "vessel") ~= 0
and to_stack:is_empty() then
return 1
else
return 0
end
end
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 vessels shelf at "..minetest.pos_to_string(pos))
minetest.log("action", player:get_player_name() ..
" moves stuff in vessels shelf 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 vessels shelf at "..minetest.pos_to_string(pos))
minetest.log("action", player:get_player_name() ..
" moves stuff to vessels shelf 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 vessels shelf at "..minetest.pos_to_string(pos))
minetest.log("action", player:get_player_name() ..
" takes stuff from vessels shelf at ".. minetest.pos_to_string(pos))
end,
})