# I have stopped further development on this addon. #
This is a state machine that provides fishing states for other addons.
This addon is needed by other addons and has no effect on it's own.
~~~
For Developers:
I made this addon so that I don't run the same state machine multiple times simultaneously for different addons.
Available states are:
Lua Code:
FishingStateMachine.state = {
idle = 0, --Running around, neither looking at an interactable nor fighting
lookaway = 1, --Looking at an interactable which is NOT a fishing hole
looking = 2, --Looking at a fishing hole
depleted = 3, --fishing hole just depleted
nobait = 5, --Looking at a fishing hole, with NO bait equipped
fishing = 6, --Fishing
reelin = 7, --Reel in!
loot = 8, --Lootscreen open, only right after Reel in!
invfull = 9, --No free inventory slots, only right after Reel in!
fight = 14, --Fighting / Enemys taunted
dead = 15 --Dead
}
You can register a callback on "FishingStateMachine_STATE_CHANGE" with
Lua Code:
FishingStateMachine:registerOnStateChange(callback)
and unregister with
Lua Code:
FishingStateMachine:unregisterOnStateChange(callback)
or read out FishingStateMachine.currentState by calling
Lua Code:
FishingStateMachine:getState()