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

@@ -87,9 +87,9 @@ function draw()
local state = game.vars.state
if state == STATE_MENU then
renderer.text_scaled(game.width(, 2) / 2 - 35, game.height() / 2 - 30, "AIR HOCKEY", true)
renderer.text_scaled(game.width(, 2) / 2 - 50, game.height() / 2, "Tap to Start", true)
renderer.text_scaled(game.width(, 2) / 2 - 60, game.height() / 2 + 20, "First to " .. tostring(MAX_SCORE), true)
renderer.text_scaled(game.width() / 2 - 35, game.height() / 2 - 30, "AIR HOCKEY", true, 2)
renderer.text_scaled(game.width() / 2 - 50, game.height() / 2, "Tap to Start", true, 2)
renderer.text_scaled(game.width() / 2 - 60, game.height() / 2 + 20, "First to " .. tostring(MAX_SCORE), true, 2)
elseif state == STATE_PLAYING or state == STATE_GAME_OVER then
-- Draw center line
@@ -109,14 +109,14 @@ function draw()
renderer.circle(math.floor(game.vars.puck_x + 0.5), math.floor(game.vars.puck_y + 0.5), PUCK_RADIUS, true, true)
-- Draw scores
renderer.text_scaled(game.width(, 2) / 2 - 30, 5, tostring(game.vars.paddle_left_score), true)
renderer.text_scaled(game.width(, 2) / 2 + 20, 5, tostring(game.vars.paddle_right_score), true)
renderer.text_scaled(game.width() / 2 - 30, 5, tostring(game.vars.paddle_left_score), true, 2)
renderer.text_scaled(game.width() / 2 + 20, 5, tostring(game.vars.paddle_right_score), true, 2)
if state == STATE_GAME_OVER then
local winner = game.vars.paddle_left_score > game.vars.paddle_right_score and "Player 1" or "Player 2"
renderer.text_scaled(game.width(, 2) / 2 - 50, game.height() / 2 - 20, "GAME OVER", true)
renderer.text_scaled(game.width(, 2) / 2 - 40, game.height() / 2, winner .. " Wins!", true)
renderer.text_scaled(game.width(, 2) / 2 - 60, game.height() / 2 + 20, "Tap to Menu", true)
renderer.text_scaled(game.width() / 2 - 50, game.height() / 2 - 20, "GAME OVER", true, 2)
renderer.text_scaled(game.width() / 2 - 40, game.height() / 2, winner .. " Wins!", true, 2)
renderer.text_scaled(game.width() / 2 - 60, game.height() / 2 + 20, "Tap to Menu", true, 2)
end
end
end