From 8830e18c25b98f1d7f6685e9fd9e11c3f6f6db02 Mon Sep 17 00:00:00 2001 From: IamPyu Date: Sun, 15 Dec 2024 13:41:29 -0600 Subject: [PATCH] Add Teleportation Wand --- mods/ITEMS/pyutest_crafts/tools.lua | 9 +++++++++ mods/ITEMS/pyutest_magic/wands.lua | 25 ++++++++++++++++++++++++ textures/pyutest-teleportation-wand.png | Bin 0 -> 179 bytes 3 files changed, 34 insertions(+) create mode 100644 textures/pyutest-teleportation-wand.png diff --git a/mods/ITEMS/pyutest_crafts/tools.lua b/mods/ITEMS/pyutest_crafts/tools.lua index d37dbe2..6924260 100644 --- a/mods/ITEMS/pyutest_crafts/tools.lua +++ b/mods/ITEMS/pyutest_crafts/tools.lua @@ -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"}, + } +}) diff --git a/mods/ITEMS/pyutest_magic/wands.lua b/mods/ITEMS/pyutest_magic/wands.lua index d03deda..dc7bd38 100644 --- a/mods/ITEMS/pyutest_magic/wands.lua +++ b/mods/ITEMS/pyutest_magic/wands.lua @@ -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 +}) diff --git a/textures/pyutest-teleportation-wand.png b/textures/pyutest-teleportation-wand.png new file mode 100644 index 0000000000000000000000000000000000000000..b71a779e649ed3272bd9fb25c19acb5c75b6c8dc GIT binary patch literal 179 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Rh}-6Ar`%FCn@qBP~dU3-)zgU z&i%o^>x`^TEY0t(NGLCvFmvWr)0frzRV8$~W-fj2%#n7~=0Tvrx8q($-fvV_9jNY? zSe#+JN?|EW_FI!mo7B}aB0D@fRve7he>G=v5LeMThK8u@$J3a2?|JRJcCW4O2e-tI d`Ww>USW-g#99x|)e+9aN!PC{xWt~$(698&aMDPFr literal 0 HcmV?d00001