init.lua 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. recall = recall or {}
  2. recall.modpath = minetest.get_modpath("recall")
  3. -- Recalls are now constructed/managed by players.
  4. -- See teleports mod and passport mod.
  5. --[[
  6. local function central(player)
  7. local pos = {x=0, y=-3, z=0}
  8. if player:get_pos().y < -25000 then
  9. pos.y = -30788
  10. end
  11. return pos
  12. end
  13. local function north(player)
  14. local pos = {x=0, y=-3, z=198}
  15. if player:get_pos().y < -25000 then
  16. pos.y = -30788
  17. end
  18. return pos
  19. end
  20. local function south(player)
  21. local pos = {x=0, y=-3, z=-198}
  22. if player:get_pos().y < -25000 then
  23. pos.y = -30788
  24. end
  25. return pos
  26. end
  27. local function east(player)
  28. local pos = {x=198, y=-3, z=0}
  29. if player:get_pos().y < -25000 then
  30. pos.y = -30788
  31. end
  32. return pos
  33. end
  34. local function west(player)
  35. local pos = {x=-198, y=-3, z=0}
  36. if player:get_pos().y < -25000 then
  37. pos.y = -30788
  38. end
  39. return pos
  40. end
  41. local recalls = {
  42. {name="Central Square", position=central, min_dist=20},
  43. {name="West Quarter", position=west, min_dist=20},
  44. {name="East Quarter", position=east, min_dist=20},
  45. {name="North Quarter", position=north, min_dist=20},
  46. {name="South Quarter", position=south, min_dist=20},
  47. }
  48. --]]
  49. --[[
  50. for k, v in pairs(recalls) do
  51. passport.register_recall(v)
  52. end
  53. --]]