mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-01-10 00:59:35 +01:00
Slight vl_fireworks reorganisation
This commit is contained in:
parent
9365fb68d3
commit
36b8689bf4
4 changed files with 6 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
Firework mod for VoxeLibre
|
Firework mod for VoxeLibre
|
||||||
|
|
||||||
by NO11 and and some parts by j45
|
by Herowl and teknomunk, based on the old version by NO11 and j45
|
||||||
|
|
||||||
Sound credits:
|
Sound credits:
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,12 @@ local path = minetest.get_modpath("vl_fireworks")
|
||||||
|
|
||||||
vl_fireworks = {}
|
vl_fireworks = {}
|
||||||
|
|
||||||
function vl_fireworks.generic_particle_explosion(pos)
|
function vl_fireworks.generic_particle_explosion(pos, size)
|
||||||
if pos.object then pos = pos.object:get_pos() end
|
if pos.object then pos = pos.object:get_pos() end
|
||||||
local particle_pattern = math.random(1, 3)
|
local particle_pattern = math.random(1, 3)
|
||||||
local fpitch
|
local fpitch
|
||||||
local type = math.random(1, 2)
|
local type = math.random(1, 2)
|
||||||
local size = math.random(1, 3)
|
local size = size or math.random(1, 3)
|
||||||
local colors = {"red", "yellow", "blue", "green", "white"}
|
local colors = {"red", "yellow", "blue", "green", "white"}
|
||||||
local this_colors = {colors[math.random(#colors)], colors[math.random(#colors)], colors[math.random(#colors)]}
|
local this_colors = {colors[math.random(#colors)], colors[math.random(#colors)], colors[math.random(#colors)]}
|
||||||
|
|
||||||
|
@ -189,5 +189,6 @@ function vl_fireworks.generic_particle_explosion(pos)
|
||||||
return size
|
return size
|
||||||
end
|
end
|
||||||
|
|
||||||
dofile(path .. "/register.lua")
|
dofile(path .. "/star.lua")
|
||||||
|
dofile(path .. "/rockets.lua")
|
||||||
dofile(path .. "/crafting.lua")
|
dofile(path .. "/crafting.lua")
|
||||||
|
|
1
mods/ITEMS/vl_fireworks/star.lua
Normal file
1
mods/ITEMS/vl_fireworks/star.lua
Normal file
|
@ -0,0 +1 @@
|
||||||
|
local S = minetest.get_translator(minetest.get_current_modname())
|
Loading…
Reference in a new issue