dfhack
dfhack copied to clipboard
Factor out fastdwarf movement timers into API
The fastdwarf movement timer modification code could really benefit modders if it were in its own API.
Fastdwarf breaks for every action type it works on so I can assume a unit won't have multiple move actions at a time, making the API's getter(s) simpler.
I think the API should have: getMoveStatus, which'd return movement timer, timer start and action type (or getMoveTimer, getMoveTimerStart, and getMoveActionType if multiple return can't be supported), and setMoveTimer, addMoveTimer (taking negatives (also maybe addMoveTimerCapped (capped to move timer start))), and multiplyMoveTimer (with flooring for integers. Maybe also multiplyMoveTimerCapped).