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

Add pool count to collectables #30

Merged
merged 1 commit into from
Sep 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.8.0 - Collectibles treasure pool count

- Collectible items in the treasure pool now display alongside collectible total

## 2.7.0 - Mini mode and collectibles toggle

- Added ability to display UI with reduced information for smaller screens.
Expand Down
10 changes: 6 additions & 4 deletions EmpyPopTracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
_addon.name = 'Empy Pop Tracker'
_addon.author = 'Dean James (Xurion of Bismarck)'
_addon.commands = { 'ept', 'empypoptracker' }
_addon.version = '2.7.0'
_addon.version = '2.8.0'

config = require('config')
res = require('resources')
Expand Down Expand Up @@ -207,15 +207,17 @@ function generate_text(data, key_items, items, depth)
end

if data.collectable and EmpyPopTracker.settings.collectables then
local count = get_item_count(data.collectable, items)
local item_count = get_item_count(data.collectable, items)
local pool_count = item_treasure_pool_count(data.collectable, items.treasure)
local collectable_pool_notification = pool_count > 0 and start_color('pool') .. ' [' .. pool_count .. ']' .. '\\cr' or ''
local start = ''
local finish = ''
if count >= data.collectable_target_count then
if item_count >= data.collectable_target_count then
start = start_color('obtained')
finish = '\\cr'
end

text = text .. '\n\n' .. start .. res.items[data.collectable].name .. ': ' .. count .. '/' .. data.collectable_target_count .. finish
text = text .. '\n\n' .. start .. res.items[data.collectable].name .. ': ' .. item_count .. '/' .. data.collectable_target_count .. finish .. collectable_pool_notification
end

return text
Expand Down