Initial commit: Import version 0.3

master
Wuzzy 2014-07-14 16:32:20 +02:00
commit 8081404416
8 changed files with 30 additions and 0 deletions

1
depends.txt Normal file
View File

@ -0,0 +1 @@
intllib?

1
description.txt Normal file
View File

@ -0,0 +1 @@
Adds a short-distance teleportation device which allows the user to instantly change the position in front of a pointed node.

26
init.lua Normal file
View File

@ -0,0 +1,26 @@
if (minetest.get_modpath("intllib")) then
dofile(minetest.get_modpath("intllib").."/intllib.lua")
S = intllib.Getter(minetest.get_current_modname())
else
S = function ( s ) return s end
end
minetest.register_tool("teletool:teletool", {
description = S("point teleporter"),
range = 20.0,
tool_capabilities = {},
wield_image = "teletool_teletool.png",
inventory_image = "teletool_teletool.png",
on_use = function(itemstack, user, pointed_thing)
if(pointed_thing.type == "node") then
pos = pointed_thing.above
local over1 = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
local over2 = minetest.get_node({x=pos.x,y=pos.y+2,z=pos.z})
local src = user:getpos()
local dest = {x=pos.x, y=math.ceil(pos.y)-0.5, z=pos.z}
minetest.sound_play( {name="teletool_teleport1", gain=1}, {pos=src, max_hear_distance=12})
user:setpos(dest)
minetest.after(0.5, function(dest) minetest.sound_play( {name="teletool_teleport2", gain=1}, {pos=dest, max_hear_distance=12}) end, dest)
end
end,
})

1
locale/de.txt Normal file
View File

@ -0,0 +1 @@
point teleporter = Zeigeteleporter

1
locale/template.txt Normal file
View File

@ -0,0 +1 @@
point teleporter

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B