initial_properties update

This commit is contained in:
tenplus1 2023-09-23 14:12:16 +01:00
parent 2455809475
commit 9e89d3918d
2 changed files with 11 additions and 24 deletions

View file

@ -6,24 +6,7 @@
-- before it closes (10 seconds), potions can also be thrown for local teleport.
-- translation support
local S
if minetest.get_translator then
S = minetest.get_translator("teleport_potion")
else
S = function(s, a, ...)
if a == nil then
return s
end
a = {a, ...}
return s:gsub("(@?)@(%(?)(%d+)(%)?)", function(e, o, n, c)
if e == ""then
return a[tonumber(n)] .. (o == "" and c or "")
else
return "@" .. o .. n .. c
end
end)
end
end
local S = minetest.get_translator("teleport_potion")
-- check for MineClone2
local mcl = minetest.get_modpath("mcl_core")
@ -179,11 +162,14 @@ end
-- potion entity
local potion_entity = {
initial_properties = {
physical = true,
visual = "sprite",
visual_size = {x = 1.0, y = 1.0},
textures = {"teleport_potion_potion.png"},
collisionbox = {-0.1,-0.1,-0.1,0.1,0.1,0.1},
},
lastpos = {},
player = ""
}

View file

@ -1,4 +1,5 @@
name = teleport_potion
description = Adds craftable teleport potions (throwable) and teleport pads.
depends =
optional_depends = default, lucky_block, mcl_core
description = Adds craftable teleport potions (throwable) and teleport pads.
min_minetest_version = 5.0