Skip to content

Commit ac4758e

Browse files
committed
news, cd data fix display recipe scan
1 parent d36a581 commit ac4758e

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Data/Classes/CooldownData.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ function CraftSim.CooldownData:GetCurrentCharges()
120120
if self.maxCharges > 0 then
121121
local currentTime = GetServerTime()
122122
local diffTotal = currentTime - self.startTime
123-
return math.floor(diffTotal / self.cooldownPerCharge)
123+
local currentCharges = math.floor(diffTotal / self.cooldownPerCharge)
124+
return math.min(currentCharges, self.maxCharges)
124125
end
125126

126127
if self.isDayCooldown or self.maxCharges == 0 then

Data/News.lua

+6-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ function CraftSim.NEWS:GET_NEWS(itemMap)
3434
f.P .. f.g("Cost Details") .. " renamed to " .. f.g("Cost Optimization"),
3535
f.a .. "- Now shows the lowest expected crafting costs for an item",
3636
f.a .. " if you or one of your alts are able to craft it (and its cached)",
37-
f.a .. "- Subcrafting costs are considered if you enable it in the module",
37+
f.a .. "- Subcrafting costs are considered if",
38+
f.a .. " you enable it in the module",
3839
f.a .. "- Now has a " .. f.g("Sub Recipe Options") .. " Tab to configure sub crafts",
3940
f.P .. f.g("Recipe Scan"),
4041
f.a .. "- Added a Recipe Scan Option to toggle " .. f.bb("sub crafts"),
@@ -43,7 +44,8 @@ function CraftSim.NEWS:GET_NEWS(itemMap)
4344
f.a .. "- The alt profession list is now more consistently sorted",
4445
f.P .. f.g("Average Profit"),
4546
f.a .. "- Removed Explanation and Statistics Button (-> new modules)",
46-
f.a .. "- Refactored the profit and stat weight display and added tooltips",
47+
f.a .. "- Refactored the profit and stat weight display",
48+
f.a .. "and added tooltips",
4749
f.P .. f.g("Explanations"),
4850
f.a .. "- New Module moved from Average Profit",
4951
f.P .. f.g("Statistics"),
@@ -53,7 +55,8 @@ function CraftSim.NEWS:GET_NEWS(itemMap)
5355
f.p .. f.bb("CraftResults"),
5456
f.a .. "- Fixed a Typo in the Item Result Log saying 'Profit: :'",
5557
f.a .. " instead of 'Saved Reagents:",
56-
f.p .. "Fixed a bug leading to an error when moving a frame while crafting",
58+
f.p .. "Fixed a bug leading to an error when moving a",
59+
f.a .. "frame while crafting",
5760
f.p .. "Russian Translation Update",
5861
f.a .. "- Thanks to " .. f.bb("https://github.com/SerGlushko"),
5962
}

Modules/RecipeScan/Frames.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -770,8 +770,9 @@ function CraftSim.RECIPE_SCAN.FRAMES:AddRecipe(row, recipeData)
770770
local cooldownData = recipeData:GetCooldownDataForRecipeCrafter()
771771
if cooldownData and cooldownData.isCooldownRecipe and not cooldownData.isDayCooldown then
772772
local timeIcon = CreateAtlasMarkup(CraftSim.CONST.CRAFT_QUEUE_STATUS_TEXTURES.COOLDOWN.texture, 13, 13)
773+
local currentCharges = cooldownData:GetCurrentCharges()
773774
cooldownInfoText = " " .. timeIcon ..
774-
"(" .. cooldownData:GetCurrentCharges() .. "/" .. cooldownData.maxCharges .. ")"
775+
"(" .. currentCharges .. "/" .. cooldownData.maxCharges .. ")"
775776
end
776777

777778

0 commit comments

Comments
 (0)