Skip to content

Commit

Permalink
Fix company perk not being correctly used for the travel table amount.
Browse files Browse the repository at this point in the history
  • Loading branch information
DeKleineKobini committed Dec 13, 2022
1 parent 1a4afb9 commit b85a8ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion extension/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
{ "message": "Fix travel table count to be correct for business travel.", "contributor": "DeKleineKobini" },
{ "message": "Fix hide chat position.", "contributor": "DeKleineKobini" },
{ "message": "Fix trade value not working when there is a peace treaty included.", "contributor": "DeKleineKobini" },
{ "message": "Fix stock alert reaches not working correctly.", "contributor": "DeKleineKobini" }
{ "message": "Fix stock alert reaches not working correctly.", "contributor": "DeKleineKobini" },
{ "message": "Fix company perk not being correctly used for the travel table amount.", "contributor": "DeKleineKobini" }
],
"changes": [
{ "message": "Improve feature manager overlaps.", "contributor": "Kwack" },
Expand Down
3 changes: 1 addition & 2 deletions extension/scripts/features/travel-table/ttTravelTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,9 +558,8 @@
.filter((result) => !!result)
.map((result) => parseInt(result[1]))
.totalSum();
// CHECK - Improve job perk checking.
count += userdata.job_perks
.filter((perk) => perk.includes("travel capacity") || perk.includes("travel items"))
.filter((perk) => perk.includes("travel") && (perk.includes("item") || perk.includes("capacity")))
.map((perk) => parseInt(perk.replace("+ ", "").split(" ")[0]))
.totalSum();
count += userdata.faction_perks
Expand Down

0 comments on commit b85a8ff

Please sign in to comment.