I've started my 2nd mod. The source code lives here: https://github.com/cdaringe/tony-hacks-pro-rails . I'm new to lua and factorio modding, so I thought it may be helpful to get a seasoned modder to help me navigate the factorio APIs.
I'm looking for advice on what the ideal set of events/APIs would be to wire into to enable this mod.
The tentative workflow is as follows:
- research skateboarding
- buy skateboard weapon?
- when holding SKATE_KEY? or firing "skateboard weapon" if near rail, init grinding
- when holding SKATE_KEY? or firing "skateboard weapon" while grinding continue grinding
- if grinding, pressing ALT_SKATE_KEY? inits a jump, which helps velocity increase
- while grinding, track train rail position, move player along rail. (maybe i secretly init an invisible train somehow??)
anyway, im not sure what the best strategy. there don't seem to be generic keypress events listed here: https://lua-api.factorio.com/latest/, so any tips would be great! thanks!