forked from VoxeLibre/VoxeLibre
Compare commits
2 Commits
master
...
smithing_t
Author | SHA1 | Date |
---|---|---|
Mikita Wiśniewski | d0380647f2 | |
cora | 4f6a95d6a4 |
|
@ -167,6 +167,12 @@ minetest.register_node("mcl_smithing_table:table", {
|
||||||
end,
|
end,
|
||||||
|
|
||||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
if minetest.is_protected(pos, name) then
|
||||||
|
minetest.record_protection_violation(pos, name)
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
local stackname = stack:get_name()
|
local stackname = stack:get_name()
|
||||||
local def = stack:get_definition()
|
local def = stack:get_definition()
|
||||||
if
|
if
|
||||||
|
@ -187,6 +193,16 @@ minetest.register_node("mcl_smithing_table:table", {
|
||||||
return 0
|
return 0
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
if minetest.is_protected(pos, name) then
|
||||||
|
minetest.record_protection_violation(pos, name)
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return stack:get_count()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||||
return 0
|
return 0
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue