diff --git a/depends.txt b/depends.txt index dc9465e..3884e03 100644 --- a/depends.txt +++ b/depends.txt @@ -1,4 +1,3 @@ mana? -intllib? doc? doc_items? diff --git a/init.lua b/init.lua index c6accb6..c88cb90 100644 --- a/init.lua +++ b/init.lua @@ -1,9 +1,4 @@ -local S -if (minetest.get_modpath("intllib")) then - S = intllib.Getter() -else - S = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end -end +local S = minetest.get_translator("returnmirror") local returnmirror = {} returnmirror.cost_teleport = 200 @@ -47,7 +42,7 @@ returnmirror.set_position_inactive = function(itemstack, user, pointed_thing) end end - local pos = user:getpos() + local pos = user:get_pos() if returnmirror.mana_check(user, returnmirror.cost_set) then local newitem = ItemStack("returnmirror:mirror_active") newitem:set_metadata(minetest.pos_to_string(pos))