From 6eafd7da6daad6194dd43b2776c8d7ba8aacf83c Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Wed, 16 Oct 2013 10:01:34 -0400 Subject: [PATCH] fix nil function call in ownership code --- init.lua | 2 ++ ownership.lua | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/init.lua b/init.lua index dc8e2f0..42154cc 100644 --- a/init.lua +++ b/init.lua @@ -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 diff --git a/ownership.lua b/ownership.lua index 8406c5b..381a6ee 100644 --- a/ownership.lua +++ b/ownership.lua @@ -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