mirror of
https://codeberg.org/tenplus1/teleport_potion.git
synced 2025-07-16 03:06:44 -04:00
added mineclone2 crafts, spanish translation (thanks universales)
This commit is contained in:
parent
45338d6db2
commit
a13eaf700c
4 changed files with 82 additions and 4 deletions
25
init.lua
25
init.lua
|
@ -9,6 +9,8 @@
|
|||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
-- check for MineClone2
|
||||
local mcl = minetest.get_modpath("mcl_core")
|
||||
|
||||
-- max teleport distance
|
||||
local dist = tonumber(minetest.settings:get("map_generation_limit") or 31000)
|
||||
|
@ -271,6 +273,16 @@ minetest.register_node("teleport_potion:potion", {
|
|||
})
|
||||
|
||||
-- teleport potion recipe
|
||||
if mcl then
|
||||
minetest.register_craft({
|
||||
output = "teleport_potion:potion",
|
||||
recipe = {
|
||||
{"", "mcl_core:diamond", ""},
|
||||
{"mcl_core:diamond", "mcl_potions:glass_bottle", "mcl_core:diamond"},
|
||||
{"", "mcl_core:diamond", ""},
|
||||
},
|
||||
})
|
||||
else
|
||||
minetest.register_craft({
|
||||
output = "teleport_potion:potion",
|
||||
recipe = {
|
||||
|
@ -279,6 +291,7 @@ minetest.register_craft({
|
|||
{"", "default:diamond", ""},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--- Teleport pad
|
||||
|
@ -405,6 +418,16 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
end)
|
||||
|
||||
-- teleport pad recipe
|
||||
if mcl then
|
||||
minetest.register_craft({
|
||||
output = "teleport_potion:pad",
|
||||
recipe = {
|
||||
{"teleport_potion:potion", "mcl_core:glass", "teleport_potion:potion"},
|
||||
{"mcl_core:glass", "mesecons:redstone", "mcl_core:glass"},
|
||||
{"teleport_potion:potion", "mcl_core:glass", "teleport_potion:potion"},
|
||||
},
|
||||
})
|
||||
else
|
||||
minetest.register_craft({
|
||||
output = "teleport_potion:pad",
|
||||
recipe = {
|
||||
|
@ -413,7 +436,7 @@ minetest.register_craft({
|
|||
{"teleport_potion:potion", "default:glass", "teleport_potion:potion"}
|
||||
}
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
-- check portal & pad, teleport any entities on top
|
||||
minetest.register_abm({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue