Initial commit: Import version 0.3
This commit is contained in:
commit
8081404416
1
depends.txt
Normal file
1
depends.txt
Normal file
@ -0,0 +1 @@
|
||||
intllib?
|
1
description.txt
Normal file
1
description.txt
Normal 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
26
init.lua
Normal 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
1
locale/de.txt
Normal file
@ -0,0 +1 @@
|
||||
point teleporter = Zeigeteleporter
|
1
locale/template.txt
Normal file
1
locale/template.txt
Normal file
@ -0,0 +1 @@
|
||||
point teleporter
|
BIN
sounds/teletool_teleport1.ogg
Normal file
BIN
sounds/teletool_teleport1.ogg
Normal file
Binary file not shown.
BIN
sounds/teletool_teleport2.ogg
Normal file
BIN
sounds/teletool_teleport2.ogg
Normal file
Binary file not shown.
BIN
textures/teletool_teletool.png
Normal file
BIN
textures/teletool_teletool.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 395 B |
Loading…
x
Reference in New Issue
Block a user