Commit Graph

18 Commits

Author SHA1 Message Date
Sage Vaillancourt 57625a9b80 Player pitching, npc batting, and gloves
Or at least a basic implementation thereof
2025-02-05 18:25:34 -05:00
Sage Vaillancourt 779b13d56b Add basic testing. Requires luaunit.
Put utils functions into a module. Of sorts, anyway.
Add benchAllFielders()
Add playerIsOn() and associated "sides".
Pass appliedSpeed through into runner funcs. Should make it easier to put under NPC control.
2025-02-05 13:52:12 -05:00
Sage Vaillancourt 45a20cbb70 Refactoring and better type hinting. 2025-02-05 10:01:45 -05:00
Sage Vaillancourt 9df836e0bf Switch to spaces. 2025-02-04 13:06:41 -05:00
Sage Vaillancourt 6dd8469409 Implement multi-out fielding.
Extract announcer.lua
Fielders now only dance at the end of the half-inning.
Ball is now drawn over everything but the scoreboard and announcer.
2025-02-03 20:26:08 -05:00
Sage Vaillancourt e68566957d Fix some fielding logic.
Runner forcedTo fields are now updated properly.
Fielders can throw to bases other than first.
Also, update label() to handle tables.
2025-02-03 00:03:37 -05:00
Sage Vaillancourt 5fca82bb3a Queue up announcement messages.
Extract drawScoreboard() to new scoreboard.lua
Very, very rudimentary team-switching.
2025-02-02 17:36:25 -05:00
Sage Vaillancourt 073140f700 Add basic announcement messages.
Switch to checking based on __types.lua instead of __stub.lua
New font for announcement. Move Full Circle font out of subdirectory.
2025-02-02 16:15:29 -05:00
Sage Vaillancourt 66e3d2bb01 Fielders can run the ball towards a base themselves.
Ball can be heldBy a fielder.
Fix likely bug in buildCache() and document it (including contemplating future removal).
Add missing Full Circle font png.
2025-02-02 13:32:22 -05:00
Sage Vaillancourt b9fc7ee09e Tweak drift-toward-base behavior.
It's a little clunky for sure, but also more playable.
Added the Full Circle font for the scoreboard.
Do a *check-only* lint in 'make check'
2025-02-02 11:07:15 -05:00
Sage Vaillancourt bf4fbab40f Quick <const> and case fixes in ecs and utils 2025-02-01 17:47:46 -05:00
Sage Vaillancourt f1d8c28370 Add selene to 'make lint'
Patch up its complaints.
Move blipper to graphics.lua
2025-02-01 11:04:27 -05:00
Sage Vaillancourt 4fc37b133e StyLua pass
Add 'lint' recipe to Makefile
2025-02-01 07:39:09 -05:00
Sage Vaillancourt 0b126919ac Better batter-outs, scoreboard, sounds and frowns.
A bunch more refactors, SCREAMING_SNAKE constants, graphics.lua, etc.
2025-01-31 23:34:35 -05:00
Sage Vaillancourt 533c625d47 Add .luarc.json for library reading.
Move more stuff to utils.
More type hints.
*Some* fleshing-out of getNextThrowTarget() etc.
Closer to proper multi-baserunner support.
2025-01-30 00:18:02 -05:00
Sage Vaillancourt 4093f9705a Refactoring, typehints, better baserunning 2025-01-29 00:36:55 -05:00
Sage Vaillancourt 2c179a5ba5 Refactoring.
Consolidate hitBall() and throwBall() into one function.
Pull playerImage into its own "blipper" in utils.lua. This is definitely overkill, but we're learning with Lua, and it's fine, and it's very fine.
2025-01-27 00:26:20 -05:00
Sage Vaillancourt 8bbc029c42 Bigger background for panning across.
Refactor out utils.lua
2025-01-26 23:24:41 -05:00