mirror of
https://codeberg.org/tenplus1/teleport_potion.git
synced 2025-03-22 17:32:22 +00:00
Code tidy
This commit is contained in:
parent
5d74e552f9
commit
2eccef244d
1 changed files with 3 additions and 3 deletions
6
init.lua
6
init.lua
|
@ -119,7 +119,7 @@ minetest.register_node("teleport_potion:potion", {
|
||||||
newmeta:set_string("text", fields.text)
|
newmeta:set_string("text", fields.text)
|
||||||
|
|
||||||
-- portal open effect and sound
|
-- portal open effect and sound
|
||||||
effect(pos)
|
tp_effect(pos)
|
||||||
|
|
||||||
minetest.sound_play("portal_open", {
|
minetest.sound_play("portal_open", {
|
||||||
pos = pos,
|
pos = pos,
|
||||||
|
@ -241,7 +241,7 @@ teleport.coordinates = function(str)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- particle effects
|
-- particle effects
|
||||||
function effect(pos)
|
function tp_effect(pos)
|
||||||
minetest.add_particlespawner({
|
minetest.add_particlespawner({
|
||||||
amount = 20,
|
amount = 20,
|
||||||
time = 0.25,
|
time = 0.25,
|
||||||
|
@ -293,7 +293,7 @@ minetest.register_abm({
|
||||||
player:moveto(target_coords, false)
|
player:moveto(target_coords, false)
|
||||||
|
|
||||||
-- paricle effects on arrival
|
-- paricle effects on arrival
|
||||||
effect(target_coords)
|
tp_effect(target_coords)
|
||||||
|
|
||||||
-- play sound on destination end
|
-- play sound on destination end
|
||||||
minetest.sound_play("portal_close", {
|
minetest.sound_play("portal_close", {
|
||||||
|
|
Loading…
Add table
Reference in a new issue