MineClone2/mods/ITEMS/vl_fireworks/star.lua

24 lines
695 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",
2024-12-29 08:07:54 +01:00
groups = { craftitem = 1, firework_star = 1 },
stack_max = 64,
})
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
2024-12-27 15:27:08 +01:00
s = s .. "\n" .. S("Size:") .. " " .. effect.size
2024-12-27 04:52:43 +01:00
end
return s:trim()
end
-- TODO image handlers