Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: d4lfteam/d4lf
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.6.0beta7
Choose a base ref
...
head repository: d4lfteam/d4lf
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 6,603 additions and 2,333 deletions.
  1. +6 −0 .clang-format
  2. +1 −1 .env
  3. +2 −2 .github/actions/setup_env/action.yml
  4. +4 −9 .github/workflows/ci.yml
  5. +17 −0 .github/workflows/notify.yml
  6. +33 −3 .github/workflows/release.yml
  7. +3 −0 .gitignore
  8. +39 −0 .pre-commit-config.yaml
  9. +0 −14 .pre-commit-config.yml
  10. +0 −70 .vscode/launch.json
  11. +0 −12 .vscode/settings.json
  12. +5 −0 .yamlfmt.yaml
  13. +234 −106 README.md
  14. +380 −17 assets/lang/enUS/affixes.json
  15. +19 −16 assets/lang/enUS/corrections.json
  16. +3 −0 assets/lang/enUS/item_types.json
  17. +29 −4 assets/lang/enUS/sigils.json
  18. +1 −2 assets/lang/enUS/tooltips.json
  19. +580 −201 assets/lang/enUS/uniques.json
  20. BIN assets/templates/hud_detection_left.png
  21. BIN assets/templates/item_descr/affix_bullet_point.png
  22. BIN assets/templates/item_descr/affix_bullet_point_1.png
  23. BIN assets/templates/item_descr/affix_bullet_point_1_medium.png
  24. BIN assets/templates/item_descr/affix_bullet_point_2.png
  25. BIN assets/templates/item_descr/affix_bullet_point_2_medium.png
  26. BIN assets/templates/item_descr/affix_bullet_point_medium.png
  27. BIN assets/templates/item_descr/aspect_bullet_point.png
  28. BIN assets/templates/item_descr/aspect_bullet_point_medium.png
  29. BIN assets/templates/item_descr/empty_socket.png
  30. BIN assets/templates/item_descr/empty_socket_medium.png
  31. BIN assets/templates/item_descr/greater_affix_bullet_point.png
  32. BIN assets/templates/item_descr/greater_affix_bullet_point_1.png
  33. BIN assets/templates/item_descr/greater_affix_bullet_point_1080p_special.png
  34. BIN assets/templates/item_descr/greater_affix_bullet_point_1_medium.png
  35. BIN assets/templates/item_descr/greater_affix_bullet_point_medium.png
  36. BIN assets/templates/item_descr/item_leg_top_left.png
  37. BIN assets/templates/item_descr/item_mythic_top_left.png
  38. BIN assets/templates/item_descr/item_seperator_long_legendary.png
  39. BIN assets/templates/item_descr/item_seperator_long_mythic.png
  40. BIN assets/templates/item_descr/item_seperator_short_mythic.png
  41. BIN assets/templates/item_descr/item_unique_top_left.png
  42. BIN assets/templates/item_descr/legendary_bullet_point.png
  43. BIN assets/templates/item_descr/legendary_bullet_point_medium.png
  44. BIN assets/templates/item_descr/mythic_bullet_point.png
  45. BIN assets/templates/item_descr/mythic_bullet_point_1080p_special.png
  46. BIN assets/templates/item_descr/mythic_bullet_point_medium.png
  47. BIN assets/templates/item_descr/mythic_bullet_point_medium_1080p_special.png
  48. BIN assets/templates/item_descr/rerolled_bullet_point.png
  49. BIN assets/templates/item_descr/rerolled_bullet_point_1.png
  50. BIN assets/templates/item_descr/rerolled_bullet_point_1_medium.png
  51. BIN assets/templates/item_descr/rerolled_bullet_point_2.png
  52. BIN assets/templates/item_descr/rerolled_bullet_point_2_medium.png
  53. BIN assets/templates/item_descr/rerolled_bullet_point_medium.png
  54. BIN assets/templates/item_descr/tempered_affix_bullet_point.png
  55. BIN assets/templates/item_descr/tempered_affix_bullet_point_1.png
  56. BIN assets/templates/item_descr/tempered_affix_bullet_point_1_medium.png
  57. BIN assets/templates/item_descr/tempered_affix_bullet_point_2.png
  58. BIN assets/templates/item_descr/tempered_affix_bullet_point_2_medium.png
  59. BIN assets/templates/item_descr/tempered_affix_bullet_point_3.png
  60. BIN assets/templates/item_descr/tempered_affix_bullet_point_3_medium.png
  61. BIN assets/templates/item_descr/tempered_affix_bullet_point_4.png
  62. BIN assets/templates/item_descr/tempered_affix_bullet_point_4_medium.png
  63. BIN assets/templates/item_descr/tempered_affix_bullet_point_5.png
  64. BIN assets/templates/item_descr/tempered_affix_bullet_point_5_medium.png
  65. BIN assets/templates/item_descr/tempered_affix_bullet_point_6.png
  66. BIN assets/templates/item_descr/tempered_affix_bullet_point_6_medium.png
  67. BIN assets/templates/item_descr/tempered_affix_bullet_point_medium.png
  68. BIN assets/templates/item_descr/unique_bullet_point.png
  69. BIN assets/templates/item_descr/unique_bullet_point_medium.png
  70. BIN assets/thumbnail_tts_temp_hopefully.jpg
  71. 0 benchmarks/__init__.py
  72. +175 −0 benchmarks/imageproc.py
  73. +1 −0 benchmarks/requirements.txt
  74. +19 −24 build.py
  75. BIN dependencies/tesserocr-2.7.0-cp312-cp312-win_amd64.whl
  76. BIN dependencies/tesserocr-2.7.1-cp313-cp313-win_amd64.whl
  77. +2 −2 environment.yml
  78. +2 −2 pyproject.toml
  79. +1 −1 pytest.ini
  80. +6 −6 requirements.txt
  81. +5 −1 src/__init__.py
  82. +3 −3 src/cam.py
  83. +13 −0 src/config/__init__.py
  84. +5 −10 src/config/data.py
  85. +0 −1 src/config/loader.py
  86. +136 −55 src/config/models.py
  87. +18 −11 src/config/ui.py
  88. +10 −10 src/dataloader.py
  89. +102 −4 src/gui/config_tab.py
  90. +234 −0 src/gui/d4lfitem.py
  91. +245 −0 src/gui/dialog.py
  92. +58 −23 src/gui/importer/common.py
  93. +42 −20 src/gui/importer/d4builds.py
  94. +28 −15 src/gui/importer/diablo_trade.py
  95. +104 −43 src/gui/importer/maxroll.py
  96. +37 −16 src/gui/importer/mobalytics.py
  97. +15 −0 src/gui/open_user_config_button.py
  98. +299 −0 src/gui/profile_tab.py
  99. +118 −39 src/gui/qt_gui.py
  100. +12 −4 src/item/data/affix.py
  101. +2 −0 src/item/data/aspect.py
  102. +70 −2 src/item/data/item_type.py
  103. +5 −0 src/item/data/rarity.py
  104. +2 −0 src/item/descr/__init__.py
  105. +9 −5 src/item/descr/find_affixes.py
  106. +2 −3 src/item/descr/find_aspect.py
  107. +38 −48 src/item/descr/item_type.py
  108. +124 −65 src/item/descr/read_descr.py
  109. +412 −0 src/item/descr/read_descr_tts.py
  110. +9 −9 src/item/descr/text.py
  111. +47 −25 src/item/descr/texture.py
  112. +102 −40 src/item/filter.py
  113. +10 −9 src/item/find_descr.py
  114. +10 −0 src/item/models.py
  115. +3 −3 src/logger.py
  116. +0 −158 src/loot_filter.py
  117. +8 −7 src/loot_mover.py
  118. +79 −20 src/main.py
  119. +6 −204 src/overlay.py
  120. +76 −0 src/scripts/common.py
  121. +145 −0 src/scripts/handler.py
  122. +134 −0 src/scripts/loot_filter.py
  123. +104 −0 src/scripts/loot_filter_tts.py
  124. +282 −299 src/scripts/vision_mode.py
  125. +160 −0 src/scripts/vision_mode_fast.py
  126. +374 −0 src/scripts/vision_mode_with_highlighting.py
  127. +8 −12 src/template_finder.py
  128. +13 −15 src/tools/data/custom_affixes_enUS.json
  129. +6 −6 src/tools/data/custom_sigils_enUS.json
  130. +81 −4 src/tools/data/custom_uniques_enUS.json
  131. +46 −27 src/tools/gen_data.py
  132. +135 −0 src/tts.py
  133. +0 −4 src/ui/char_inventory.py
  134. +2 −5 src/ui/chest.py
  135. +11 −1 src/ui/inventory_base.py
  136. +3 −67 src/ui/menu.py
  137. +1 −0 src/utils/custom_mouse.py
  138. +0 −26 src/utils/mouse_selector.py
  139. +63 −60 src/utils/ocr/read.py
  140. +2 −1 src/utils/window.py
  141. BIN tests/assets/item/find_descr_common_1080p.png
  142. BIN tests/assets/item/find_descr_legendary_1080p.png
  143. BIN tests/assets/item/find_descr_legendary_1440p.png
  144. BIN tests/assets/item/find_descr_magic_2160p.png
  145. BIN tests/assets/item/find_descr_rare_1080p.png
  146. BIN tests/assets/item/read_descr_codex_upgrade_1080p.png
  147. BIN tests/assets/item/read_descr_codex_upgrade_1440p.png
  148. BIN tests/assets/item/read_descr_codex_upgrade_1440p_2.png
  149. BIN tests/assets/item/read_descr_codex_upgrade_2160p.png
  150. BIN tests/assets/item/read_descr_elixir_1080p.png
  151. BIN tests/assets/item/read_descr_legendary_1080p.png
  152. BIN tests/assets/item/read_descr_legendary_1080p_2.png
  153. BIN tests/assets/item/read_descr_legendary_1080p_3.png
  154. BIN tests/assets/item/read_descr_legendary_1080p_4.png
  155. BIN tests/assets/item/read_descr_legendary_1080p_5.png
  156. BIN tests/assets/item/read_descr_legendary_1080p_6.png
  157. BIN tests/assets/item/read_descr_legendary_1080p_7.png
  158. BIN tests/assets/item/read_descr_legendary_1080p_8.png
  159. BIN tests/assets/item/read_descr_legendary_1440p.png
  160. BIN tests/assets/item/read_descr_legendary_1440p_2.png
  161. BIN tests/assets/item/read_descr_legendary_1440p_3.png
  162. BIN tests/assets/item/read_descr_legendary_1440p_4.png
  163. BIN tests/assets/item/read_descr_legendary_1600p.png
  164. BIN tests/assets/item/read_descr_material_1080p.png
  165. BIN tests/assets/item/read_descr_sigil_1440p.png
  166. BIN tests/assets/item/read_descr_sigil_1440p_2.png
  167. BIN tests/assets/item/read_descr_temper_manual_2160p.png
  168. BIN tests/assets/item/read_descr_tempered_1080p.png
  169. BIN tests/assets/item/read_descr_tempered_1080p_2.png
  170. BIN tests/assets/item/season5/2160p_small_find_descr_mythic_1.png
  171. BIN tests/assets/item/season6/1440p_small_compass_1.png
  172. BIN tests/assets/item/season6/1440p_small_rune_magic_1.png
  173. BIN tests/assets/item/season6/1440p_small_rune_magic_2.png
  174. BIN tests/assets/item/season6/1440p_small_rune_rare_1.png
  175. BIN tests/assets/item/season6/1440p_small_rune_rare_2.png
  176. BIN tests/assets/item/season6/1440p_small_sigil_1.png
  177. BIN tests/assets/item/season6/1440p_small_tribute_magic_1.png
  178. +0 −15 tests/config/data/sigils.py
  179. +1 −1 tests/config/ui_test.py
  180. +1 −1 tests/conftest.py
  181. +6 −1 tests/gui/importer/test_d4builds.py
  182. +6 −1 tests/gui/importer/test_diablo_trade.py
  183. +9 −7 tests/gui/importer/test_maxroll.py
  184. +6 −1 tests/gui/importer/test_mobalytics.py
  185. +1 −1 tests/item/filter/data/affixes.py
  186. +16 −2 tests/item/filter/data/filters.py
  187. +13 −0 tests/item/filter/data/uniques.py
  188. +23 −3 tests/item/filter/filter_test.py
  189. +28 −0 tests/item/find_descr_season5_test.py
  190. +0 −36 tests/item/find_descr_test.py
  191. +100 −0 tests/item/read_descr_season6_test.py
  192. +634 −0 tests/item/read_descr_season6_tts_test.py
  193. +0 −358 tests/item/read_descr_test.py
  194. +0 −29 tests/smoke_test.py
  195. +1 −1 tests/template_finder_test.py
  196. +2 −1 tests/ui/char_inventory_test.py
  197. +2 −1 tests/ui/chest_test.py
  198. +2 −2 tests/utils/image_operations_test.py
  199. +50 −0 tts/saapi.cpp
  200. +6 −0 tts/saapi.h
  201. +66 −0 tts/saapi.vcxproj
  202. BIN tts/saapi64.dll
6 changes: 6 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Language: Cpp
BasedOnStyle: Google
ColumnLimit: 140
IndentWidth: 4
TabWidth: 4
UseTab: Never
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PYTHONPATH=./src
PYTHONPATH=./src
4 changes: 2 additions & 2 deletions .github/actions/setup_env/action.yml
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ runs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
python-version: "3.13"
cache: "pip"

- name: Install dependencies
shell: powershell
13 changes: 4 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: CI

on: [ pull_request ]
on: [pull_request]

concurrency:
group: '${{github.workflow}}-${{github.ref}}'
group: "${{github.workflow}}-${{github.ref}}"
cancel-in-progress: true

jobs:
@@ -16,18 +16,13 @@ jobs:
- name: Setup env
uses: ./.github/actions/setup_env

- name: ruff format
- name: pre-commit
shell: powershell
run: ruff format --check

- name: ruff lint
shell: powershell
run: ruff check
run: pre-commit run -a

- name: Pytest
shell: powershell
run: pytest . -m "not selenium" -v -n logical

# - name: Pytest selenium
# shell: powershell
# run: pytest . -m "selenium" -v
17 changes: 17 additions & 0 deletions .github/workflows/notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Notify

on:
release:
types: [created, published]

jobs:
github-releases-to-discord:
runs-on: ubuntu-latest
steps:
# From: https://github.com/SethCohen/github-releases-to-discord
- name: Github Releases To Discord
uses: SethCohen/github-releases-to-discord@master
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
color: "2105893"
username: "D4LF Release"
36 changes: 33 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -13,13 +13,15 @@ jobs:
if: |
github.event_name != 'pull_request' ||
(
github.event.pull_request.merged == true &&
github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'release')
)
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: false # change to true when building benchmarks

- name: Setup env
uses: ./.github/actions/setup_env
@@ -44,7 +46,7 @@ jobs:
id: check_beta
shell: powershell
run: |
if ("${{ env.VERSION }}".Contains("beta")) {
if ($env:VERSION -like "*beta*" -or $env:VERSION -like "*alpha*") {
echo "IS_BETA=true" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
} else {
echo "IS_BETA=false" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
@@ -66,9 +68,37 @@ jobs:
$webhookUrl = "${{ secrets.DISCORD_WEBHOOK }}"
$payload = @{
username = "GitHub"
content = "**D4LF v${{ env.VERSION }}**\\n\\nRelease Page: <${{ steps.release.outputs.url }}>"
content = "**D4LF v${{ env.VERSION }}**`n`nRelease Page: <${{ steps.release.outputs.url }}>"
allowed_mentions = @{
parse = @()
}
} | ConvertTo-Json
Invoke-RestMethod -Uri $webhookUrl -Method Post -ContentType "application/json" -Body $payload
github-releases-to-discord:
needs: release
runs-on: windows-latest
steps:
# From: https://github.com/SethCohen/github-releases-to-discord
- name: Github Releases To Discord
uses: SethCohen/github-releases-to-discord@master
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
color: "2105893"
username: "D4LF Release"

# Also not working, have a request out here: https://github.com/SethCohen/github-releases-to-discord/issues/29
# # From: https://github.com/SethCohen/github-releases-to-discord
# - name: Github Releases To Discord
# uses: SethCohen/github-releases-to-discord@master
# with:
# webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
# color: "2105893"
# username: "D4LF Release"

# Not currently working, but I have an issue out for it: https://github.com/nhevia/discord-styled-releases/issues/12
# - name: Sending message to Discord with release notes
# uses: nhevia/discord-styled-releases@main
# with:
# webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
# webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
!config/bnip/.gitkeep
*.bak
*.lock
*.log
*.pyc
*.pyo
@@ -12,6 +13,8 @@
.pytest_cache/
.venv
.vs/
/tts/saapi
/tts/x64
__pycache__/
build/
config/bnip/*
39 changes: 39 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
default_install_hook_types: [pre-push]
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.7
hooks:
- id: clang-format
files: \.(cpp|h)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# - id: check-added-large-files # Disabled because git-lfs in GH costs?!
- id: check-ast
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-toml
- id: check-xml
- id: check-yaml
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: pretty-format-json
args: [--autofix, --indent=4, --no-ensure-ascii]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.3
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
# - repo: https://github.com/executablebooks/mdformat
# rev: 0.7.21
# hooks:
# - id: mdformat
# - repo: https://github.com/google/yamlfmt
# rev: v0.15.0
# hooks:
# - id: yamlfmt
# args: [-conf, .yamlfmt.yaml]
14 changes: 0 additions & 14 deletions .pre-commit-config.yml

This file was deleted.

70 changes: 0 additions & 70 deletions .vscode/launch.json

This file was deleted.

12 changes: 0 additions & 12 deletions .vscode/settings.json

This file was deleted.

5 changes: 5 additions & 0 deletions .yamlfmt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
formatter:
type: basic
eof_newline: true
max_line_length: 120
retain_line_breaks_single: true
Loading