coronaserver/spirit.lua

39 lines
857 B
Lua
Raw Permalink Normal View History

2020-05-31 06:36:39 -07:00
local spirit = false
2021-04-23 00:41:29 -07:00
function coronaserver.spirit(player)
2020-05-29 02:45:41 -07:00
minetest.add_particlespawner({
amount = 50,
time = 2,
minpos = {x = -0.1, y = 0, z = -0.1},
maxpos = {x = 0.1, y = 1, z = 0.1},
2020-05-31 06:36:39 -07:00
minvel = {x = -0.1, y = 0, z = -0.1},
maxvel = {x = 0.1, y = 0, z = -0.1},
minacc = {x = -0.1, y = 5, z = -0.1},
maxacc = {x = 0.1, y = 7, z = 0.1},
2020-05-29 02:45:41 -07:00
minexptime = 0.7,
maxexptime = 1,
minsize = 5,
2020-05-31 06:36:39 -07:00
maxsize = 7,
collisiondetection = true,
2020-05-31 06:36:39 -07:00
vertical = false,
texture = "fire_basic_flame.png",
2021-04-23 00:41:29 -07:00
attached = player,
2020-05-29 02:45:41 -07:00
})
end
2021-04-23 00:41:29 -07:00
2020-05-29 02:45:41 -07:00
minetest.register_on_joinplayer(function(player)
2021-04-23 00:41:29 -07:00
if spirit then
coronaserver.spirit(player)
end
2020-05-29 02:45:41 -07:00
end)
2021-04-23 00:41:29 -07:00
2020-05-31 06:36:39 -07:00
minetest.register_chatcommand("spirit", {
privs = {server = true},
func = function()
spirit = true
2021-04-23 00:41:29 -07:00
for _, player in pairs(minetest.get_connected_players()) do
coronaserver.spirit(player)
2020-05-31 06:36:39 -07:00
end
2020-05-29 02:45:41 -07:00
end
})