Skip to content

Commit 095bde4

Browse files
committed
fix: weapon and armor not clickable from favs
1 parent d590327 commit 095bde4

File tree

3 files changed

+68
-59
lines changed

3 files changed

+68
-59
lines changed

Diff for: README.md

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ This system provides character sheets and items for your play, if you would lik
2929

3030

3131
## Release Notes
32+
33+
v6.0.2
34+
- 🐛 Fix: Favorite weapons were not rolling fixes issue [#128](https://github.com/fvtt-fria-ligan/vaesen-foundry-vtt/issues/128)
35+
- 🐛 Fix: Favorite armor was not rolling
36+
3237
v6.0.1
3338
- 🐛 Fix: NPC sheets were not rolling weapons
3439
- 🐛 Fix: NPC sheets were not rolling armor

Diff for: model/tab/player-favorites.hbs

+62-58
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,67 @@
11
<div class="flex column favorites">
2-
<b class="title" style="width: 98%;"> {{localize "HEADER.FAVORITES"}}</b>
3-
<div class="scrollable">
4-
<b>{{localize "HEADER.ARMORS"}}</b>
5-
<div class=" favorite armor flex row center light-border">
6-
<b class="icon">{{localize "ARMOR.ICON"}}</b>
7-
<b class="name">{{localize "ARMOR.NAME"}}</b>
8-
<b class="protection">{{localize "ARMOR.PROTECTION"}}</b>
9-
10-
<b class="button"> &nbsp;&nbsp; </b>
11-
</div>
12-
<div class="scrollable">
13-
{{#each items as |item|}}
14-
{{#if item.isArmor}}
15-
{{#if item.system.isFav}}
16-
<div class="favorite item armor flex row center align-center" data-item-id="{{item._id}}">
17-
<img class="icon" src="{{item.img}}" title="{{item.name}}"/>
18-
<div class="name">{{item.name}}</div>
19-
<div class="protection">{{item.system.protection}}</div>
20-
21-
<div class="button">
22-
<a class="item-control to-chat" title='{{localize UI.CHAT}}'><i class="fas fa-comment"></i></a>
23-
<a class="item-control fav-togle" title='{{localize "UI.FAVORITE"}}'><i class="fas fa-star"></i></a>
24-
<a class="item-control item-edit" title='{{localize "UI.EDIT"}}'><i class="fas fa-edit"></i></a>
25-
</div>
26-
</div>
27-
{{/if}}
28-
{{/if}}
29-
{{/each}}
2+
<b class="title" style="width: 98%;"> {{localize "HEADER.FAVORITES"}}</b>
3+
<div class="scrollable">
4+
<b>{{localize "HEADER.ARMORS"}}</b>
5+
<div class=" favorite armor flex row center light-border">
6+
<b class="icon">{{localize "ARMOR.ICON"}}</b>
7+
<b class="name">{{localize "ARMOR.NAME"}}</b>
8+
<b class="protection">{{localize "ARMOR.PROTECTION"}}</b>
9+
10+
<b class="button"> &nbsp;&nbsp; </b>
3011
</div>
31-
<b>{{localize "HEADER.WEAPONS"}}</b>
32-
<div class="favorite weapon flex row center light-border">
33-
<b class="icon">{{localize "WEAPON.ICON"}}</b>
34-
<b class="name">{{localize "WEAPON.NAME"}}</b>
35-
<b class="damage">{{localize "WEAPON.DAMAGE"}}</b>
36-
<b class="range">{{localize "WEAPON.RANGE"}}</b>
37-
38-
<b class="button"> &nbsp;&nbsp;&nbsp;&nbsp; </b>
12+
<div class="scrollable">
13+
{{#each items as |item|}}
14+
{{#if item.isArmor}}
15+
{{#if item.system.isFav}}
16+
<div class="favorite item armor flex row center align-center" data-item-id="{{item._id}}">
17+
<div class="icon-box armor-roll"><img class="icon" src="{{item.img}}" title="{{item.name}}" /></div>
18+
<div class="name">{{item.name}}</div>
19+
<div class="protection">{{item.system.protection}}</div>
20+
21+
<div class="button">
22+
<a class="item-control to-chat" title='{{localize UI.CHAT}}'><i class="fas fa-comment"></i></a>
23+
<a class="item-control fav-togle" title='{{localize "UI.FAVORITE"}}'><i
24+
class="fas fa-star"></i></a>
25+
<a class="item-control item-edit" title='{{localize "UI.EDIT"}}'><i class="fas fa-edit"></i></a>
26+
</div>
3927
</div>
40-
<div class="scrollable">
41-
{{#each items as |item|}}
42-
{{#if item.isWeapon}}
43-
{{#if item.system.isFav}}
44-
<div class="favorite weapon item flex row center align-center" data-item-id="{{item._id}}">
45-
<img class="icon" src="{{item.img}}" title="{{item.name}}" height="50" width="50"/>
46-
<div class="name">{{item.name}}</div>
47-
<div class="damage">{{item.system.damage}}</div>
48-
<div class="range">{{item.system.range}}</div>
49-
50-
<div class="button">
51-
<a class="item-control to-chat" title='{{localize UI.CHAT}}'><i class="fas fa-comment"></i></a>
52-
<a class="item-control fav-togle" title='{{localize "UI.FAVORITE"}}'><i class="fas fa-star"></i></a>
53-
<a class="item-control item-edit" title='{{localize "UI.EDIT"}}'><i class="fas fa-edit"></i></a>
54-
</div>
55-
</div>
56-
{{/if}}
57-
{{/if}}
58-
{{/each}}
28+
{{/if}}
29+
{{/if}}
30+
{{/each}}
31+
</div>
32+
<b>{{localize "HEADER.WEAPONS"}}</b>
33+
<div class="favorite weapon flex row center light-border">
34+
<b class="icon">{{localize "WEAPON.ICON"}}</b>
35+
<b class="name">{{localize "WEAPON.NAME"}}</b>
36+
<b class="damage">{{localize "WEAPON.DAMAGE"}}</b>
37+
<b class="range">{{localize "WEAPON.RANGE"}}</b>
38+
39+
<b class="button"> &nbsp;&nbsp;&nbsp;&nbsp; </b>
40+
</div>
41+
<div class="scrollable">
42+
{{#each items as |item|}}
43+
{{#if item.isWeapon}}
44+
{{#if item.system.isFav}}
45+
<div class="favorite weapon item flex row center align-center" data-item-id="{{item._id}}">
46+
<div class="icon weapon-roll">
47+
<img class="icon" src="{{item.img}}" title="{{item.name}}" height="50" width="50" />
48+
</div>
49+
<div class="name">{{item.name}}</div>
50+
<div class="damage">{{item.system.damage}}</div>
51+
<div class="range">{{item.system.range}}</div>
52+
53+
<div class="button">
54+
<a class="item-control to-chat" title='{{localize UI.CHAT}}'><i class="fas fa-comment"></i></a>
55+
<a class="item-control fav-togle" title='{{localize "UI.FAVORITE"}}'><i
56+
class="fas fa-star"></i></a>
57+
<a class="item-control item-edit" title='{{localize "UI.EDIT"}}'><i class="fas fa-edit"></i></a>
58+
</div>
5959
</div>
60-
</div>
61-
62-
60+
{{/if}}
61+
{{/if}}
62+
{{/each}}
63+
</div>
64+
</div>
65+
66+
6367
</div>

Diff for: system.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"title": "Vaesen",
33
"description": "Nordic horror role-playing",
4-
"version": "6.0.1",
4+
"version": "6.0.2",
55
"esmodules": [
66
"script/hooks.js"
77
],

0 commit comments

Comments
 (0)