Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bagshui 1.5 #99

Draft
wants to merge 132 commits into
base: main
Choose a base branch
from
Draft

Bagshui 1.5 #99

wants to merge 132 commits into from

Conversation

veechs
Copy link
Owner

@veechs veechs commented Feb 24, 2025

Description

New Features

  • Automated bag swapping
  • New toolbar buttons
    • Open Container (Clam)
    • Disenchant
    • Pick Lock
  • Smarter gear sorting
  • Improved utilization display
  • New rule functions
    • RecentlyChanged()
    • Zone() / Subzone(), PlayerInGroup(), and LootMethod() / LootMaster()
  • Synchronized searches between open windows
  • New Openable default Category and corresponding Openable() rule function
  • Hidden group indicator in Edit Mode

Fixes

  • Dropping a profession now correctly removes it from Bagshui's reagents and crafts tracking.
  • Validation of key internal data to avoid errors.

Motification and Context

Types of changes

  • Bug fix
  • New feature
  • Code style update
  • Refactoring
  • Localization

veechs added 30 commits January 15, 2025 16:56
- Change how sorting for Eqiup Location is handled. Previously, the game names (ex: INVTYPE_LEGS) or localized (ex: Legs) were offered. Both have been replaced with a custom sort based on character sheet order, working from top to bottom on the left, same on the right, then left to right at the bottom.
- Any existing Sort Orders containing either of the old Equip Location fields will be updated to use the new one.
- Sort Orders now get cleaned at startup and any invalid fields are removed.
- Added Equip Location to all the default Sort Orders.
- As part of this change, inventory cache validation has been added. This should reduce the chance of errors due to item cache fields being added or removed.
- ItemInfo has been lightly refactored so it no longer needs to load so late. This was needed to support the cache validation code.
- ItemInfo:InitializeItem() has been updated to be usable for cache validation.
- InitializeEmptySlotItem() was moved from Inventory to ItemInfo, where it probably should have been all along.
- Change how sorting for Eqiup Location is handled. Previously, the game names (ex: INVTYPE_LEGS) or localized (ex: Legs) were offered. Both have been replaced with a custom sort based on character sheet order, working from top to bottom on the left, same on the right, then left to right at the bottom.
- Any existing Sort Orders containing either of the old Equip Location fields will be updated to use the new one.
- Sort Orders now get cleaned at startup and any invalid fields are removed.
- Added Equip Location to all the default Sort Orders (#13).
- As part of this change, inventory cache validation has been added. This should reduce the chance of errors due to item cache fields being added or removed.
- ItemInfo has been lightly refactored so it no longer needs to load so late. This was needed to support the cache validation code.
- ItemInfo:InitializeItem() has been updated to be usable for cache validation.
- InitializeEmptySlotItem() was moved from Inventory to ItemInfo, where it probably should have been all along.
Correctly handle locked and readable properties
Needed for new spellcasting toolbar buttons (Disenchant, Pick Lock). Also switch PLAYER_ALIVE back to PLAYER_ENTERING_WORLD because the former doesn't fire on reload.
This could have been done a while ago when Menus:Refresh() was introduced, but it just didn't happen until now.
- Group all buttons together.
- Rename Bag Bar to Bag Slots.
Fix function comment
Generate menu items without creating submenus
Used to move the space usage summary tooltip to the top left button when the numeric display is hidden.
Now shows item tooltip next to the item being opened instead of over the toolbar button, This prevents items from being obscured.
veechs added 30 commits March 2, 2025 10:59
Simply calling ClearAllPoints() *seems* to work, but then the window glitches out if you try to change its dimensions. Using SetTopLevel(true) and SetMovable(true) instead seems to implicitly clear points and keeps the window programmatically resizable.
This was somewhat complex due to all the moving parts involved and required modifications to the Categories and Rules classes to prevent call stack overflow and ensure proper error handling.
Add MatchCategory() and supporting code, plus some refactoring
Provide more control over table comparisons.
Now it tries to determine whether there are differences between the current state of the window and what would be the new state after any categorization or sorting changes, and only lights up if needed.
Make it respect empty slots that are temporarily peeled off the stack.
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.

1 participant