Add Teleportation Wand
This commit is contained in:
parent
0030fdc506
commit
8830e18c25
@ -158,3 +158,12 @@ core.register_craft({
|
||||
{"pyutest_tools:basalt_stick"},
|
||||
}
|
||||
})
|
||||
|
||||
core.register_craft({
|
||||
output = "pyutest_magic:teleportation_wand",
|
||||
recipe = {
|
||||
{"pyutest_magic:windball"},
|
||||
{"pyutest_tools:basalt_stick"},
|
||||
{"pyutest_tools:basalt_stick"},
|
||||
}
|
||||
})
|
||||
|
@ -196,3 +196,28 @@ PyuTest.make_wand("pyutest_magic:water_wand", "Water Wand", "pyutest-water-wand.
|
||||
end)
|
||||
end
|
||||
})
|
||||
|
||||
PyuTest.make_wand("pyutest_magic:teleportation_wand", "Teleportation Wand", "pyutest-teleportation-wand.png",
|
||||
40, {
|
||||
textures = {
|
||||
"pyutest-crystal-lantern.png",
|
||||
"pyutest-crystal-lantern.png",
|
||||
"pyutest-crystal-lantern.png",
|
||||
"pyutest-crystal-lantern.png",
|
||||
"pyutest-crystal-lantern.png",
|
||||
"pyutest-crystal-lantern.png",
|
||||
}
|
||||
}, {
|
||||
predicate = function (entity)
|
||||
local pos = entity.object:get_pos()
|
||||
local node = core.get_node(pos)
|
||||
|
||||
local walkable = core.registered_nodes[node.name].walkable
|
||||
return walkable
|
||||
end,
|
||||
|
||||
action = function (entity)
|
||||
|
||||
entity._owner:set_pos(entity.object:get_pos() + vector.new(0, 1, 0))
|
||||
end
|
||||
})
|
||||
|
BIN
textures/pyutest-teleportation-wand.png
Normal file
BIN
textures/pyutest-teleportation-wand.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 179 B |
Loading…
x
Reference in New Issue
Block a user