mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-31 02:56:26 -04:00
Merge de0e853df6
into fe7a982343
This commit is contained in:
commit
1ef4d0b2c2
2 changed files with 10 additions and 8 deletions
|
@ -1165,11 +1165,11 @@ minetest.register_node("default:chest", {
|
||||||
minetest.log("action", player:get_player_name()..
|
minetest.log("action", player:get_player_name()..
|
||||||
" moves stuff in chest at "..minetest.pos_to_string(pos))
|
" moves stuff in chest at "..minetest.pos_to_string(pos))
|
||||||
end,
|
end,
|
||||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
minetest.log("action", player:get_player_name()..
|
minetest.log("action", player:get_player_name()..
|
||||||
" moves stuff to chest at "..minetest.pos_to_string(pos))
|
" moves stuff to chest at "..minetest.pos_to_string(pos))
|
||||||
end,
|
end,
|
||||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
minetest.log("action", player:get_player_name()..
|
minetest.log("action", player:get_player_name()..
|
||||||
" takes stuff from chest at "..minetest.pos_to_string(pos))
|
" takes stuff from chest at "..minetest.pos_to_string(pos))
|
||||||
end,
|
end,
|
||||||
|
@ -1212,25 +1212,25 @@ minetest.register_node("default:chest_locked", {
|
||||||
end
|
end
|
||||||
return count
|
return count
|
||||||
end,
|
end,
|
||||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
if not has_locked_chest_privilege(meta, player) then
|
if not has_locked_chest_privilege(meta, player) then
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
return stack:get_count()
|
return stack:get_count()
|
||||||
end,
|
end,
|
||||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
if not has_locked_chest_privilege(meta, player) then
|
if not has_locked_chest_privilege(meta, player) then
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
return stack:get_count()
|
return stack:get_count()
|
||||||
end,
|
end,
|
||||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
minetest.log("action", player:get_player_name()..
|
minetest.log("action", player:get_player_name()..
|
||||||
" moves stuff to locked chest at "..minetest.pos_to_string(pos))
|
" moves stuff to locked chest at "..minetest.pos_to_string(pos))
|
||||||
end,
|
end,
|
||||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
minetest.log("action", player:get_player_name()..
|
minetest.log("action", player:get_player_name()..
|
||||||
" takes stuff from locked chest at "..minetest.pos_to_string(pos))
|
" takes stuff from locked chest at "..minetest.pos_to_string(pos))
|
||||||
end,
|
end,
|
||||||
|
@ -1242,6 +1242,8 @@ minetest.register_node("default:chest_locked", {
|
||||||
"default:chest_locked",
|
"default:chest_locked",
|
||||||
get_locked_chest_formspec(pos)
|
get_locked_chest_formspec(pos)
|
||||||
)
|
)
|
||||||
|
else
|
||||||
|
minetest.sound_play("default_chest_locked", {pos = pos})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
@ -1440,8 +1442,8 @@ minetest.register_node("default:rail", {
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
-- but how to specify the dimensions for curved and sideways rails?
|
-- but how to specify the dimensions for curved and sideways rails?
|
||||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||||
},
|
},
|
||||||
groups = {bendy=2,dig_immediate=2,attached_node=1},
|
groups = {bendy=2,dig_immediate=2,attached_node=1},
|
||||||
})
|
})
|
||||||
|
|
BIN
mods/default/sounds/default_chest_locked.0.ogg
Normal file
BIN
mods/default/sounds/default_chest_locked.0.ogg
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue