VoxeLibre/mods/ITEMS/vl_fireworks/star.lua

26 lines
689 B
Lua
Raw Normal View History

2024-12-27 03:02:50 +01:00
local S = minetest.get_translator(minetest.get_current_modname())
minetest.register_craftitem("vl_fireworks:firework_star", {
description = S("Firework Star"),
_doc_items_longdesc = S("A firework star is the key component of a firework rocket which is responsible for the visible explosion."),
wield_image = "vl_fireworks_star.png",
inventory_image = "vl_fireworks_star.png",
groups = { craftitem = 1 },
stack_max = 64,
2024-12-27 04:52:43 +01:00
_vl_fireworks_star = true
})
2024-12-27 04:52:43 +01:00
function vl_fireworks.star_tt(effect)
local s = ""
if effect.fn == "generic" then
s = S("Generic Firework Star")
end
if effect.size then
s = s .. "\nSize: " .. effect.size
end
return s:trim()
end
-- TODO image handlers