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. -- before it closes (10 seconds), potions can also be thrown for local teleport.
-- translation support -- translation support
local S local S = minetest.get_translator("teleport_potion")
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
-- check for MineClone2 -- check for MineClone2
local mcl = minetest.get_modpath("mcl_core") local mcl = minetest.get_modpath("mcl_core")
@ -179,11 +162,14 @@ end
-- potion entity -- potion entity
local potion_entity = { local potion_entity = {
physical = true,
visual = "sprite", initial_properties = {
visual_size = {x = 1.0, y = 1.0}, physical = true,
textures = {"teleport_potion_potion.png"}, visual = "sprite",
collisionbox = {-0.1,-0.1,-0.1,0.1,0.1,0.1}, 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 = {}, lastpos = {},
player = "" player = ""
} }

View file

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