コミットを比較
共通のコミットはありません。 "f0e4ed5837b073d187c079c75e90f97fc967fc99" と "f1c152b2ffa128cc8c138812b26275610a9739c9" の履歴はすべて異なっています。
f0e4ed5837
...
f1c152b2ff
15
.drone.yml
15
.drone.yml
@ -11,16 +11,9 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- git clone https://git.f-brinker.de/fbrinker/elderscrolls-addon-achievementInfo.git sources
|
- git clone https://git.f-brinker.de/fbrinker/elderscrolls-addon-achievementInfo.git sources
|
||||||
- cd sources && git checkout $DRONE_COMMIT
|
- cd sources && git checkout $DRONE_COMMIT
|
||||||
|
when:
|
||||||
- name: lint
|
event:
|
||||||
image: alpine
|
- tag
|
||||||
commands:
|
|
||||||
- apk update
|
|
||||||
- apk add --no-cache build-base curl unzip
|
|
||||||
- apk add --no-cache lua5.1 lua5.1-dev luarocks5.1
|
|
||||||
- luarocks-5.1 install luacheck
|
|
||||||
- cd sources
|
|
||||||
- luacheck ./*.lua
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: alpine
|
image: alpine
|
||||||
@ -32,7 +25,7 @@ steps:
|
|||||||
# Set Version and AddonVersion
|
# Set Version and AddonVersion
|
||||||
- export VERSION=$DRONE_TAG
|
- export VERSION=$DRONE_TAG
|
||||||
- export ADDON_VERSION=$(echo $DRONE_TAG | sed -E 's/(0|)\.//g')
|
- export ADDON_VERSION=$(echo $DRONE_TAG | sed -E 's/(0|)\.//g')
|
||||||
- sed -i "s/\"%VERSION%\"/$VERSION/g" sources/AchievementInfoCommon.lua
|
- sed -i "s/%VERSION%/$VERSION/g" sources/AchievementInfoCommon.lua
|
||||||
- sed -i "s/%VERSION%/$VERSION/g" sources/AchievementInfo.txt
|
- sed -i "s/%VERSION%/$VERSION/g" sources/AchievementInfo.txt
|
||||||
- sed -i "s/%ADDON_VERSION%/$ADDON_VERSION/g" sources/AchievementInfo.txt
|
- sed -i "s/%ADDON_VERSION%/$ADDON_VERSION/g" sources/AchievementInfo.txt
|
||||||
# Rename and zip
|
# Rename and zip
|
||||||
|
23
.luacheckrc
23
.luacheckrc
@ -1,23 +0,0 @@
|
|||||||
compat = true
|
|
||||||
allow_defined = true
|
|
||||||
max_line_length = false
|
|
||||||
|
|
||||||
read_globals = {
|
|
||||||
"GetAchievementId",
|
|
||||||
"GetAchievementCategoryInfo",
|
|
||||||
"GetAchievementCriterion",
|
|
||||||
"GetAchievementLink",
|
|
||||||
"GetAchievementNumCriteria",
|
|
||||||
"GetCategoryInfoFromAchievementId",
|
|
||||||
"GetCVar",
|
|
||||||
"GetNumAchievementCategories",
|
|
||||||
"GetPreviousAchievementInLine",
|
|
||||||
"CHAT_SYSTEM",
|
|
||||||
"EVENT_ACHIEVEMENT_UPDATED",
|
|
||||||
"EVENT_ADD_ON_LOADED",
|
|
||||||
"EVENT_MANAGER",
|
|
||||||
"LibStub",
|
|
||||||
"LINK_STYLE_BRACKET",
|
|
||||||
"zo_callLater",
|
|
||||||
"ZO_SavedVars",
|
|
||||||
}
|
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
-- Init
|
-- Init
|
||||||
AchievementInfo.hijackedFirstLoad = false
|
AchievementInfo.hijackedFirstLoad = false
|
||||||
function AchievementInfo.initialize(_, addOnName)
|
function AchievementInfo.initialize(eventCode, addOnName)
|
||||||
if (addOnName ~= AchievementInfo.name) then return end
|
if (addOnName ~= AchievementInfo.name) then return end
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
-- Do the magic
|
-- Do the magic
|
||||||
function AchievementInfo.onAchievementUpdated(_, achId)
|
function AchievementInfo.onAchievementUpdated(eventCode, achId)
|
||||||
local output = ""
|
local output = ""
|
||||||
|
|
||||||
-- addOn enabled?
|
-- addOn enabled?
|
||||||
@ -50,6 +50,7 @@ function AchievementInfo.onAchievementUpdated(_, 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(_, 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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
AchievementInfo = {}
|
AchievementInfo = {}
|
||||||
AchievementInfo.name = "AchievementInfo"
|
AchievementInfo.name = "AchievementInfo"
|
||||||
AchievementInfo.author = "Asto, @Astarax"
|
AchievementInfo.author = "Asto, @Astarax"
|
||||||
AchievementInfo.version = "%VERSION%"
|
AchievementInfo.version = %VERSION%
|
||||||
AchievementInfo.savedVars = nil
|
AchievementInfo.savedVars = nil
|
||||||
AchievementInfo.LangStore = {}
|
AchievementInfo.LangStore = {}
|
||||||
|
|
||||||
|
@ -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",
|
||||||
|
@ -17,6 +17,3 @@ I'll still be available here and be able to update the ESOUI page.
|
|||||||
**IMPORTANT: Github is a mirror.** Please contribute at [git.f-brinker.de/elderscrolls-addon-achievementInfo](https://git.f-brinker.de/fbrinker/elderscrolls-addon-achievementInfo) - You can login with your Github or Gitlab account (OAuth2).
|
**IMPORTANT: Github is a mirror.** Please contribute at [git.f-brinker.de/elderscrolls-addon-achievementInfo](https://git.f-brinker.de/fbrinker/elderscrolls-addon-achievementInfo) - You can login with your Github or Gitlab account (OAuth2).
|
||||||
|
|
||||||
Then, create a fork of the repository, do what you have to do and create a pull-request afterwards. Feel free to contact me any time.
|
Then, create a fork of the repository, do what you have to do and create a pull-request afterwards. Feel free to contact me any time.
|
||||||
|
|
||||||
#### Linting
|
|
||||||
Luacheck is used to check the LUA code. [Documentation](https://luacheck.readthedocs.io/en/stable/index.html)
|
|
読み込み中…
新しいイシューから参照
ユーザーをブロックする