diff --git a/mods/ITEMS/mcl_fireworks/register.lua b/mods/ITEMS/mcl_fireworks/register.lua index af2967262..d366f701c 100644 --- a/mods/ITEMS/mcl_fireworks/register.lua +++ b/mods/ITEMS/mcl_fireworks/register.lua @@ -4,7 +4,6 @@ local description = S("Firework Rocket") local function use_rocket(itemstack, user, duration) local elytra = mcl_player.players[user].elytra - local text if elytra.active and elytra.rocketing <= 0 then elytra.rocketing = duration if not minetest.is_creative_enabled(user:get_player_name()) then @@ -12,14 +11,11 @@ local function use_rocket(itemstack, user, duration) end minetest.sound_play("mcl_fireworks_rocket", {pos = user:get_pos()}) elseif elytra.active then - text = S("@1s power left. Not using rocket.", string.format("%.1f", elytra.rocketing)) - mcl_title.set(user, "actionbar", { text = text, color = "white", stay = 60 }) + mcl_title.set(user, "actionbar", { text = S("@1s power left. Not using rocket.", string.format("%.1f", elytra.rocketing)), color = "white", stay = 60 }) elseif minetest.get_item_group(user:get_inventory():get_stack("armor", 3):get_name(), "elytra") ~= 0 then - text = S("Elytra not deployed. Jump while falling down to deploy.") - mcl_title.set(user, "actionbar", { text = text, color = "white", stay = 60 }) + mcl_title.set(user, "actionbar", { text = S("Elytra not deployed. Jump while falling down to deploy."), color = "white", stay = 60 }) else - text = S("Elytra not equipped.") - mcl_title.set(user, "actionbar", { text = text, color = "white", stay = 60 }) + mcl_title.set(user, "actionbar", { text = S("Elytra not equipped."), color = "white", stay = 60 }) end return itemstack end