Removed text var
This commit is contained in:
parent
579cd9055a
commit
005fcbc2e9
@ -4,7 +4,6 @@ local description = S("Firework Rocket")
|
|||||||
|
|
||||||
local function use_rocket(itemstack, user, duration)
|
local function use_rocket(itemstack, user, duration)
|
||||||
local elytra = mcl_player.players[user].elytra
|
local elytra = mcl_player.players[user].elytra
|
||||||
local text
|
|
||||||
if elytra.active and elytra.rocketing <= 0 then
|
if elytra.active and elytra.rocketing <= 0 then
|
||||||
elytra.rocketing = duration
|
elytra.rocketing = duration
|
||||||
if not minetest.is_creative_enabled(user:get_player_name()) then
|
if not minetest.is_creative_enabled(user:get_player_name()) then
|
||||||
@ -12,14 +11,11 @@ local function use_rocket(itemstack, user, duration)
|
|||||||
end
|
end
|
||||||
minetest.sound_play("mcl_fireworks_rocket", {pos = user:get_pos()})
|
minetest.sound_play("mcl_fireworks_rocket", {pos = user:get_pos()})
|
||||||
elseif elytra.active then
|
elseif elytra.active then
|
||||||
text = S("@1s power left. Not using rocket.", string.format("%.1f", elytra.rocketing))
|
mcl_title.set(user, "actionbar", { text = S("@1s power left. Not using rocket.", string.format("%.1f", elytra.rocketing)), color = "white", stay = 60 })
|
||||||
mcl_title.set(user, "actionbar", { text = text, color = "white", stay = 60 })
|
|
||||||
elseif minetest.get_item_group(user:get_inventory():get_stack("armor", 3):get_name(), "elytra") ~= 0 then
|
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 = S("Elytra not deployed. Jump while falling down to deploy."), color = "white", stay = 60 })
|
||||||
mcl_title.set(user, "actionbar", { text = text, color = "white", stay = 60 })
|
|
||||||
else
|
else
|
||||||
text = S("Elytra not equipped.")
|
mcl_title.set(user, "actionbar", { text = S("Elytra not equipped."), color = "white", stay = 60 })
|
||||||
mcl_title.set(user, "actionbar", { text = text, color = "white", stay = 60 })
|
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user