Move Fielder type into fielding.lua

This commit is contained in:
Sage Vaillancourt 2025-02-09 11:50:31 -05:00
parent 476e0d54cb
commit 89c37eaf3d
2 changed files with 9 additions and 8 deletions

View File

@ -1,3 +1,10 @@
--- @alias Fielder {
--- x: number,
--- y: number,
--- target: XyPair | nil,
--- speed: number,
--- }
-- selene: allow(unscoped_variables) -- selene: allow(unscoped_variables)
---@class Fielding ---@class Fielding
---@field fielders table<string, Fielder> ---@field fielders table<string, Fielder>

View File

@ -8,13 +8,6 @@ import 'CoreLibs/timer.lua'
import 'CoreLibs/ui.lua' import 'CoreLibs/ui.lua'
-- stylua: ignore end -- stylua: ignore end
--- @alias Fielder {
--- x: number,
--- y: number,
--- target: XyPair | nil,
--- speed: number,
--- }
--- @alias EasingFunc fun(number, number, number, number): number --- @alias EasingFunc fun(number, number, number, number): number
--- @alias LaunchBall fun( --- @alias LaunchBall fun(
@ -51,7 +44,6 @@ local baserunning = Baserunning.new(announcer)
local fielding = Fielding.new() local fielding = Fielding.new()
---@alias SimpleAnimator { currentValue: fun(self): number; reset: fun(self, durationMs: number | nil) } ---@alias SimpleAnimator { currentValue: fun(self): number; reset: fun(self, durationMs: number | nil) }
---@alias Pitch { x: SimpleAnimator, y: SimpleAnimator, z: SimpleAnimator | nil }
local deltaSeconds = 0 local deltaSeconds = 0
@ -98,6 +90,8 @@ local PlayerImageBlipper <const> = blipper.new(100, Player, PlayerLowHat)
local FielderDanceAnimator <const> = gfx.animator.new(1, 10, 0, utils.easingHill) local FielderDanceAnimator <const> = gfx.animator.new(1, 10, 0, utils.easingHill)
FielderDanceAnimator.repeatCount = C.DanceBounceCount - 1 FielderDanceAnimator.repeatCount = C.DanceBounceCount - 1
---@alias Pitch { x: SimpleAnimator, y: SimpleAnimator, z: SimpleAnimator | nil }
---@type Pitch[] ---@type Pitch[]
local Pitches <const> = { local Pitches <const> = {
-- Fastball -- Fastball