mirror of
https://codeberg.org/tenplus1/teleport_potion.git
synced 2025-03-15 06:01:24 +00:00
initial_properties update
This commit is contained in:
parent
2455809475
commit
9e89d3918d
2 changed files with 11 additions and 24 deletions
32
init.lua
32
init.lua
|
@ -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 = ""
|
||||||
}
|
}
|
||||||
|
|
3
mod.conf
3
mod.conf
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue