forked from mtcontrib/minetest_returnmirror
Update legacy code
This commit is contained in:
parent
b415088b74
commit
abde0ee1dc
|
@ -1,4 +1,3 @@
|
||||||
mana?
|
mana?
|
||||||
intllib?
|
|
||||||
doc?
|
doc?
|
||||||
doc_items?
|
doc_items?
|
||||||
|
|
9
init.lua
9
init.lua
|
@ -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))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user