commit 2f265172d54081dfbc0d4a0ac3b65d3958af4dee Author: Wuzzy Date: Fri Feb 13 21:43:24 2015 +0100 First prototype diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..d06ef53 --- /dev/null +++ b/depends.txt @@ -0,0 +1 @@ +mana diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..49a8fae --- /dev/null +++ b/description.txt @@ -0,0 +1 @@ +Adds the “Mirror of Returning”, a magical item which returns the user to a preset point. diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..6f81bda --- /dev/null +++ b/init.lua @@ -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, +}) diff --git a/textures/returnmirror_returnmirror.png b/textures/returnmirror_returnmirror.png new file mode 100644 index 0000000..c1d6f2d Binary files /dev/null and b/textures/returnmirror_returnmirror.png differ