feat: added ascension meter, done 0-1 asc logic, fixed mysterious man behaviours
This commit is contained in:
@@ -22,4 +22,10 @@ Day.register_handler(function()
|
||||
m.ism = math.max(0, m.ism - METER_DECAY_PER_DAY)
|
||||
m.wpm = math.max(0, m.wpm - METER_DECAY_PER_DAY)
|
||||
m.bm = math.max(0, m.bm - METER_DECAY_PER_DAY)
|
||||
end)
|
||||
|
||||
Day.register_handler(function()
|
||||
if Context.day_count == 3 then
|
||||
Ascension.increase()
|
||||
end
|
||||
end)
|
||||
@@ -37,15 +37,18 @@ end
|
||||
--- @within Discussion
|
||||
--- @param id string The discussion ID to start.
|
||||
--- @param return_window string The window ID to return to after the discussion.
|
||||
function Discussion.start(id, return_window)
|
||||
--- @param[opt] start_step number The step index to start from (defaults to 1).
|
||||
function Discussion.start(id, return_window, start_step)
|
||||
local discussion = _discussions[id]
|
||||
if not discussion then
|
||||
trace("Error: Discussion not found: " .. tostring(id))
|
||||
return
|
||||
end
|
||||
local step = start_step or 1
|
||||
if not discussion.steps[step] then step = 1 end
|
||||
Context.discussion.active = true
|
||||
Context.discussion.id = id
|
||||
Context.discussion.step = 1
|
||||
Context.discussion.step = step
|
||||
Context.discussion.selected_answer = 1
|
||||
Context.discussion.scroll_y = 0
|
||||
Context.discussion.scroll_timer = 0
|
||||
|
||||
@@ -152,4 +152,7 @@ function Meter.draw()
|
||||
end
|
||||
print(meter.label, label_x, label_y, meter.color, false, 1, true)
|
||||
end
|
||||
|
||||
local ascension_y = start_y + 3 * line_h + 1
|
||||
Ascension.draw(bar_x, ascension_y, { spacing = 5 })
|
||||
end
|
||||
|
||||
@@ -30,7 +30,6 @@ function Timer.update()
|
||||
if not in_minigame then
|
||||
t.progress = t.progress + (1 / timer_duration)
|
||||
if t.progress >= 1 then
|
||||
Day.increase()
|
||||
t.progress = t.progress - 1
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user