remove prular defitions
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-02-22 15:20:10 +01:00
parent 6f5b17147c
commit d9febf16e0
14 changed files with 56 additions and 56 deletions

View File

@@ -7,14 +7,14 @@ local COMBO_MAX_BONUS = 0.16
local COMBO_TIMEOUT_FRAMES = 600
-- Internal meters for tracking game progress and player stats.
Meters.COLOR_ISM = Config.colors.red
Meters.COLOR_WPM = Config.colors.blue
Meters.COLOR_BM = Config.colors.black
Meters.COLOR_BG = Config.colors.meter_bg
Meter.COLOR_ISM = Config.colors.red
Meter.COLOR_WPM = Config.colors.blue
Meter.COLOR_BM = Config.colors.black
Meter.COLOR_BG = Config.colors.meter_bg
--- Gets initial meter values.
-- @return table A table of initial meter values.
function Meters.get_initial()
function Meter.get_initial()
return {
ism = METER_DEFAULT,
wpm = METER_DEFAULT,
@@ -26,24 +26,24 @@ function Meters.get_initial()
end
--- Hides meters.
function Meters.hide()
function Meter.hide()
if Context and Context.meters then Context.meters.hidden = true end
end
--- Shows meters.
function Meters.show()
function Meter.show()
if Context and Context.meters then Context.meters.hidden = false end
end
--- Gets max meter value.
-- @return number The maximum meter value.
function Meters.get_max()
function Meter.get_max()
return METER_MAX
end
--- Gets combo multiplier.
-- @return number The current combo multiplier.
function Meters.get_combo_multiplier()
function Meter.get_combo_multiplier()
if not Context or not Context.meters then return 1 end
local combo = Context.meters.combo
if combo == 0 then return 1 end
@@ -51,7 +51,7 @@ function Meters.get_combo_multiplier()
end
--- Updates all meters.
function Meters.update()
function Meter.update()
if not Context or not Context.game_in_progress or not Context.meters then return end
local m = Context.meters
m.ism = math.max(0, m.ism - METER_DECAY_PER_FRAME)
@@ -69,7 +69,7 @@ end
--- Adds amount to a meter.
-- @param key string The meter key (e.g., "wpm", "ism", "bm").
-- @param amount number The amount to add.
function Meters.add(key, amount)
function Meter.add(key, amount)
if not Context or not Context.meters then return end
local m = Context.meters
if m[key] ~= nil then
@@ -78,12 +78,12 @@ function Meters.add(key, amount)
end
--- Called on minigame completion.
function Meters.on_minigame_complete()
function Meter.on_minigame_complete()
local m = Context.meters
local gain = math.floor(METER_GAIN_PER_CHORE * Meters.get_combo_multiplier())
Meters.add("wpm", gain)
Meters.add("ism", gain)
Meters.add("bm", gain)
local gain = math.floor(METER_GAIN_PER_CHORE * Meter.get_combo_multiplier())
Meter.add("wpm", gain)
Meter.add("ism", gain)
Meter.add("bm", gain)
m.combo = m.combo + 1
m.combo_timer = 0
end