Slight vl_fireworks reorganisation

This commit is contained in:
the-real-herowl 2024-12-27 03:02:50 +01:00 committed by the-real-herowl
parent 9365fb68d3
commit 36b8689bf4
4 changed files with 6 additions and 4 deletions

View file

@ -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:

View file

@ -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")

View file

@ -0,0 +1 @@
local S = minetest.get_translator(minetest.get_current_modname())