chore: re-added have_a_coffee discussion, fixed text readability, fixed centering of texts, new system.ui functions for drawing in contour, fixed ddr types, fixed meter drawing
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
14
inc/decision/decision.have_a_coffee.lua
Normal file
14
inc/decision/decision.have_a_coffee.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
Decision.register({
|
||||
id = "have_a_coffee",
|
||||
label = "Have a Coffee",
|
||||
handle = function()
|
||||
local level = Ascension.get_level()
|
||||
local disc_id = "coworker_disc_0"
|
||||
-- TODO: Add more discussions for levels above 3
|
||||
if level >= 1 and level <= 3 then
|
||||
local suffix = Context.have_done_work_today and ("_asc_" .. level) or ("_" .. level)
|
||||
disc_id = "coworker_disc" .. suffix
|
||||
end
|
||||
Discussion.start(disc_id, "game")
|
||||
end,
|
||||
})
|
||||
@@ -123,9 +123,13 @@ function Decision.draw(decisions, selected_decision_index)
|
||||
local selected_decision = decisions[selected_decision_index]
|
||||
local decision_label = Decision.get_label(selected_decision)
|
||||
local text_y = bar_y + 4
|
||||
Print.text("<", 2, text_y, Config.colors.light_blue)
|
||||
Print.text_center(decision_label, Config.screen.width / 2, text_y, Config.colors.item)
|
||||
Print.text(">", Config.screen.width - 6, text_y, Config.colors.light_blue)
|
||||
local left_arrow_color = Input.left() and Config.colors.white or Config.colors.orange
|
||||
local right_arrow_color = Input.right() and Config.colors.white or Config.colors.orange
|
||||
local left_arrow_contour_color = Input.left() and Config.colors.white or Config.colors.black
|
||||
local right_arrow_contour_color = Input.right() and Config.colors.white or Config.colors.black
|
||||
Print.text_center_contour("<", 6, text_y, left_arrow_color, false, 1, left_arrow_contour_color)
|
||||
Print.text_center_contour(decision_label, Config.screen.width / 2, text_y, Config.colors.orange)
|
||||
Print.text_center_contour(">", Config.screen.width - 6, text_y, right_arrow_color, false, 1, right_arrow_contour_color)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@ Decision.register({
|
||||
focus_center_x = (Config.screen.width / 2) - 22,
|
||||
focus_center_y = (Config.screen.height / 2) - 18,
|
||||
focus_initial_radius = 0,
|
||||
on_win = function()
|
||||
Audio.music_play_room_work()
|
||||
end
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user