Compare commits

...

4 Commits

Author SHA1 Message Date
4c7d43fea3 set version to 1.0-alpha
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-03-20 15:30:39 +01:00
94563d32c0 Merge pull request 'test mode' (#42) from feature/test-mode into master
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
Reviewed-on: #42
2026-03-20 06:25:24 +00:00
9da44700cb test mode
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
2026-03-20 07:25:04 +01:00
b72875c42f Merge pull request 'success label border fix' (#41) from bugfix/success-label-border into master
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #41
2026-03-20 06:07:24 +00:00
5 changed files with 32 additions and 6 deletions

View File

@@ -25,6 +25,7 @@ Context = {}
function Context.initial_data()
return {
current_menu_item = 1,
test_mode = false,
popup = {
show = false,
content = {}

View File

@@ -4,5 +4,5 @@
-- desc: Life of a programmer
-- site: https://git.teletype.hu/games/impostor
-- license: MIT License
-- version: 0.8
-- version: 1.0-alpha
-- script: lua

View File

@@ -22,6 +22,10 @@ function Input.left() return btnp(INPUT_KEY_LEFT) end
--- Checks if Right is pressed.
--- @within Input
function Input.right() return btnp(INPUT_KEY_RIGHT) end
--- Checks if Space is pressed.
--- @within Input
function Input.space() return keyp(INPUT_KEY_SPACE) end
--- Checks if Select is pressed.
--- @within Input
function Input.select() return btnp(INPUT_KEY_A) or keyp(INPUT_KEY_SPACE) end

View File

@@ -1,6 +1,8 @@
--- @section TTGIntroWindow
TTGIntroWindow.timer = 180
TTGIntroWindow.glitch_started = false
TTGIntroWindow.space_count = 0
TTGIntroWindow.space_timer = 0
TTGIntroWindow.text = [[
###### ###### ######
## ## #
@@ -25,8 +27,19 @@ function TTGIntroWindow.update()
TTGIntroWindow.glitch_started = true
end
-- Count menu_back presses during the intro
if Input.menu_back() then
TTGIntroWindow.space_count = TTGIntroWindow.space_count + 1
end
TTGIntroWindow.timer = TTGIntroWindow.timer - 1
if TTGIntroWindow.timer <= 0 or Input.select() or Input.menu_confirm() then
if TTGIntroWindow.timer <= 0 or Input.menu_confirm() then
-- Evaluate exactly 3 presses at the end of the intro
if TTGIntroWindow.space_count == 3 then
Context.test_mode = true
MenuWindow.refresh_menu_items()
Audio.sfx_success()
end
Glitch.hide()
Window.set_current("intro_brief")
end

View File

@@ -4,7 +4,11 @@ local _menu_items = {}
--- Draws the menu window.
--- @within MenuWindow
function MenuWindow.draw()
UI.draw_top_bar("Definitely not an Impostor")
local title = "Definitely not an Impostor"
if Context.test_mode then
title = title .. " (TEST MODE)"
end
UI.draw_top_bar(title)
local menu_h = #_menu_items * 10
local y = 10 + (Config.screen.height - 10 - 10 - menu_h) / 2
@@ -101,9 +105,13 @@ function MenuWindow.refresh_menu_items()
table.insert(_menu_items, {label = "New Game", decision = MenuWindow.new_game})
table.insert(_menu_items, {label = "Load Game", decision = MenuWindow.load_game})
table.insert(_menu_items, {label = "Configuration", decision = MenuWindow.configuration})
if Context.test_mode then
table.insert(_menu_items, {label = "Audio Test", decision = MenuWindow.audio_test})
table.insert(_menu_items, {label = "To Be Continued...", decision = MenuWindow.continued})
table.insert(_menu_items, {label = "DDR Test", decision = MenuWindow.ddr_test})
end
table.insert(_menu_items, {label = "Exit", decision = MenuWindow.exit})
Context.current_menu_item = 1