From 6f66ea9c7dfc4fe2a824623653260ae7101cd996 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Thu, 30 Apr 2020 20:24:58 +0100 Subject: [PATCH] new pad texture, 5.x changes --- README.md | 1 + init.lua | 26 +++++++++++++------------- textures/pad.png | Bin 334 -> 0 bytes textures/padd.png | Bin 201 -> 266 bytes 4 files changed, 14 insertions(+), 13 deletions(-) delete mode 100644 textures/pad.png diff --git a/README.md b/README.md index 5be82d0..96f647f 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ https://forum.minetest.net/viewtopic.php?f=9&t=9234 Change log: +- 1.2 - New teleport pad texture, code tweaks to work with minetest 5.x - 1.1 - Using 0.4.16+ code changes, can only teleport players now, added MineClone2 crafts and spanish translation - 1.0 - Added changes by maybe_dragon to bookmark teleport destination before using pads and potions - 0.9 - Update to newer functions, requires Minetest 0.4.16 to work. diff --git a/init.lua b/init.lua index 899be9c..ab865aa 100644 --- a/init.lua +++ b/init.lua @@ -1,13 +1,13 @@ ---= Teleport Potion mod by TenPlus1 +--= Teleport Potion mod by TenPlus1 (SFX are license free) --- Create teleport potion or pad, place then right-click to enter coords --- and step onto pad or walk into the blue portal light, portal closes after --- 10 seconds, pad remains, potions are throwable... SFX are license Free... +-- Craft teleport potion or pad, use to bookmark location, place to open +-- portal or place pad, portals show a blue flame that you can walk into +-- before it closes (10 seconds), potions can also be thrown for local teleport. -- Load support for intllib. local MP = minetest.get_modpath(minetest.get_current_modname()) -local S, NS = dofile(MP.."/intllib.lua") +local S, NS = dofile(MP .. "/intllib.lua") -- check for MineClone2 local mcl = minetest.get_modpath("mcl_core") @@ -83,7 +83,7 @@ local function set_teleport_destination(playername, dest) pos = dest, gain = 1.0, max_hear_distance = 10 - }) + }, true) end -------------------------------------------------------------------------------- @@ -122,7 +122,7 @@ minetest.register_node("teleport_potion:portal", { pos = pos, gain = 1.0, max_hear_distance = 10 - }) + }, true) minetest.remove_node(pos) end, @@ -167,7 +167,7 @@ local potion_entity = { visual = "sprite", visual_size = {x = 1.0, y = 1.0}, textures = {"potion.png"}, - collisionbox = {0,0,0,0,0,0}, + collisionbox = {-0.1,-0.1,-0.1,0.1,0.1,0.1}, lastpos = {}, player = "", } @@ -201,7 +201,7 @@ potion_entity.on_step = function(self, dtime) pos = self.lastpos, gain = 1.0, max_hear_distance = 5 - }) + }, true) tp_effect(self.lastpos) end @@ -223,7 +223,7 @@ minetest.register_entity("teleport_potion:potion_entity", potion_entity) --- Teleport potion -------------------------------------------------------------------------------- minetest.register_node("teleport_potion:potion", { - tiles = {"pad.png"}, + tiles = {"potion.png"}, drawtype = "signlike", paramtype = "light", paramtype2 = "wallmounted", @@ -347,7 +347,7 @@ minetest.register_node("teleport_potion:pad", { pos = pos, gain = 1.0, max_hear_distance = 10 - }) + }, true) end, -- Show formspec depending on the players privileges. @@ -475,7 +475,7 @@ minetest.register_abm({ pos = pos, gain = 1.0, max_hear_distance = 5 - }) + }, true) -- move player objs[n]:set_pos(target_coords) @@ -488,7 +488,7 @@ minetest.register_abm({ pos = target_coords, gain = 1.0, max_hear_distance = 5 - }) + }, true) -- rotate player to look in pad placement direction local rot = node.param2 diff --git a/textures/pad.png b/textures/pad.png deleted file mode 100644 index a9525ef78dba6134064d501e39eeeed80bde8479..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 334 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa4)6(az2X-zY3-Ut+qcc!wPW4! zqq{DgKmFkTtyixefBg7xa&87t8DmM1UoeBivm0q3PLj8~3quF1tOt<8S>O>_%)r1c z48n{Iv*t(u1=&kHeO=k_vB(LCsva~vumLFKSmGK{;+&tGo0?a`;2h-Y7~&sfrI4PY zn^lmSu25#EXP}@_TAZ1euHfnAuHY5m>aI{`W~8a3P*|FnlUY)!V5?wm%5{8A;~k)3 z@t!V@Asp9}6C9Y1wJ{|`9lh$x>0-Qd+0<5z29`_KR;T7P@Lcce>-#3c#+J67PeCIz zA%V|1-Joe{5U+&9orW&!pa!06J$-#<6UxN4f7vAB+99gwmvCBQ>KvX4a~K#NvC34J TTkm-Rw2Hyg)z4*}Q$iB}M2T-y diff --git a/textures/padd.png b/textures/padd.png index 0f7c9378bdbe2e2f849d822e38c08dcb8b14a001..8ec690674b1aee7daa81dff7d485e428340af63b 100644 GIT binary patch delta 250 zcmVW2%`?wK#F>y4wLL$8 z;K(twojic)Dkfy>sw5rSo*!UiW5d(~QGn1e>FOB>qe0%S;d9|GsD?)j4YqD*3ZNR` zUWDjDQ;n>E31<+>VHZYs60$uAx8ZjZRz2uWg2&FUU%!6+`UPh|!VOsg6T#$ACFy{k zmLLEUm+8ifoqbk@PNd*YP%% nGjpLuKhEL1g)UgaQQ#XdKuj8WnCTMQ00000NkvXXu0mjf+JR7Q