Fix Lua syntax errors caused by bad regex replacement

This commit is contained in:
Adolfo Reyna
2026-02-13 15:31:21 -05:00
parent 034867d2a7
commit 06f5976865
8 changed files with 49 additions and 49 deletions

View File

@@ -81,9 +81,9 @@ function draw()
local state = game.vars.state
if state == STATE_MENU then
renderer.text_scaled(game.width(, 2) / 2 - 50, game.height() / 2 - 30, "LUNAR LANDER", true)
renderer.text_scaled(game.width(, 2) / 2 - 70, game.height() / 2 - 5, "Land in the zone safely", true)
renderer.text_scaled(game.width(, 2) / 2 - 50, game.height() / 2 + 20, "Tap to Start", true)
renderer.text_scaled(game.width() / 2 - 50, game.height() / 2 - 30, "LUNAR LANDER", true, 2)
renderer.text_scaled(game.width() / 2 - 70, game.height() / 2 - 5, "Land in the zone safely", true, 2)
renderer.text_scaled(game.width() / 2 - 50, game.height() / 2 + 20, "Tap to Start", true, 2)
elseif state == STATE_PLAYING or state == STATE_LANDED or state == STATE_CRASHED then
-- Draw terrain
@@ -111,18 +111,18 @@ function draw()
end
-- Draw stats
renderer.text_scaled(5, 5, "Fuel: " .. tostring(math.floor(game.vars.fuel, 2)), true)
renderer.text_scaled(5, 15, "Speed: " .. tostring(math.floor(game.vars.lander_vel_y * 10, 2)), true)
renderer.text_scaled(5, 5, "Fuel: " .. tostring(math.floor(game.vars.fuel)), true, 2)
renderer.text_scaled(5, 15, "Speed: " .. tostring(math.floor(game.vars.lander_vel_y * 10)), true, 2)
if state == STATE_LANDED then
renderer.text_scaled(game.width(, 2) / 2 - 40, game.height() / 2 - 20, "LANDED!", true)
renderer.text_scaled(game.width(, 2) / 2 - 30, game.height() / 2, "Score: " .. tostring(game.vars.score), true)
renderer.text_scaled(game.width(, 2) / 2 - 60, game.height() / 2 + 20, "Tap to Menu", true)
renderer.text_scaled(game.width() / 2 - 40, game.height() / 2 - 20, "LANDED!", true, 2)
renderer.text_scaled(game.width() / 2 - 30, game.height() / 2, "Score: " .. tostring(game.vars.score), true, 2)
renderer.text_scaled(game.width() / 2 - 60, game.height() / 2 + 20, "Tap to Menu", true, 2)
end
if state == STATE_CRASHED then
renderer.text_scaled(game.width(, 2) / 2 - 40, game.height() / 2 - 20, "CRASHED!", true)
renderer.text_scaled(game.width(, 2) / 2 - 60, game.height() / 2 + 20, "Tap to Menu", true)
renderer.text_scaled(game.width() / 2 - 40, game.height() / 2 - 20, "CRASHED!", true, 2)
renderer.text_scaled(game.width() / 2 - 60, game.height() / 2 + 20, "Tap to Menu", true, 2)
end
end
end