fix nil function call in ownership code

This commit is contained in:
Vanessa Ezekowitz 2013-10-16 10:01:34 -04:00
parent e613e96360
commit 6eafd7da6d
2 changed files with 10 additions and 0 deletions

View File

@ -3,6 +3,8 @@
ilights = {}
ilights.intllib_modpath = minetest.get_modpath("intllib")
if minetest.get_modpath("unified_inventory") or not minetest.setting_getbool("creative_mode") then
ilights.expect_infinite_stacks = false
else

View File

@ -1,5 +1,13 @@
-- simple function to check for ownership of a node before placing it.
local S
if ilights.intllib_modpath then
dofile(ilights.intllib_modpath.."/intllib.lua")
S = intllib.Getter(minetest.get_current_modname())
else
S = function ( s ) return s end
end
function ilights:node_is_owned(pos, placer)
local ownername = false
if type(IsPlayerNodeOwner) == "function" then -- node_ownership mod