Add Teleportation Wand

This commit is contained in:
IamPyu 2024-12-15 13:41:29 -06:00
parent 0030fdc506
commit 8830e18c25
3 changed files with 34 additions and 0 deletions

View File

@ -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"},
}
})

View File

@ -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
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B