Skip to content

Commit

Permalink
Handle uniques tab
Browse files Browse the repository at this point in the history
  • Loading branch information
axelberardino committed Feb 3, 2020
1 parent 16bf82f commit 570172f
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ go run cmd/cli/main.go --account cptpingu --poesessid 87f93201234f1234f --output
### Not supported yet

* Map stash tab (known issue: https://www.pathofexile.com/forum/view-thread/1733474#p13674912)
* Unique stash tab
* Unique stash tab (known issue: https://www.pathofexile.com/forum/view-thread/1733474#p13674912)
* Too much jewels on the character will overflow

### FAQ
Expand Down
13 changes: 12 additions & 1 deletion data/template/parts/item.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,18 @@
{{ $layoutType = "map" }}
<div class="stashTabContents poeScroll mapStash" style="border-color: rgb(124, 84, 54);">
<p style="width: 75%; margin: 0; position: absolute; top: 50%; left: 50%; -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%);">
There is currently a bug on GGG side which prevents anyone to get maps from their API.
There is currently a bug on GGG side which prevents anyone to view their maps tab.
They acknowledged the issue, and they are working on it. See:<br />
<a style="text-decoration: underline;" href="https://www.pathofexile.com/forum/view-thread/1733474#p13674912">
https://www.pathofexile.com/forum/view-thread/1733474#p13674912
</a>
</p>
{{ else if .UniqueLayout }}
{{ $layout = .UniqueLayout }}
{{ $layoutType = "unique" }}
<div class="stashTabContents poeScroll divinationStash" style="border-color: rgb(124, 84, 54);">
<p style="width: 75%; margin: 0; position: absolute; top: 50%; left: 50%; -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%);">
There is currently a bug on GGG side which prevents anyone to view their uniques tab.
They acknowledged the issue, and they are working on it. See:<br />
<a style="text-decoration: underline;" href="https://www.pathofexile.com/forum/view-thread/1733474#p13674912">
https://www.pathofexile.com/forum/view-thread/1733474#p13674912
Expand Down
4 changes: 4 additions & 0 deletions generate/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ func DeducePosX(layoutType, inventoryId string, layout map[string]models.Layout,
}
case models.MapLayout:
return 0
case models.UniqueLayout:
return 0
case models.JewelLayout:
return 287 + float64(idx)*47
case models.InventoryLayout:
Expand Down Expand Up @@ -243,6 +245,8 @@ func DeducePosY(layoutType, inventoryId string, layout map[string]models.Layout,
}
case models.MapLayout:
return 0
case models.UniqueLayout:
return 0
case models.JewelLayout:
return -47
case models.InventoryLayout:
Expand Down
1 change: 1 addition & 0 deletions models/item.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,5 @@ const (
QuadLayout = "quad"
EssenceLayout = "essence"
DivinationLayout = "divination"
UniqueLayout = "unique"
)
3 changes: 2 additions & 1 deletion models/stash.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ type StashTab struct {
DivinationLayout DivineLayout `json:"divinationLayout"`

// Can be empty, hence the *, for allowing to be nullable.
MapLayout *map[string]Layout `json:"mapLayout"`
MapLayout *map[string]Layout `json:"mapLayout"`
UniqueLayout *map[string]Layout `json:"uniqueLayout"`
}

func (s *StashTab) String() string {
Expand Down

0 comments on commit 570172f

Please sign in to comment.