mirror of
https://codeberg.org/tenplus1/teleport_potion.git
synced 2025-03-15 22:21:23 +00:00
change global functions to local
This commit is contained in:
parent
0b30944288
commit
c94700b496
1 changed files with 3 additions and 3 deletions
6
init.lua
6
init.lua
|
@ -15,7 +15,7 @@ local dist = tonumber(minetest.settings:get("map_generation_limit") or 31000)
|
||||||
|
|
||||||
-- creative check
|
-- creative check
|
||||||
local creative_mode_cache = minetest.settings:get_bool("creative_mode")
|
local creative_mode_cache = minetest.settings:get_bool("creative_mode")
|
||||||
function is_creative(name)
|
local function is_creative(name)
|
||||||
return creative_mode_cache or minetest.check_player_privs(name, {creative = true})
|
return creative_mode_cache or minetest.check_player_privs(name, {creative = true})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
-- particle effects
|
-- particle effects
|
||||||
function tp_effect(pos)
|
local function tp_effect(pos)
|
||||||
minetest.add_particlespawner({
|
minetest.add_particlespawner({
|
||||||
amount = 20,
|
amount = 20,
|
||||||
time = 0.25,
|
time = 0.25,
|
||||||
|
@ -74,7 +74,7 @@ end
|
||||||
|
|
||||||
local teleport_destinations = {}
|
local teleport_destinations = {}
|
||||||
|
|
||||||
function set_teleport_destination(playername, dest)
|
local function set_teleport_destination(playername, dest)
|
||||||
teleport_destinations[playername] = dest
|
teleport_destinations[playername] = dest
|
||||||
tp_effect(dest)
|
tp_effect(dest)
|
||||||
minetest.sound_play("portal_open", {
|
minetest.sound_play("portal_open", {
|
||||||
|
|
Loading…
Add table
Reference in a new issue