Repository navigation
feat(farming): inactive finder, free oases and add to farm list - #176
Open
ertugrulkutluer wants to merge 8 commits into
Open
ertugrulkutluer wants to merge 8 commits into
ertugrulkutluer wants to merge 8 commits into
Conversation
Add AvaloniaUI, a cross-platform port of WPFUI that reuses the MainCore view models, so TBS can run on macOS. - AvaloniaUI: every WPFUI view ported to Avalonia 12 + ReactiveUI. The UI runs on the process main thread, which macOS requires. - MainCore: detect Chrome on macOS, keep Windows-only build settings conditional, and store data in ~/Library/Application Support on macOS. Windows behaviour is unchanged. - build-mac.sh: builds a self-contained TravianBotSharp.app. - release.yml: build the macOS app on macos-latest and attach TBS-<version>-macOS.zip to the release. The Windows zip is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same fix as PR vinaghost#175, kept here so the local macOS build has it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Download the server's public map.sql once a day and keep one snapshot per day. Players whose total population did not grow over 2 days are treated as inactive; their villages within a radius of a chosen village and inside a population range are listed in the Farming tab. Natars and the account's own villages are excluded and distances use the wrapping map. Adding the villages to a farm list is not part of this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add an "Add to selected farm list" action to the inactive finder. A new AddFarmTargetsTask opens the rally point farm list, skips coordinates already in the list, respects the 100 target limit and adds each village through the game's add target dialog with the configured troop column and amount. Targets the game does not accept are skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Read the tiles the game map loads from /api/v1/map/position (zoom 2, four requests for a 15 field radius) through the logged in browser. The inactive finder now also lists free oases with their animals, optionally skipping oases that have animals, and shows the result, time and loot of the last own attack on every target. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bring the inactive finder, free oases, last attack results and the add to farm list action to the Windows UI, matching the Avalonia layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an Inactive finder to the Farming tab (Windows and macOS UI) that lists raid targets around a village and can add them to a farm list.
What it does
map.sql: the bot downloads the server's public/map.sqlonce a day (DownloadMapDataTask, a single request, no game page) and keeps one snapshot per day under the data folder. Players whose total population did not grow over 2 days count as inactive./api/v1/map/position(zoom 2, four requests for a 15 field radius) through the logged-in browser.{k.fo},{b:ri2}, ...), so it works in any game language.AddFarmTargetsTaskopens the rally point farm list and adds each target through the game's "Add target" dialog with a configurable troop column and amount.Testing
MapDataServicewas tested against the livemap.sqlof an x10 international server: all 13,042 villages parse, and the filters, wrap-around distance and "not enough history" message were checked.AddFarmTargetsTask, and the inactive filter on real multi-day history (needs 2 days of snapshots).EnableWindowsTargetingon macOS) but has not been run on Windows.