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
22
init.lua
22
init.lua
|
@ -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 = ""
|
||||
}
|
||||
|
|
3
mod.conf
3
mod.conf
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue