Merge pull request #360 from Buurazu/master
Cache previous description (with animated text color / icon support)
This commit is contained in:
3 files changed
+82
-69
No files matched your search
+15
-9
@@ -653,23 +653,23 @@ function EID:renderInlineIcons(spriteTable, posX, posY)
|
|||||||
spriteObj:Update()
|
spriteObj:Update()
|
||||||
end
|
end
|
||||||
|
|
||||||
EID:renderIcon(spriteObj, posX + sprite[2] + Xoffset * EID.Scale, posY + Yoffset * EID.Scale, sprite[3])
|
EID:renderIcon(spriteObj, posX + sprite[2] + Xoffset * EID.Scale, posY + Yoffset * EID.Scale, sprite[3], sprite[1][1], sprite[1][2])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- helper function to render Icons in specific EID settins
|
-- helper function to render Icons in specific EID settins
|
||||||
function EID:renderIcon(spriteObj, posX, posY, callback)
|
function EID:renderIcon(spriteObj, posX, posY, callback, animName, animFrame)
|
||||||
spriteObj.Scale = Vector(EID.Scale, EID.Scale)
|
spriteObj.Scale = Vector(EID.Scale, EID.Scale)
|
||||||
spriteObj.Color = Color(1, 1, 1, EID.Config["Transparency"], 0, 0, 0)
|
spriteObj.Color = Color(1, 1, 1, EID.Config["Transparency"], 0, 0, 0)
|
||||||
if callback then
|
if callback then
|
||||||
callback(spriteObj)
|
callback(spriteObj)
|
||||||
end
|
end
|
||||||
|
|
||||||
spriteObj:Render(Vector(posX, posY), nullVector, nullVector)
|
|
||||||
|
|
||||||
if EID.CachingDescription then
|
if EID.CachingDescription then
|
||||||
table.insert(EID.CachedIcons, {spriteObj, posX, posY, callback, spriteObj:GetAnimation(), spriteObj:GetFrame()})
|
table.insert(EID.CachedIcons, {spriteObj, posX, posY, callback, animName or spriteObj:GetAnimation(), animFrame or spriteObj:GetFrame()})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
spriteObj:Render(Vector(posX, posY), nullVector, nullVector)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Returns the icon used for the bulletpoint. It will look at the first word in the given string.
|
-- Returns the icon used for the bulletpoint. It will look at the first word in the given string.
|
||||||
@@ -683,6 +683,7 @@ end
|
|||||||
|
|
||||||
-- Gets a KColor from a Markup-string (example Input: "{{ColorText}}")
|
-- Gets a KColor from a Markup-string (example Input: "{{ColorText}}")
|
||||||
-- Returns the KColor object and a boolean value indicating if the given string was a color markup or not
|
-- Returns the KColor object and a boolean value indicating if the given string was a color markup or not
|
||||||
|
local colorFunc = nil
|
||||||
function EID:getColor(str, baseKColor)
|
function EID:getColor(str, baseKColor)
|
||||||
local color = baseKColor
|
local color = baseKColor
|
||||||
local isColorMarkup = false
|
local isColorMarkup = false
|
||||||
@@ -690,8 +691,10 @@ function EID:getColor(str, baseKColor)
|
|||||||
local strTrimmed = string.gsub(str,"{{(.-)}}",function(a) return a end, 1)
|
local strTrimmed = string.gsub(str,"{{(.-)}}",function(a) return a end, 1)
|
||||||
if #strTrimmed <= #str then
|
if #strTrimmed <= #str then
|
||||||
if type(EID.InlineColors[strTrimmed]) == "function" then
|
if type(EID.InlineColors[strTrimmed]) == "function" then
|
||||||
|
colorFunc = EID.InlineColors[strTrimmed]
|
||||||
color = EID.InlineColors[strTrimmed](color)
|
color = EID.InlineColors[strTrimmed](color)
|
||||||
else
|
else
|
||||||
|
if EID.InlineColors[strTrimmed] then colorFunc = nil end
|
||||||
color = EID.InlineColors[strTrimmed] or color
|
color = EID.InlineColors[strTrimmed] or color
|
||||||
end
|
end
|
||||||
isColorMarkup = type(EID.InlineColors[strTrimmed]) ~= type(nil)
|
isColorMarkup = type(EID.InlineColors[strTrimmed]) ~= type(nil)
|
||||||
@@ -699,6 +702,7 @@ function EID:getColor(str, baseKColor)
|
|||||||
end
|
end
|
||||||
color = EID:copyKColor(color)
|
color = EID:copyKColor(color)
|
||||||
color.Alpha = math.min(color.Alpha, EID.Config["Transparency"])
|
color.Alpha = math.min(color.Alpha, EID.Config["Transparency"])
|
||||||
|
|
||||||
return color, isColorMarkup
|
return color, isColorMarkup
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -707,6 +711,7 @@ end
|
|||||||
function EID:filterColorMarkup(text, baseKColor)
|
function EID:filterColorMarkup(text, baseKColor)
|
||||||
local textPartsTable = {}
|
local textPartsTable = {}
|
||||||
local lastColor = baseKColor
|
local lastColor = baseKColor
|
||||||
|
local lastFunc = colorFunc
|
||||||
local lastPosition = 0
|
local lastPosition = 0
|
||||||
for word in string.gmatch(text, "{{.-}}") do
|
for word in string.gmatch(text, "{{.-}}") do
|
||||||
local textposition = string.find(text, word)
|
local textposition = string.find(text, word)
|
||||||
@@ -715,13 +720,14 @@ function EID:filterColorMarkup(text, baseKColor)
|
|||||||
local preceedingText = string.sub(text, lastPosition, textposition - 1)
|
local preceedingText = string.sub(text, lastPosition, textposition - 1)
|
||||||
local preceedingTextWidth = EID:getStrWidth(preceedingText) * EID.Scale
|
local preceedingTextWidth = EID:getStrWidth(preceedingText) * EID.Scale
|
||||||
lastPosition = textposition
|
lastPosition = textposition
|
||||||
table.insert(textPartsTable, {preceedingText, lastColor, preceedingTextWidth})
|
table.insert(textPartsTable, {preceedingText, lastColor, preceedingTextWidth, lastFunc})
|
||||||
lastColor = lookup
|
lastColor = lookup
|
||||||
|
lastFunc = colorFunc
|
||||||
text = string.gsub(text, word, "", 1)
|
text = string.gsub(text, word, "", 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
table.insert(textPartsTable, {string.sub(text, lastPosition), lastColor, 0})
|
table.insert(textPartsTable, {string.sub(text, lastPosition), lastColor, 0, lastFunc})
|
||||||
return textPartsTable
|
return textPartsTable
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -839,7 +845,7 @@ function EID:renderString(str, position, scale, kcolor)
|
|||||||
EID:renderInlineIcons(spriteTable, position.X + offsetX, position.Y)
|
EID:renderInlineIcons(spriteTable, position.X + offsetX, position.Y)
|
||||||
EID.font:DrawStringScaledUTF8(strFiltered, position.X + offsetX, position.Y, scale.X, scale.Y, textPart[2], 0, false)
|
EID.font:DrawStringScaledUTF8(strFiltered, position.X + offsetX, position.Y, scale.X, scale.Y, textPart[2], 0, false)
|
||||||
if EID.CachingDescription then
|
if EID.CachingDescription then
|
||||||
table.insert(EID.CachedStrings, {strFiltered, position.X + offsetX, position.Y, textPart[2]})
|
table.insert(EID.CachedStrings, {strFiltered, position.X + offsetX, position.Y, textPart[2], textPart[4], EID.Config["Transparency"]})
|
||||||
end
|
end
|
||||||
offsetX = offsetX + EID:getStrWidth(strFiltered) * scale.X
|
offsetX = offsetX + EID:getStrWidth(strFiltered) * scale.X
|
||||||
end
|
end
|
||||||
@@ -1278,4 +1284,4 @@ function EID:checkPlayersForMissingItems()
|
|||||||
EID.SaveGame[EID.Config["SaveGameNumber"]].ItemNeedsPickup[player.QueuedItem.Item.ID] = nil
|
EID.SaveGame[EID.Config["SaveGameNumber"]].ItemNeedsPickup[player.QueuedItem.Item.ID] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -391,6 +391,7 @@ local function handleScaleKey()
|
|||||||
-- press and hold ScaleKey
|
-- press and hold ScaleKey
|
||||||
if Input.IsButtonPressed(ScaleKey, 0) then
|
if Input.IsButtonPressed(ScaleKey, 0) then
|
||||||
if scaleHoldFrame > 60 then
|
if scaleHoldFrame > 60 then
|
||||||
|
EID.MCM_OptionChanged = true
|
||||||
local scaleConfigName = (EID.Config["DisplayMode"] == "local" and "LocalScale" or "Scale")
|
local scaleConfigName = (EID.Config["DisplayMode"] == "local" and "LocalScale" or "Scale")
|
||||||
if scaleToBigger then
|
if scaleToBigger then
|
||||||
local newScale = EID.Scale + scaleSpeed
|
local newScale = EID.Scale + scaleSpeed
|
||||||
@@ -417,6 +418,7 @@ local function handleScaleKey()
|
|||||||
end
|
end
|
||||||
-- press ScaleKey
|
-- press ScaleKey
|
||||||
if Input.IsButtonTriggered(ScaleKey, 0) then
|
if Input.IsButtonTriggered(ScaleKey, 0) then
|
||||||
|
EID.MCM_OptionChanged = true
|
||||||
scaleHoldFrame = 0
|
scaleHoldFrame = 0
|
||||||
local scale
|
local scale
|
||||||
local scaleConfigName = (EID.Config["DisplayMode"] == "local" and "LocalScale" or "Scale")
|
local scaleConfigName = (EID.Config["DisplayMode"] == "local" and "LocalScale" or "Scale")
|
||||||
@@ -443,13 +445,50 @@ end
|
|||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
---------------------------Printing Functions------------------------------
|
---------------------------Printing Functions------------------------------
|
||||||
|
|
||||||
local previousFormattedLines = {}
|
|
||||||
local previousBulletpoints = {}
|
|
||||||
local previousDesc = ""
|
local previousDesc = ""
|
||||||
|
local previousRenderPos = Vector.Zero
|
||||||
|
EID.CachingDescription = false
|
||||||
|
EID.CachedIcons = {}
|
||||||
|
EID.CachedStrings = {}
|
||||||
|
|
||||||
function EID:printDescription(desc)
|
function EID:printDescription(desc)
|
||||||
local textScale = Vector(EID.Scale, EID.Scale)
|
|
||||||
local renderPos = EID:getTextPosition()
|
local renderPos = EID:getTextPosition()
|
||||||
|
|
||||||
|
EID.CachingDescription = false
|
||||||
|
if previousDesc == desc.Description and not EID.OptionChanged and not EID.MCM_OptionChanged then
|
||||||
|
local localModeDiff = renderPos - previousRenderPos
|
||||||
|
-- Drawing our currently saved description
|
||||||
|
for _,icon in ipairs(EID.CachedIcons) do
|
||||||
|
-- set inline icon to specific frame
|
||||||
|
if icon[6] >= 0 then
|
||||||
|
icon[1]:SetFrame(icon[5], icon[6])
|
||||||
|
-- frame of -1 = it's an animation, let it play
|
||||||
|
elseif not icon[1]:IsPlaying(icon[5]) or icon[1]:IsFinished(icon[5]) then
|
||||||
|
icon[1]:Play(icon[5],true)
|
||||||
|
else
|
||||||
|
icon[1]:Update()
|
||||||
|
end
|
||||||
|
EID:renderIcon(icon[1], icon[2] + localModeDiff.X, icon[3] + localModeDiff.Y, icon[4])
|
||||||
|
end
|
||||||
|
for i,str in ipairs(EID.CachedStrings) do
|
||||||
|
-- check for func (Rainbow, Blink, Fade), reset the color's Alpha to EID.Config["Transparency"] if func
|
||||||
|
if str[5] then
|
||||||
|
str[4].Alpha = str[6]
|
||||||
|
str[4] = str[5](str[4])
|
||||||
|
end
|
||||||
|
EID.font:DrawStringScaledUTF8(str[1], str[2] + localModeDiff.X, str[3] + localModeDiff.Y, EID.Scale, EID.Scale, str[4], 0, false)
|
||||||
|
end
|
||||||
|
return
|
||||||
|
else
|
||||||
|
-- Drawing a new description
|
||||||
|
EID.CachingDescription = true
|
||||||
|
EID.CachedIcons = {}
|
||||||
|
EID.CachedStrings = {}
|
||||||
|
previousDesc = desc.Description
|
||||||
|
previousRenderPos = Vector(renderPos.X, renderPos.Y)
|
||||||
|
end
|
||||||
|
|
||||||
|
local textScale = Vector(EID.Scale, EID.Scale)
|
||||||
local offsetX = 0
|
local offsetX = 0
|
||||||
EID.lineHeight = EID.Config["LineHeight"]
|
EID.lineHeight = EID.Config["LineHeight"]
|
||||||
if EID.Config["ShowItemIcon"] then
|
if EID.Config["ShowItemIcon"] then
|
||||||
@@ -486,9 +525,6 @@ function EID:printDescription(desc)
|
|||||||
end
|
end
|
||||||
if EID.Config["ShowItemType"] and (itemType == 3 or itemType == 4) then
|
if EID.Config["ShowItemType"] and (itemType == 3 or itemType == 4) then
|
||||||
local offsetY = 2
|
local offsetY = 2
|
||||||
if EID.Scale < 1 then
|
|
||||||
offsetY = -1
|
|
||||||
end
|
|
||||||
EID.IconSprite:Play(EID.ItemTypeAnm2Names[itemType])
|
EID.IconSprite:Play(EID.ItemTypeAnm2Names[itemType])
|
||||||
EID:renderIcon(EID.IconSprite, renderPos.X + offsetX * EID.Scale, renderPos.Y + offsetY * EID.Scale)
|
EID:renderIcon(EID.IconSprite, renderPos.X + offsetX * EID.Scale, renderPos.Y + offsetY * EID.Scale)
|
||||||
if itemType == 3 then
|
if itemType == 3 then
|
||||||
@@ -504,14 +540,8 @@ function EID:printDescription(desc)
|
|||||||
EID.InlineIconSprite2:SetFrame("numbers", curItemConfig.MaxCharges)
|
EID.InlineIconSprite2:SetFrame("numbers", curItemConfig.MaxCharges)
|
||||||
end
|
end
|
||||||
EID:renderIcon(EID.InlineIconSprite2, renderPos.X + offsetX * EID.Scale, renderPos.Y + offsetY * EID.Scale)
|
EID:renderIcon(EID.InlineIconSprite2, renderPos.X + offsetX * EID.Scale, renderPos.Y + offsetY * EID.Scale)
|
||||||
offsetX = offsetX + 8
|
|
||||||
elseif itemType == 4 then
|
|
||||||
-- familiar
|
|
||||||
offsetX = offsetX + 8
|
|
||||||
end
|
|
||||||
if not EID.Config["ShowItemName"] then
|
|
||||||
renderPos.Y = renderPos.Y + EID.lineHeight * EID.Scale
|
|
||||||
end
|
end
|
||||||
|
offsetX = offsetX + 8
|
||||||
end
|
end
|
||||||
--Display Itemname
|
--Display Itemname
|
||||||
if EID.Config["ShowItemName"] then
|
if EID.Config["ShowItemName"] then
|
||||||
@@ -536,7 +566,7 @@ function EID:printDescription(desc)
|
|||||||
local quality = tonumber(EID.itemConfig:GetCollectible(tonumber(desc.ObjSubType)).Quality)
|
local quality = tonumber(EID.itemConfig:GetCollectible(tonumber(desc.ObjSubType)).Quality)
|
||||||
curName = curName.." - {{Quality"..quality.."}}"
|
curName = curName.." - {{Quality"..quality.."}}"
|
||||||
end
|
end
|
||||||
|
-- Display the mod this item is from
|
||||||
if desc.ModName then
|
if desc.ModName then
|
||||||
if EID.Config["ModIndicatorDisplay"] == "Both" or EID.Config["ModIndicatorDisplay"] == "Name only" then
|
if EID.Config["ModIndicatorDisplay"] == "Both" or EID.Config["ModIndicatorDisplay"] == "Name only" then
|
||||||
curName = curName .. " {{"..EID.Config["ModIndicatorTextColor"].."}}" .. EID.ModIndicator[desc.ModName].Name
|
curName = curName .. " {{"..EID.Config["ModIndicatorTextColor"].."}}" .. EID.ModIndicator[desc.ModName].Name
|
||||||
@@ -552,10 +582,10 @@ function EID:printDescription(desc)
|
|||||||
textScale,
|
textScale,
|
||||||
EID:getNameColor()
|
EID:getNameColor()
|
||||||
)
|
)
|
||||||
|
|
||||||
renderPos.Y = renderPos.Y + EID.lineHeight * EID.Scale
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
renderPos.Y = renderPos.Y + EID.lineHeight * EID.Scale
|
||||||
|
|
||||||
--Display Transformation
|
--Display Transformation
|
||||||
if not (desc.Transformation == "0" or desc.Transformation == "" or desc.Transformation == nil) then
|
if not (desc.Transformation == "0" or desc.Transformation == "" or desc.Transformation == nil) then
|
||||||
for transform in string.gmatch(desc.Transformation, "([^,]+)") do
|
for transform in string.gmatch(desc.Transformation, "([^,]+)") do
|
||||||
@@ -582,48 +612,32 @@ function EID:printDescription(desc)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if previousDesc ~= desc.Description then
|
|
||||||
EID:clearDescriptionCache()
|
|
||||||
previousDesc = desc.Description
|
|
||||||
end
|
|
||||||
EID:printBulletPoints(desc.Description, renderPos)
|
EID:printBulletPoints(desc.Description, renderPos)
|
||||||
end
|
end
|
||||||
|
|
||||||
function EID:clearDescriptionCache()
|
|
||||||
previousFormattedLines = {}
|
|
||||||
previousBulletpoints = {}
|
|
||||||
end
|
|
||||||
|
|
||||||
function EID:printBulletPoints(description, renderPos)
|
function EID:printBulletPoints(description, renderPos)
|
||||||
local textboxWidth = tonumber(EID.Config["TextboxWidth"])
|
local textboxWidth = tonumber(EID.Config["TextboxWidth"])
|
||||||
local textScale = Vector(EID.Scale, EID.Scale)
|
local textScale = Vector(EID.Scale, EID.Scale)
|
||||||
description = EID:replaceShortMarkupStrings(description)
|
description = EID:replaceShortMarkupStrings(description)
|
||||||
if #previousFormattedLines == 0 then
|
for line in string.gmatch(description, "([^#]+)") do
|
||||||
for line in string.gmatch(description, "([^#]+)") do
|
local formatedLines = EID:fitTextToWidth(line, textboxWidth, EID.BreakUtf8CharsLanguage[EID.Config["Language"]])
|
||||||
previousBulletpoints[#previousFormattedLines+1] = true
|
local textColor = EID:getTextColor()
|
||||||
for _,v in ipairs(EID:fitTextToWidth(line, textboxWidth, EID.BreakUtf8CharsLanguage[EID.Config["Language"]])) do
|
for i, lineToPrint in ipairs(formatedLines) do
|
||||||
table.insert(previousFormattedLines, v)
|
-- render bulletpoint
|
||||||
|
if i == 1 then
|
||||||
|
local bpIcon = EID:handleBulletpointIcon(lineToPrint)
|
||||||
|
if EID:getIcon(bpIcon) ~= EID.InlineIcons["ERROR"] then
|
||||||
|
lineToPrint = string.gsub(lineToPrint, bpIcon .. " ", "", 1)
|
||||||
|
textColor = EID:renderString(bpIcon, renderPos + Vector(-3 * EID.Scale, 0), textScale , textColor)
|
||||||
|
else
|
||||||
|
textColor = EID:renderString(bpIcon, renderPos, textScale , textColor)
|
||||||
|
end
|
||||||
|
EID.LastRenderCallColor = EID:copyKColor(textColor) -- Save line start Color for eventual Color Reset call
|
||||||
end
|
end
|
||||||
|
textColor = EID:renderString(lineToPrint, renderPos + Vector(12 * EID.Scale, 0), textScale, textColor)
|
||||||
|
renderPos.Y = renderPos.Y + EID.lineHeight * EID.Scale
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local textColor = EID:getTextColor()
|
|
||||||
for i, lineToPrint in ipairs(previousFormattedLines) do
|
|
||||||
-- render bulletpoint
|
|
||||||
if previousBulletpoints[i] then
|
|
||||||
textColor = EID:getTextColor()
|
|
||||||
local bpIcon = EID:handleBulletpointIcon(lineToPrint)
|
|
||||||
if EID:getIcon(bpIcon) ~= EID.InlineIcons["ERROR"] then
|
|
||||||
lineToPrint = string.gsub(lineToPrint, bpIcon .. " ", "", 1)
|
|
||||||
textColor = EID:renderString(bpIcon, renderPos + Vector(-3 * EID.Scale, 0), textScale , textColor)
|
|
||||||
else
|
|
||||||
textColor = EID:renderString(bpIcon, renderPos, textScale , textColor)
|
|
||||||
end
|
|
||||||
EID.LastRenderCallColor = EID:copyKColor(textColor) -- Save line start Color for eventual Color Reset call
|
|
||||||
end
|
|
||||||
textColor = EID:renderString(lineToPrint, renderPos + Vector(12 * EID.Scale, 0), textScale, textColor)
|
|
||||||
renderPos.Y = renderPos.Y + EID.lineHeight * EID.Scale
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
----------------------------Handle New Room--------------------------------
|
----------------------------Handle New Room--------------------------------
|
||||||
@@ -943,13 +957,15 @@ local searchPartitions = EntityPartition.FAMILIAR + EntityPartition.ENEMY + Enti
|
|||||||
|
|
||||||
EID.lastDescriptionEntity = nil
|
EID.lastDescriptionEntity = nil
|
||||||
EID.lastDist = 0
|
EID.lastDist = 0
|
||||||
|
EID.OptionChanged = false
|
||||||
|
|
||||||
local function onRender(t)
|
local function onRender(t)
|
||||||
-- Increases by 60 per second, ignores pauses
|
-- Increases by 60 per second, ignores pauses
|
||||||
EID.GameRenderCount = EID.GameRenderCount + 1
|
EID.GameRenderCount = EID.GameRenderCount + 1
|
||||||
|
EID.OptionChanged = EID.MCM_OptionChanged
|
||||||
|
EID.MCM_OptionChanged = false
|
||||||
EID:resumeCoroutines()
|
EID:resumeCoroutines()
|
||||||
|
|
||||||
|
|
||||||
EID.isDisplaying = false
|
EID.isDisplaying = false
|
||||||
EID:setPlayer()
|
EID:setPlayer()
|
||||||
EID.TabPreviewID = 0
|
EID.TabPreviewID = 0
|
||||||
|
|||||||
+1
-10
@@ -137,7 +137,6 @@ function EID:AddBooleanSetting(category, optionName, displayText, params)
|
|||||||
OnChange = params.onChangeFunc or function(currentBool)
|
OnChange = params.onChangeFunc or function(currentBool)
|
||||||
EID.Config[optionName] = currentBool
|
EID.Config[optionName] = currentBool
|
||||||
EID.MCM_OptionChanged = true
|
EID.MCM_OptionChanged = true
|
||||||
EID.RefreshBagTextbox = true
|
|
||||||
end,
|
end,
|
||||||
Info = params.infoText or {}
|
Info = params.infoText or {}
|
||||||
}
|
}
|
||||||
@@ -1028,7 +1027,6 @@ if MCMLoaded then
|
|||||||
end,
|
end,
|
||||||
OnChange = function(currentNum)
|
OnChange = function(currentNum)
|
||||||
EID.MCM_OptionChanged = true
|
EID.MCM_OptionChanged = true
|
||||||
EID.RefreshBagTextbox = true
|
|
||||||
EID.Config["DisplayBagOfCrafting"] = bagDisplays[currentNum]
|
EID.Config["DisplayBagOfCrafting"] = bagDisplays[currentNum]
|
||||||
end,
|
end,
|
||||||
Info = {"Always = Always show Results, Hold = Show when holding up bag, Never = Never show results"}
|
Info = {"Always = Always show Results, Hold = Show when holding up bag, Never = Never show results"}
|
||||||
@@ -1051,7 +1049,6 @@ if MCMLoaded then
|
|||||||
end,
|
end,
|
||||||
OnChange = function(currentNum)
|
OnChange = function(currentNum)
|
||||||
EID.MCM_OptionChanged = true
|
EID.MCM_OptionChanged = true
|
||||||
EID.RefreshBagTextbox = true
|
|
||||||
EID.Config["BagOfCraftingDisplayMode"] = bagDisplayModes[currentNum]
|
EID.Config["BagOfCraftingDisplayMode"] = bagDisplayModes[currentNum]
|
||||||
end,
|
end,
|
||||||
Info = {"Toggle showing a list of recipes, an item preview when bag is full, what item pool/quality you might get, or only the floor pickups"}
|
Info = {"Toggle showing a list of recipes, an item preview when bag is full, what item pool/quality you might get, or only the floor pickups"}
|
||||||
@@ -1084,7 +1081,6 @@ if MCMLoaded then
|
|||||||
end,
|
end,
|
||||||
OnChange = function(currentNum)
|
OnChange = function(currentNum)
|
||||||
EID.MCM_OptionChanged = true
|
EID.MCM_OptionChanged = true
|
||||||
EID.RefreshBagTextbox = true
|
|
||||||
EID.Config["BagOfCraftingResults"] = diceSteps[currentNum + 1]
|
EID.Config["BagOfCraftingResults"] = diceSteps[currentNum + 1]
|
||||||
end,
|
end,
|
||||||
Info = {"Page size for the preview of items currently craftable with Bag of Crafting"}
|
Info = {"Page size for the preview of items currently craftable with Bag of Crafting"}
|
||||||
@@ -1105,7 +1101,6 @@ if MCMLoaded then
|
|||||||
AnIndexOf(combSteps, EID.Config["BagOfCraftingCombinationMax"]) - 1 .. " " .. EID.Config["BagOfCraftingCombinationMax"]
|
AnIndexOf(combSteps, EID.Config["BagOfCraftingCombinationMax"]) - 1 .. " " .. EID.Config["BagOfCraftingCombinationMax"]
|
||||||
end,
|
end,
|
||||||
OnChange = function(currentNum)
|
OnChange = function(currentNum)
|
||||||
EID.RefreshBagTextbox = true
|
|
||||||
EID.Config["BagOfCraftingCombinationMax"] = combSteps[currentNum + 1]
|
EID.Config["BagOfCraftingCombinationMax"] = combSteps[currentNum + 1]
|
||||||
end,
|
end,
|
||||||
Info = {"Get every recipe for the X best components; setting this high will cause lag spikes (12 = 500 combinations, 14 = 3,000, 16 = 13,000)"}
|
Info = {"Get every recipe for the X best components; setting this high will cause lag spikes (12 = 500 combinations, 14 = 3,000, 16 = 13,000)"}
|
||||||
@@ -1126,7 +1121,6 @@ if MCMLoaded then
|
|||||||
AnIndexOf(calcSteps, EID.Config["BagOfCraftingRandomResults"]) - 1 .. " " .. EID.Config["BagOfCraftingRandomResults"]
|
AnIndexOf(calcSteps, EID.Config["BagOfCraftingRandomResults"]) - 1 .. " " .. EID.Config["BagOfCraftingRandomResults"]
|
||||||
end,
|
end,
|
||||||
OnChange = function(currentNum)
|
OnChange = function(currentNum)
|
||||||
EID.RefreshBagTextbox = true
|
|
||||||
EID.Config["BagOfCraftingRandomResults"] = calcSteps[currentNum + 1]
|
EID.Config["BagOfCraftingRandomResults"] = calcSteps[currentNum + 1]
|
||||||
end,
|
end,
|
||||||
Info = {"An additional X number of randomly chosen recipes will be checked, changing each pickup spawn/despawn or refresh"}
|
Info = {"An additional X number of randomly chosen recipes will be checked, changing each pickup spawn/despawn or refresh"}
|
||||||
@@ -1150,7 +1144,6 @@ if MCMLoaded then
|
|||||||
end,
|
end,
|
||||||
OnChange = function(currentBool)
|
OnChange = function(currentBool)
|
||||||
EID.MCM_OptionChanged = true
|
EID.MCM_OptionChanged = true
|
||||||
EID.RefreshBagTextbox = true
|
|
||||||
EID.Config["BagOfCraftingDisplayNames"] = currentBool
|
EID.Config["BagOfCraftingDisplayNames"] = currentBool
|
||||||
end,
|
end,
|
||||||
Info = {"If on, each result takes two lines; lower your displayed results accordingly"}
|
Info = {"If on, each result takes two lines; lower your displayed results accordingly"}
|
||||||
@@ -1182,8 +1175,7 @@ if MCMLoaded then
|
|||||||
Type = ModConfigMenu.OptionType.BOOLEAN,
|
Type = ModConfigMenu.OptionType.BOOLEAN,
|
||||||
CurrentSetting = function() return true end,
|
CurrentSetting = function() return true end,
|
||||||
Display = function() return "<---- Clear Bag Content ---->" end,
|
Display = function() return "<---- Clear Bag Content ---->" end,
|
||||||
OnChange = function(currentBool)
|
OnChange = function(currentBool)
|
||||||
EID.RefreshBagTextbox = true
|
|
||||||
EID.BagItems = {}
|
EID.BagItems = {}
|
||||||
end,
|
end,
|
||||||
Info = {"Press this to clear all currently detected items on the bag"}
|
Info = {"Press this to clear all currently detected items on the bag"}
|
||||||
@@ -1198,7 +1190,6 @@ if MCMLoaded then
|
|||||||
CurrentSetting = function() return true end,
|
CurrentSetting = function() return true end,
|
||||||
Display = function() return "<---- Clear Floor item list ---->" end,
|
Display = function() return "<---- Clear Floor item list ---->" end,
|
||||||
OnChange = function(currentBool)
|
OnChange = function(currentBool)
|
||||||
EID.RefreshBagTextbox = true
|
|
||||||
EID.bagOfCraftingRoomQueries = {}
|
EID.bagOfCraftingRoomQueries = {}
|
||||||
EID.bagOfCraftingFloorQuery = {}
|
EID.bagOfCraftingFloorQuery = {}
|
||||||
EID.bagOfCraftingCurPickupCount = -1
|
EID.bagOfCraftingCurPickupCount = -1
|
||||||
|
|||||||
Reference in new issue
Block a user