forked from mtcontrib/minetest_returnmirror
First prototype
This commit is contained in:
commit
2f265172d5
1
depends.txt
Normal file
1
depends.txt
Normal file
@ -0,0 +1 @@
|
||||
mana
|
1
description.txt
Normal file
1
description.txt
Normal file
@ -0,0 +1 @@
|
||||
Adds the “Mirror of Returning”, a magical item which returns the user to a preset point.
|
27
init.lua
Normal file
27
init.lua
Normal file
@ -0,0 +1,27 @@
|
||||
returnmirror = {}
|
||||
returnmirror.cost = 100
|
||||
returnmirror.file = minetest.get_worldpath() .. "/returnmirror.mt"
|
||||
|
||||
returnmirror.write = function()
|
||||
|
||||
end
|
||||
|
||||
|
||||
returnmirror.load = function()
|
||||
|
||||
end
|
||||
|
||||
|
||||
minetest.register_tool("returnmirror:returnmirror", {
|
||||
description = "Mirror of Returning",
|
||||
stack_max = 1,
|
||||
inventory_image = "returnmirror_returnmirror.png",
|
||||
wield_image = "returnmirror_returnmirror.png",
|
||||
tool_capabilities = {},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if mana.subtract(user:get_player_name(), returnmirror.cost) then
|
||||
user:setpos({x=0, y=0, z=0})
|
||||
return nil
|
||||
end
|
||||
end,
|
||||
})
|
BIN
textures/returnmirror_returnmirror.png
Normal file
BIN
textures/returnmirror_returnmirror.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 466 B |
Loading…
Reference in New Issue
Block a user