Localize some functions.
This commit is contained in:
parent
70a706e6be
commit
2bc38a79a3
1 changed files with 5 additions and 2 deletions
|
@ -1,7 +1,10 @@
|
||||||
|
local get_node_or_nil = minetest.get_node_or_nil
|
||||||
|
local get_item_group = minetest.get_item_group
|
||||||
|
|
||||||
local old_is_protected = minetest.is_protected
|
local old_is_protected = minetest.is_protected
|
||||||
function minetest.is_protected(pos, name)
|
function minetest.is_protected(pos, name)
|
||||||
local node = minetest.get_node_or_nil(pos)
|
local node = get_node_or_nil(pos)
|
||||||
if node and minetest.get_item_group(node.name, "fortress") ~= 0 then
|
if node and get_item_group(node.name, "fortress") ~= 0 then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return old_is_protected(pos, name)
|
return old_is_protected(pos, name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue