Confronta commit
No commits in common. "113bc79d77777edaa5e7d4860a5de4eb9eb28f40" and "2a42d242aa4b50d16e17d4515047320e6cf14264" have entirely different histories.
113bc79d77
...
2a42d242aa
@ -19,8 +19,7 @@ steps:
|
|||||||
- apk add --no-cache build-base curl unzip
|
- apk add --no-cache build-base curl unzip
|
||||||
- apk add --no-cache lua5.1 lua5.1-dev luarocks5.1
|
- apk add --no-cache lua5.1 lua5.1-dev luarocks5.1
|
||||||
- luarocks-5.1 install luacheck
|
- luarocks-5.1 install luacheck
|
||||||
- cd sources
|
- luacheck sources/*.lua --compat --allow-defined --no-unused-args --no-max-line-length
|
||||||
- luacheck ./*.lua
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: alpine
|
image: alpine
|
||||||
|
12
.luacheckrc
12
.luacheckrc
@ -1,12 +0,0 @@
|
|||||||
allow_defined = true
|
|
||||||
max_line_length = false
|
|
||||||
|
|
||||||
std = {
|
|
||||||
read_globals = {
|
|
||||||
"LINK_STYLE_BRACKET",
|
|
||||||
"EVENT_MANAGER",
|
|
||||||
"CHAT_SYSTEM",
|
|
||||||
"ZO_SavedVars",
|
|
||||||
"LibStub"
|
|
||||||
}
|
|
||||||
}
|
|
@ -50,6 +50,7 @@ function AchievementInfo.onAchievementUpdated(eventCode, achId)
|
|||||||
local percentageStepSize = AchievementInfo.settingGet("genShowUpdateSteps")
|
local percentageStepSize = AchievementInfo.settingGet("genShowUpdateSteps")
|
||||||
|
|
||||||
local link = GetAchievementLink(achId, LINK_STYLE_BRACKET)
|
local link = GetAchievementLink(achId, LINK_STYLE_BRACKET)
|
||||||
|
local name, description = GetAchievementInfo(achId)
|
||||||
local catName = "/"
|
local catName = "/"
|
||||||
|
|
||||||
if categoryId ~= false then
|
if categoryId ~= false then
|
||||||
@ -60,14 +61,14 @@ function AchievementInfo.onAchievementUpdated(eventCode, achId)
|
|||||||
|
|
||||||
local numCriteria = GetAchievementNumCriteria(achId)
|
local numCriteria = GetAchievementNumCriteria(achId)
|
||||||
for i = 1, numCriteria, 1 do
|
for i = 1, numCriteria, 1 do
|
||||||
local description, numCompleted, numRequired = GetAchievementCriterion(achId, i)
|
local name, numCompleted, numRequired = GetAchievementCriterion(achId, i)
|
||||||
local tmpOutput = ""
|
local tmpOutput = ""
|
||||||
|
|
||||||
if i > 1 and AchievementInfo.settingGet("genOnePerLine") == false then
|
if i > 1 and AchievementInfo.settingGet("genOnePerLine") == false then
|
||||||
tmpOutput = tmpOutput .. ", "
|
tmpOutput = tmpOutput .. ", "
|
||||||
end
|
end
|
||||||
|
|
||||||
tmpOutput = tmpOutput .. description .. " "
|
tmpOutput = tmpOutput .. name .. " "
|
||||||
tmpOutput = tmpOutput .. AchievementInfo.calcCriteriaColor(numCompleted, numRequired) .. numCompleted .. "|r"
|
tmpOutput = tmpOutput .. AchievementInfo.calcCriteriaColor(numCompleted, numRequired) .. numCompleted .. "|r"
|
||||||
tmpOutput = tmpOutput .. AchievementInfo.clrDefault .. "/" .. "|r"
|
tmpOutput = tmpOutput .. AchievementInfo.clrDefault .. "/" .. "|r"
|
||||||
tmpOutput = tmpOutput .. AchievementInfo.clrCriteriaComplete .. numRequired .. "|r"
|
tmpOutput = tmpOutput .. AchievementInfo.clrCriteriaComplete .. numRequired .. "|r"
|
||||||
@ -162,11 +163,13 @@ end
|
|||||||
-- Get the correct achievement category
|
-- Get the correct achievement category
|
||||||
function AchievementInfo.getCorrectAchievementCategoryId(achId)
|
function AchievementInfo.getCorrectAchievementCategoryId(achId)
|
||||||
local previousAchievementId = GetPreviousAchievementInLine(achId)
|
local previousAchievementId = GetPreviousAchievementInLine(achId)
|
||||||
|
local categoryId = 0
|
||||||
|
|
||||||
if AchievementInfo.checkForValidCategory(achId) == false and previousAchievementId ~= 0 then
|
if AchievementInfo.checkForValidCategory(achId) == false and previousAchievementId ~= 0 then
|
||||||
return AchievementInfo.getCorrectAchievementCategoryId(previousAchievementId)
|
return AchievementInfo.getCorrectAchievementCategoryId(previousAchievementId)
|
||||||
elseif AchievementInfo.checkForValidCategory(achId) then
|
elseif AchievementInfo.checkForValidCategory(achId) then
|
||||||
return GetCategoryInfoFromAchievementId(achId)
|
categoryId = GetCategoryInfoFromAchievementId(achId)
|
||||||
|
return categoryId
|
||||||
else
|
else
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@ -122,9 +122,10 @@ function AchievementInfo.createSettingsPanel()
|
|||||||
|
|
||||||
-- Add categories dynamically
|
-- Add categories dynamically
|
||||||
local numCats = GetNumAchievementCategories()
|
local numCats = GetNumAchievementCategories()
|
||||||
|
local catCount = 1
|
||||||
|
|
||||||
for i = 1, numCats, 1 do
|
for i = 1, numCats, 1 do
|
||||||
catName = GetAchievementCategoryInfo(i)
|
catName, numSubCats = GetAchievementCategoryInfo(i)
|
||||||
|
|
||||||
table.insert(optionsTable, {
|
table.insert(optionsTable, {
|
||||||
type = "checkbox",
|
type = "checkbox",
|
||||||
|
Caricamento…
Fai riferimento in un nuovo problema
Block a user