Skip to content

feat: add interact key fishing mode support#12

Merged
stdNullPtr merged 3 commits into
masterfrom
feature/interact-key-fishing
Jun 1, 2025
Merged

feat: add interact key fishing mode support#12
stdNullPtr merged 3 commits into
masterfrom
feature/interact-key-fishing

Conversation

@stdNullPtr
Copy link
Copy Markdown
Owner

@stdNullPtr stdNullPtr commented Jun 1, 2025

Summary

Technical Implementation

Configuration Options:

use-interact-key: false          # Enable interact mode (default: false)  
keyboard-key-interact: f         # Interact key binding (default: f)

image

State Machine Changes:

  • CastLineWaitAndCatch (skips FindBobber when interact mode enabled)
  • CatchFish uses KeyboardUtils.SendKeyInput() instead of MouseUtils.SendMouseInput()
  • Audio detection works without bobber detection in interact mode

Validation:

  • KeyboardKeyInteract required when UseInteractKey is enabled
  • Maintains backward compatibility with existing configurations

Test Plan

  • Builds without errors (warning fixed for null reference)
  • Config validation works for interact key requirements
  • State machine transitions correctly skip FindBobber in interact mode
  • Audio detection adapted for interact mode
  • Runtime testing with WoW client

Closes #2

Implement configurable interact key mode as alternative to mouse-based fishing:

- Add UseInteractKey and KeyboardKeyInteract config properties
- Update ConfigValidator to validate interact key requirements
- Modify FishingStateMachine to skip FindBobber state when using interact mode
- Replace mouse right-click with configured interact key in CatchFish state
- Update audio detection to work without bobber detection in interact mode
- Add comprehensive logging for both traditional and interact modes
- Update CLAUDE.md with interact key feature documentation

Addresses issue #2 - provides bot-detection-safer alternative by eliminating
mouse movement patterns while maintaining audio-based fish detection.
- Change KeyboardKeyInteract to non-nullable with default 'f'
- Remove validation requirement since default is always provided
- Remove null-forgiving operator in state machine
- Follows same pattern as other keyboard bindings in codebase
- Modify KeyboardUtils to send lowercase letters without braces
- Keep braces for special keys (numbers, etc.) but use direct send for letters
- Reduce log spam by increasing threshold from 0.01f to 0.05f
- Increase log interval from 2 seconds to 5 seconds
- Should fix capital F issue in WoW chat window
@stdNullPtr stdNullPtr merged commit 98ebc19 into master Jun 1, 2025
2 checks passed
@stdNullPtr stdNullPtr deleted the feature/interact-key-fishing branch June 1, 2025 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to use the 'interact' key for fishing

1 participant