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