Augyre rotating buff: dropdown shows Elemental Overload but Resolute Technique is applied, and the choice is lost on save
Maintainer thường phản hồi trong vòng 8 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 75/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend
Hướng nghiên cứu
Bắt đầu với tùy chọn conditionHaveAugyre trong src/Modules/ConfigOptions.lua và theo dõi cách src/Classes/ConfigTab.lua khởi tạo, hiển thị, lưu và tải lại các giá trị danh sách. Kiểm tra xem giá trị mặc định được chọn có khiến buff Augyre đang hiển thị khớp với phép tính và được giữ lại sau khi mở lại hay không; issue cung cấp các đường dẫn mã liên quan và trình tự tái hiện. Hoàn tất khi cả hai lựa chọn buff hoạt động nhất quán qua thao tác lưu và tải lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens
The Config tab option "Augyre rotating buff" shows "Elemental Overload" by default, but the calculation actually uses Resolute Technique until you pick a value yourself. If you do pick "Elemental Overload", it is lost on save, and the reopened build is back to Resolute Technique while the dropdown still says "Elemental Overload".
Steps (derived from the code):
- New build, equip Augyre (Void Sceptre). Config tab shows "Augyre rotating buff: Elemental Overload".
- Check Calcs: Resolute Technique is active (hits cannot crit, 100% hit chance), not Elemental Overload.
- Change the dropdown to "Resolute Technique", then back to "Elemental Overload". Elemental Overload is now applied.
- Save and reopen.
Expected: what the dropdown shows is what gets applied, and it is the same after reopening.
Actual: steps 1-2 show one option and apply the other; after step 4 the build is back to Resolute Technique with "Elemental Overload" displayed.
Cause
The option has no defaultIndex:
So a new or loaded config set starts with input.conditionHaveAugyre = nil (NewConfigSet only fills list values that have a defaultIndex):
But the dropdown displays input or GetDefaultState(var), and the default state of a list is its first entry:
- https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/a69391d6daaaea1aaf8054668a094aad88dd7eaa/src/Classes/ConfigTab.lua#L1018
- https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/a69391d6daaaea1aaf8054668a094aad88dd7eaa/src/Classes/ConfigTab.lua#L686-L687
A list's apply only runs for a non-nil input (ConfigTab.lua#L1150-L1152), so with nil neither branch adds Elemental Overload. The item's own "You have Resolute Technique while you do not have Elemental Overload" then applies.
On save, any input equal to GetDefaultState is left out (ConfigTab.lua#L971), so an explicit "EleOverload" is not written. On load it comes back as nil.
Among the list options without defaultIndex, this appears to be the only one whose first entry changes the calculation. The others I checked (calc modes, "None" entries) treat nil the same as their first entry. More generally, Save skips values equal to GetDefaultState, but Load/NewConfigSet only restore defaultState/defaultIndex, so any option where those two differ loses an explicit value on reload. The numeric "0" case is #10143 / #10354.
Possible fix
Add defaultIndex = 1 to conditionHaveAugyre, so the stored input, the dropdown and the save default agree. Alternatively, have Save compare against the value NewConfigSet would restore rather than GetDefaultState.
- Ngôn ngữ chính
- Lua
- Star
- 5.5k
- Fork
- 2.4k
- Merge trung bình
- 6 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PathOfBuildingCommunity/PathOfBuilding
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
PathOfBuildingCommunity/PathOfBuilding#10428 ·
Maintainer thường phản hồi trong vòng 8 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
PathOfBuildingCommunity/PathOfBuilding#10420 ·
Maintainer thường phản hồi trong vòng 8 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
PathOfBuildingCommunity/PathOfBuilding#10395 ·
Maintainer thường phản hồi trong vòng 8 ngày
-
bug: accuracy
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
PathOfBuildingCommunity/PathOfBuilding#9911 ·
Maintainer thường phản hồi trong vòng 8 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
PathOfBuildingCommunity/PathOfBuilding#7548 · 4 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 8 ngày
Tất cả issue của PathOfBuildingCommunity/PathOfBuilding
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 5 ngày
-
enhancement priority::low upstream
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug reviewed-by-AI
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
olimorris/codecompanion.nvim#3508 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The Balanced badge stays on a card after it changes to an enhancement that isn't rebalancedCó thể đã có người làm @Jr-JoshS đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 71/100
Balatro-Multiplayer/BalatroMultiplayerPvP#640 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Babies count as citizens for housing and the lost-fort check, though a baby uses no bed or seatĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Layr-Labs/arena-fortress#141 ·
Maintainer thường phản hồi trong vòng 1 ngày