fix nil function call in ownership code
This commit is contained in:
parent
e613e96360
commit
6eafd7da6d
2
init.lua
2
init.lua
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
ilights = {}
|
ilights = {}
|
||||||
|
|
||||||
|
ilights.intllib_modpath = minetest.get_modpath("intllib")
|
||||||
|
|
||||||
if minetest.get_modpath("unified_inventory") or not minetest.setting_getbool("creative_mode") then
|
if minetest.get_modpath("unified_inventory") or not minetest.setting_getbool("creative_mode") then
|
||||||
ilights.expect_infinite_stacks = false
|
ilights.expect_infinite_stacks = false
|
||||||
else
|
else
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
-- simple function to check for ownership of a node before placing it.
|
-- 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)
|
function ilights:node_is_owned(pos, placer)
|
||||||
local ownername = false
|
local ownername = false
|
||||||
if type(IsPlayerNodeOwner) == "function" then -- node_ownership mod
|
if type(IsPlayerNodeOwner) == "function" then -- node_ownership mod
|
||||||
|
Loading…
x
Reference in New Issue
Block a user