mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-05 21:20:00 +00:00
panel: add option to only count on regular bags
This commit is contained in:
@@ -439,6 +439,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("panel", "other", "minimap", "zone")
|
||||
pfUI:UpdateConfig("panel", "micro", "enable", "0")
|
||||
pfUI:UpdateConfig("panel", "xp", "showalways", "0")
|
||||
pfUI:UpdateConfig("panel", "bag", "ignorespecial", "1")
|
||||
pfUI:UpdateConfig("castbar", "player", "hide_blizz", "1")
|
||||
pfUI:UpdateConfig("castbar", "player", "hide_pfui", "0")
|
||||
pfUI:UpdateConfig("castbar", "target", "hide_pfui", "0")
|
||||
|
||||
@@ -1427,6 +1427,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
CreateConfig(this, T["Right Panel: Right"], C.panel.right, "right", "dropdown", pfUI.gui.dropdowns.panel_values)
|
||||
CreateConfig(this, T["Other Panel: Minimap"], C.panel.other, "minimap", "dropdown", pfUI.gui.dropdowns.panel_values)
|
||||
CreateConfig(this, T["Always Show Experience And Reputation Bar"], C.panel.xp, "showalways", "checkbox")
|
||||
CreateConfig(this, T["Only Count Bagspace On Regular Bags"], C.panel.bag, "ignorespecial", "checkbox")
|
||||
CreateConfig(this, T["Enable Micro Bar"], C.panel.micro, "enable", "checkbox")
|
||||
CreateConfig(this, T["Enable 24h Clock"], C.global, "twentyfour", "checkbox")
|
||||
this.setup = true
|
||||
|
||||
+8
-6
@@ -245,12 +245,14 @@ pfUI:RegisterModule("panel", function ()
|
||||
local usedslots = 0
|
||||
|
||||
for bag = 0,4 do
|
||||
local bagsize = GetContainerNumSlots(bag)
|
||||
maxslots = maxslots + bagsize
|
||||
for j = 1,bagsize do
|
||||
link = GetContainerItemLink(bag,j)
|
||||
if link then
|
||||
usedslots = usedslots + 1
|
||||
if C.panel.bag.ignorespecial ~= "1" or GetBagFamily(bag) == "BAG" then
|
||||
local bagsize = GetContainerNumSlots(bag)
|
||||
maxslots = maxslots + bagsize
|
||||
for j = 1,bagsize do
|
||||
link = GetContainerItemLink(bag,j)
|
||||
if link then
|
||||
usedslots = usedslots + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user