Update legacy code

This commit is contained in:
Wuzzy 2020-02-07 06:22:54 +01:00
parent b415088b74
commit abde0ee1dc
2 changed files with 2 additions and 8 deletions

View File

@ -1,4 +1,3 @@
mana? mana?
intllib?
doc? doc?
doc_items? doc_items?

View File

@ -1,9 +1,4 @@
local S local S = minetest.get_translator("returnmirror")
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 returnmirror = {} local returnmirror = {}
returnmirror.cost_teleport = 200 returnmirror.cost_teleport = 200
@ -47,7 +42,7 @@ returnmirror.set_position_inactive = function(itemstack, user, pointed_thing)
end end
end end
local pos = user:getpos() local pos = user:get_pos()
if returnmirror.mana_check(user, returnmirror.cost_set) then if returnmirror.mana_check(user, returnmirror.cost_set) then
local newitem = ItemStack("returnmirror:mirror_active") local newitem = ItemStack("returnmirror:mirror_active")
newitem:set_metadata(minetest.pos_to_string(pos)) newitem:set_metadata(minetest.pos_to_string(pos))