Skip to content

Commit 0effb7f

Browse files
author
LocalIdentity
committed
Merge branch 'dev' into spectres-0.3-act4
2 parents c8f0f34 + da18908 commit 0effb7f

38 files changed

Lines changed: 17453 additions & 8105 deletions

.github/tweak_changelogs.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
3+
RELEASE_VERSION="$1"
4+
5+
# Delete until the first line containing "--"
6+
sed -i '1,/--/d' temp_change.md
7+
# Reverse the order of lines in the file (last line becomes first, etc.)
8+
sed -i '1h;1d;$!H;$!d;G' temp_change.md
9+
# Convert "**Full Changelog**: URL" format to markdown link format "[Full Changelog](URL)"
10+
sed -i -re 's/\*\*Full Changelog\*\*: (.*)/\[Full Changelog\]\(\1\)\n/' temp_change.md
11+
# Delete everything from "## New Contributors" line to the end of file
12+
sed -i '/## New Contributors/,$d' temp_change.md
13+
# Convert GitHub changelog entries from "* description by @username in pull/URL/number"
14+
# to "- description [#number](pull/URL/number) ([username](https://github.com/username))" format
15+
sed -i -re 's/^\*(.*)\sby\s@(.*)\sin\s(.*\/pull\/)(.*)/-\1 [\\#\4](\3\4) ([\2](https:\/\/github.com\/\2))/' temp_change.md
16+
# Username substitutions for preferred display names
17+
sed -i 's/\[Quotae/\[Quote_a/' temp_change.md
18+
sed -i 's/\[learn2draw/\[Lexy/' temp_change.md
19+
sed -i 's/\[Voronoff/\[Tom Clancy Is Dead/' temp_change.md
20+
sed -i 's/\[PJacek/\[TPlant/' temp_change.md
21+
sed -i 's/\[justjuangui/\[trompetin17/' temp_change.md
22+
23+
cp temp_change.md changelog_temp.txt
24+
# Append existing CHANGELOG.md content (excluding first line) to temp_change.md
25+
sed '1d' CHANGELOG.md >> temp_change.md
26+
# Create new CHANGELOG.md with header containing version and date, followed by processed changes
27+
printf "# Changelog\n\n## [$RELEASE_VERSION](https://github.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/tree/$RELEASE_VERSION) ($(date +'%Y/%m/%d'))\n\n" | cat - temp_change.md > CHANGELOG.md
28+
# Convert changelog entries from markdown link format to simplified "* description (username)" format
29+
sed -i -re 's/^- (.*) \[.*\) \(\[(.*)\]\(.*/* \1 (\2)/' changelog_temp.txt
30+
# Create new changelog format: add version header, remove lines 2-3, format section headers, remove ## headers with following line, prepend to existing changelog
31+
echo "VERSION[${RELEASE_VERSION#v}][$(date +'%Y/%m/%d')]" | cat - changelog_temp.txt | sed '2,3d' | sed -re 's/^### (.*)/\n--- \1 ---/' | sed -e '/^##.*/,+1 d' | cat - changelog.txt > changelog_new.txt
32+
mv changelog_new.txt changelog.txt
33+
34+
# Normalize line endings to CRLF for all output files to ensure consistent checksums with Windows
35+
sed 's/\r*$/\r/' CHANGELOG.md > CHANGELOG_normalized.md && mv CHANGELOG_normalized.md CHANGELOG.md
36+
sed 's/\r*$/\r/' changelog.txt > changelog_normalized.txt && mv changelog_normalized.txt changelog.txt
37+
38+
# Clean up temporary files
39+
rm temp_change.md
40+
rm changelog_temp.txt

.github/workflows/beta.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,26 @@ jobs:
2020
run: |
2121
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
2222
git config --global user.name "github-actions[bot]"
23+
# The hash suffix will help identifying if the beta version is up-to-date
24+
- name: Add commit hash suffix to manifest version
25+
run: |
26+
sed -i "s/<Version number=\"\([^\"]*\)\"/<Version number=\"\1-$(git rev-parse --short HEAD)\"/g" manifest.xml
27+
- name: Generate Release notes
28+
run: |
29+
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
30+
# Delete existing beta draft if it exists
31+
if gh release view beta >/dev/null 2>&1; then
32+
gh release delete beta --yes
33+
fi
34+
# Create new beta draft release with generated notes
35+
gh release create beta --title "Beta Release" --draft --generate-notes
36+
gh release view beta > temp_change.md
37+
- name: Tweak changelogs
38+
run: |
39+
# Remove carriage returns to be able to run the script
40+
sed -i 's/\r$//' .github/tweak_changelogs.sh
41+
chmod +x .github/tweak_changelogs.sh
42+
.github/tweak_changelogs.sh beta
2343
- name: Update manifest.xml
2444
run: python3 update_manifest.py --quiet --in-place
2545
- name: Push to beta branch

.github/workflows/release.yml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,11 @@ jobs:
2929
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token;
3030
gh release view $(basename ${{ github.event.inputs.releaseNoteUrl }}) > temp_change.md
3131
- name: Tweak changelogs
32-
run: >
33-
sed -i '1,10d' temp_change.md;
34-
sed -i '1h;1d;$!H;$!d;G' temp_change.md;
35-
sed -i -re 's/\*\*Full Changelog\*\*: (.*)/\[Full Changelog\]\(\1\)\n/' temp_change.md;
36-
sed -i '/## New Contributors/,$d' temp_change.md;
37-
sed -i -re 's/^\*(.*)\sby\s@(.*)\sin\s(.*\/pull\/)(.*)\r?/-\1 [\\#\4](\3\4) ([\2](https:\/\/github.com\/\2))/' temp_change.md;
38-
sed -i 's/\[Quotae/\[Quote_a/' temp_change.md;
39-
sed -i 's/\[learn2draw/\[Lexy/' temp_change.md;
40-
sed -i 's/\[Voronoff/\[Tom Clancy Is Dead/' temp_change.md;
41-
sed -i 's/\[PJacek/\[TPlant/' temp_change.md;
42-
sed -i 's/\[justjuangui/\[trompetin17/' temp_change.md;
43-
sed -i 's/\r//g' temp_change.md;
44-
cp temp_change.md changelog_temp.txt;
45-
cat CHANGELOG.md | tr \\r \\n | sed '1d' >> temp_change.md;
46-
printf "# Changelog\n\n## [v${{ github.event.inputs.releaseVersion }}](https://github.com/PathOfBuildingCommunity/PathOfBuilding/tree/v${{ github.event.inputs.releaseVersion }}) ($(date +'%Y/%m/%d'))\n\n" | cat - temp_change.md > CHANGELOG.md;
47-
48-
sed -i -re 's/^- (.*) \[.*\) \(\[(.*)\]\(.*/* \1 (\2)/' changelog_temp.txt;
49-
echo "VERSION[${{ github.event.inputs.releaseVersion }}][`date +'%Y/%m/%d'`]" | cat - changelog_temp.txt | tr -d \\r | sed '2,3d' | sed -re 's/^### (.*)/\n--- \1 ---/' | sed -e '/^##.*/,+1 d' | cat - changelog.txt > changelog_new.txt;
50-
rm temp_change.md;
51-
rm changelog_temp.txt;
52-
mv changelog_new.txt changelog.txt
32+
run: |
33+
# Remove carriage returns to be able to run the script
34+
sed -i 's/\r$//' .github/tweak_changelogs.sh
35+
chmod +x .github/tweak_changelogs.sh
36+
.github/tweak_changelogs.sh "v${{ github.event.inputs.releaseVersion }}"
5337
- name: Create Pull Request
5438
uses: peter-evans/create-pull-request@v5
5539
with:

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,19 @@ jobs:
1616
run: busted --lua=luajit
1717
- name: Report coverage
1818
run: cd src; luacov-coveralls --repo-token=${{ secrets.github_token }} -e TestData -e Data -e runtime
19+
check_modcache:
20+
runs-on: ubuntu-latest
21+
container: ghcr.io/pathofbuildingcommunity/pathofbuilding-tests:latest
22+
steps:
23+
- name: Install git dependency
24+
run: apk add git
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
- name: Regenerate ModCache
28+
env:
29+
LUA_PATH: ../runtime/lua/?.lua;../runtime/lua/?/init.lua
30+
REGENERATE_MOD_CACHE: 1
31+
run: cd src; luajit HeadlessWrapper.lua
32+
- run: git config --global --add safe.directory $(pwd)
33+
- name: Check if the generated ModCache is different
34+
run: git diff --exit-code src/Data/ModCache.lua

src/Classes/GemSelectControl.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ function GemSelectClass:AddGemTooltip(gemInstance)
548548
-- Will need rework if a gem can have 2+ additional supports
549549
self:AddGrantedEffectInfo(gemInstance, grantedEffect, true)
550550
for _, statSet in ipairs(grantedEffect.statSets) do
551-
self:AddStatSetInfo(gemInstance, grantedEffect, statSet)
551+
self:AddStatSetInfo(gemInstance, grantedEffect, statSet, nil , _)
552552
end
553553

554554
for _, additional in ipairs(additionalEffects or {}) do
@@ -560,11 +560,11 @@ function GemSelectClass:AddGemTooltip(gemInstance)
560560
self.tooltip:AddSeparator(10)
561561
self:AddGrantedEffectInfo(gemInstance, additional)
562562
for _, statSet in ipairs(additional.statSets) do
563-
self:AddStatSetInfo(gemInstance, additional, statSet)
563+
self:AddStatSetInfo(gemInstance, additional, statSet, nil, _)
564564
end
565565
else
566566
for _, statSet in ipairs(additional.statSets) do
567-
self:AddStatSetInfo(gemInstance, additional, statSet, true)
567+
self:AddStatSetInfo(gemInstance, additional, statSet, true, _)
568568
end
569569
end
570570
end
@@ -692,10 +692,10 @@ function GemSelectClass:AddGrantedEffectInfo(gemInstance, grantedEffect, addReq)
692692
end
693693
end
694694
end
695-
function GemSelectClass:AddStatSetInfo(gemInstance, grantedEffect, statSet, noLabel)
695+
function GemSelectClass:AddStatSetInfo(gemInstance, grantedEffect, statSet, noLabel, index)
696696
local displayInstance = gemInstance.displayEffect or gemInstance
697697
local statSetLevel = statSet.levels[displayInstance.level] or { }
698-
if statSet.label ~= grantedEffect.name and statSet.label ~= "" and not noLabel then
698+
if not (index == 1 and statSet.label == grantedEffect.name) and statSet.label ~= "" and not noLabel then
699699
self.tooltip:AddSeparator(10)
700700
self.tooltip:AddLine(20, colorCodes.GEM .. statSet.label)
701701
self.tooltip:AddSeparator(10)

src/Classes/ImportTab.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ local ImportTabClass = newClass("ImportTab", "ControlHost", "Control", function(
160160
self.controls.exportFrom:SelByValue(self.exportWebsiteSelected or main.lastExportWebsite or "Pastebin", "id")
161161
self.controls.generateCodeByLink = new("ButtonControl", { "LEFT", self.controls.exportFrom, "RIGHT"}, {8, 0, 100, 20}, "Share", function()
162162
local exportWebsite = exportWebsitesList[self.controls.exportFrom.selIndex]
163-
local response = buildSites.UploadBuild(self.controls.generateCodeOut.buf, exportWebsite)
164-
if response then
163+
local subScriptId = buildSites.UploadBuild(self.controls.generateCodeOut.buf, exportWebsite)
164+
if subScriptId then
165165
self.controls.generateCodeOut:SetText("")
166166
self.controls.generateCodeByLink.label = "Creating link..."
167-
launch:RegisterSubScript(response, function(pasteLink, errMsg)
167+
launch:RegisterSubScript(subScriptId, function(pasteLink, errMsg)
168168
self.controls.generateCodeByLink.label = "Share"
169169
if errMsg then
170170
main:OpenMessagePopup(exportWebsite.id, "Error creating link:\n"..errMsg)

src/Classes/PassiveTreeView.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build, incSmallPassi
13081308
local function processTimeLostModsAndGetLocalEffect(mNode, build)
13091309
local localIncEffect = 0
13101310
local hasWSCondition = false
1311-
local newSd = copyTable(build.spec.tree.nodes[mNode.id].sd)
1311+
local newSd = copyTable(mNode.sd)
13121312
for _, mod in ipairs(mNode.finalModList) do
13131313
-- if the jewelMod has a WS Condition, only add the incEffect given it matches the activeWeaponSet
13141314
-- otherwise the mod came from a jewel that is allocMode 0, so it always applies
@@ -1348,7 +1348,7 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build, incSmallPassi
13481348
local isInRadius = false
13491349
for id, socket in pairs(build.itemsTab.sockets) do
13501350
if build.itemsTab.activeSocketList and socket.inactive == false or socket.inactive == nil then
1351-
isInRadius = isInRadius or (build.spec.nodes[id] and build.spec.nodes[id].nodesInRadius and build.spec.nodes[id].nodesInRadius[3][node.id] ~= nil)
1351+
isInRadius = isInRadius or (build.spec.nodes[id] and build.spec.nodes[id].nodesInRadius and build.spec.nodes[id].nodesInRadius[4][node.id] ~= nil)
13521352
if isInRadius then break end
13531353
end
13541354
end
@@ -1366,7 +1366,7 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build, incSmallPassi
13661366
if mNode.sd and mNode.sd[1] and not mNode.allMasteryOptions then
13671367
tooltip:AddLine(16, "")
13681368
local localIncEffect = 0
1369-
if not mNode.isAttribute and (mNode.type == "Normal" or mNode.type == "Notable") and isNodeInARadius(node) then
1369+
if not (mNode.isAttribute and not mNode.conqueredBy) and (mNode.type == "Normal" or mNode.type == "Notable") and isNodeInARadius(node) then
13701370
localIncEffect = processTimeLostModsAndGetLocalEffect(mNode, build)
13711371
end
13721372
for i, line in ipairs(mNode.sd) do

src/Classes/PoEAPI.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ function PoEAPIClass:FetchAuthToken(callback)
8080
if id then
8181
launch.subScripts[id] = {
8282
type = "DOWNLOAD",
83-
callback = function(code, state, port)
83+
callback = function(code, errMsg, state, port)
8484
if not code then
85-
ConPrintf("Failed to get code from server")
85+
ConPrintf("Failed to get code from server: %s", errMsg)
8686
self.authToken = nil
8787
self.refreshToken = nil
8888
self.tokenExpiry = nil

src/Classes/TradeQueryGenerator.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ local tradeCategoryNames = {
4040
["2HMace"] = { "Two Handed Mace" },
4141
-- ["FishingRod"] = { "Fishing Rod" },
4242
["BaseJewel"] = { "Jewel" },
43-
["AnyJewel"] = { "Jewel" },
43+
["RadiusJewel"] = { "Jewel: Radius" },
44+
["AnyJewel"] = { "Jewel", "Jewel: Radius" },
4445
["LifeFlask"] = { "Flask: Life" },
4546
["ManaFlask"] = { "Flask: Mana" },
4647
["Charm"] = { "Charm" },
4748
-- doesn't have trade mods
48-
-- ["RadiusJewel"] = { "Jewel: Radius" },
4949
-- not in the game yet.
5050
-- ["TrapTool"] = { "TrapTool"}, Unsure if correct
5151
["Flail"] = { "Flail" },
@@ -80,11 +80,11 @@ for type, bases in pairs(data.itemBaseLists) do
8080
end
8181

8282
local tradeStatCategoryIndices = {
83-
["Explicit"] = 1,
84-
["Implicit"] = 2,
85-
["Corrupted"] = 3,
86-
["AllocatesXEnchant"] = 3,
87-
["Rune"] = 4,
83+
["Explicit"] = 2,
84+
["Implicit"] = 3,
85+
["Corrupted"] = 4,
86+
["AllocatesXEnchant"] = 5,
87+
["Rune"] = 6,
8888
}
8989

9090
local MAX_FILTERS = 35
@@ -375,7 +375,7 @@ function TradeQueryGeneratorClass:InitMods()
375375

376376
self:GenerateModData(data.itemMods.Item, tradeQueryStatsParsed, regularItemMask)
377377
self:GenerateModData(data.itemMods.Corruption, tradeQueryStatsParsed, regularItemMask)
378-
self:GenerateModData(data.itemMods.Jewel, tradeQueryStatsParsed, { ["BaseJewel"] = true, ["AnyJewel"] = true })
378+
self:GenerateModData(data.itemMods.Jewel, tradeQueryStatsParsed, { ["BaseJewel"] = true, ["AnyJewel"] = true, ["RadiusJewel"] = true })
379379
self:GenerateModData(data.itemMods.Flask, tradeQueryStatsParsed, { ["LifeFlask"] = true, ["ManaFlask"] = true })
380380
self:GenerateModData(data.itemMods.Charm, tradeQueryStatsParsed, { ["Charm"] = true })
381381

src/Data/Gems.lua

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,28 @@ return {
926926
Tier = 9,
927927
naturalMaxLevel = 20,
928928
},
929+
["Metadata/Items/Gems/SkillGemVileDisruption"] = {
930+
name = "His Vile Intrusion",
931+
baseTypeName = "His Vile Intrusion",
932+
gameId = "Metadata/Items/Gems/SkillGemVileDisruption",
933+
variantId = "VileDisruption",
934+
grantedEffectId = "VileDisruptionPlayer",
935+
tags = {
936+
intelligence = true,
937+
grants_active_skill = true,
938+
spell = true,
939+
area = true,
940+
physical = true,
941+
duration = true,
942+
},
943+
gemType = "Spell",
944+
tagString = "AoE, Physical, Duration",
945+
reqStr = 0,
946+
reqDex = 0,
947+
reqInt = 100,
948+
Tier = 0,
949+
naturalMaxLevel = 20,
950+
},
929951
["Metadata/Items/Gems/SkillGemArmourBreaker"] = {
930952
name = "Armour Breaker",
931953
baseTypeName = "Armour Breaker",
@@ -7564,6 +7586,30 @@ return {
75647586
Tier = 5,
75657587
naturalMaxLevel = 20,
75667588
},
7589+
["Metadata/Items/Gems/SkillGemScatteringCalamity"] = {
7590+
name = "His Scattering Calamity",
7591+
baseTypeName = "His Scattering Calamity",
7592+
gameId = "Metadata/Items/Gems/SkillGemScatteringCalamity",
7593+
variantId = "ScatteringCalamity",
7594+
grantedEffectId = "ScatteringCalamityPlayer",
7595+
additionalStatSet1 = "ScatteringCalamityExplosionPlayer",
7596+
tags = {
7597+
intelligence = true,
7598+
grants_active_skill = true,
7599+
spell = true,
7600+
area = true,
7601+
projectile = true,
7602+
lightning = true,
7603+
duration = true,
7604+
},
7605+
gemType = "Spell",
7606+
tagString = "AoE, Projectile, Lightning, Duration",
7607+
reqStr = 0,
7608+
reqDex = 0,
7609+
reqInt = 100,
7610+
Tier = 0,
7611+
naturalMaxLevel = 20,
7612+
},
75677613
["Metadata/Items/Gems/SkillGemHighVelocityRounds"] = {
75687614
name = "High Velocity Rounds",
75697615
baseTypeName = "Load High Velocity Rounds",
@@ -16687,6 +16733,30 @@ return {
1668716733
Tier = 13,
1668816734
naturalMaxLevel = 20,
1668916735
},
16736+
["Metadata/Items/Gems/SkillGemSpellslinger"] = {
16737+
name = "Spellslinger",
16738+
baseTypeName = "Spellslinger",
16739+
gameId = "Metadata/Items/Gem/SkillGemSpellslinger",
16740+
variantId = "Spellslinger",
16741+
grantedEffectId = "MetaSpellslingerPlayer",
16742+
additionalGrantedEffectId1 = "SupportSpellslingerPlayer",
16743+
tags = {
16744+
intelligence = true,
16745+
grants_active_skill = true,
16746+
buff = true,
16747+
persistent = true,
16748+
trigger = true,
16749+
invocation = true,
16750+
meta = true,
16751+
},
16752+
gemType = "Buff",
16753+
tagString = "Persistent, Trigger, Invocation, Meta",
16754+
reqStr = 0,
16755+
reqDex = 0,
16756+
reqInt = 100,
16757+
Tier = 0,
16758+
naturalMaxLevel = 20,
16759+
},
1669016760
["Metadata/Items/Gems/SkillGemIceTippedArrows"] = {
1669116761
name = "Ice-Tipped Arrows",
1669216762
baseTypeName = "Ice-Tipped Arrows",
@@ -16760,6 +16830,52 @@ return {
1676016830
Tier = 0,
1676116831
naturalMaxLevel = 20,
1676216832
},
16833+
["Metadata/Items/Gems/SkillGemHisWinnowingFlame"] = {
16834+
name = "His Winnowing Flame",
16835+
baseTypeName = "His Winnowing Flame",
16836+
gameId = "Metadata/Items/Gems/SkillGemHisWinnowingFlame",
16837+
variantId = "HisWinnowingFlame",
16838+
grantedEffectId = "HisWinnowingFlamePlayer",
16839+
additionalGrantedEffectId1 = "TriggeredHisWinnowingFlamePillarPlayer",
16840+
tags = {
16841+
intelligence = true,
16842+
grants_active_skill = true,
16843+
spell = true,
16844+
area = true,
16845+
fire = true,
16846+
payoff = true,
16847+
},
16848+
gemType = "Spell",
16849+
tagString = "AoE, Fire, Payoff",
16850+
reqStr = 0,
16851+
reqDex = 0,
16852+
reqInt = 100,
16853+
Tier = 0,
16854+
naturalMaxLevel = 20,
16855+
},
16856+
["Metadata/Items/Gems/SkillGemHisFoulEmergence"] = {
16857+
name = "His Foul Emergence",
16858+
baseTypeName = "His Foul Emergence",
16859+
gameId = "Metadata/Items/Gems/SkillGemHisFoulEmergence",
16860+
variantId = "HisFoulEmergence",
16861+
grantedEffectId = "HisFoulEmergencePlayer",
16862+
tags = {
16863+
intelligence = true,
16864+
grants_active_skill = true,
16865+
spell = true,
16866+
area = true,
16867+
physical = true,
16868+
chaos = true,
16869+
duration = true,
16870+
},
16871+
gemType = "Spell",
16872+
tagString = "AoE, Physical, Chaos, Duration",
16873+
reqStr = 0,
16874+
reqDex = 0,
16875+
reqInt = 100,
16876+
Tier = 0,
16877+
naturalMaxLevel = 20,
16878+
},
1676316879
["Metadata/Items/Gems/SkillGemSiphonElements"] = {
1676416880
name = "Siphon Elements",
1676516881
baseTypeName = "Siphon Elements",

0 commit comments

Comments
 (0)