Skip to content

Commit

Permalink
Working on issue #102 and #62. Basic support for linking items to ski…
Browse files Browse the repository at this point in the history
…lls, and making skill rolls using the item. If the item has the 'damage' field set to something, follows up with a damage roll.

Can now select a skill on owned items that is saved on the item. Deliberately no filtering of the skill you can select.
If you click an item with a linked skill, it is rolled, emitting a text like: 'Rolling Skillname using Itemname'. If it isn't linked, no roll occurs.
Advanced skill rolls (shift-click) now work.
Added in more of Kevin's layout fixes.
TODO Add a 'permanent modifier' field
TODO Support damage for advanced skill rolls as well as simple rolls.
TODO Clean up the code (May not be possible. Probably better to rewrite completely for #86. It's horrible.)
  • Loading branch information
xdy committed Sep 14, 2020
1 parent e81cdfe commit c1d79d6
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 58 deletions.
94 changes: 37 additions & 57 deletions static/styles/twodsix.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion static/templates/actors/parts/actor/actor-items.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

<span class="item-title">{{localize "TWODSIX.Actor.Items.WEAPONS"}}</span>
<div class="items-weapons gear-header">
<span></span>
<span class="item-name">{{localize "TWODSIX.Actor.Items.Name"}}</span>
<span class="item-name centre">{{localize "TWODSIX.Actor.Items.TL"}}</span>
<span class="item-name centre">{{localize "TWODSIX.Actor.Items.Qty"}}</span>
Expand All @@ -22,6 +23,7 @@
<ol class="ol-no-indent">
<li class="item flexrow" data-item-id="{{item._id}}">
<span class="items-weapons">
<span class="mini-dice rollable"><img class="rollable" data-label="{{item.name}}"src="./systems/twodsix/assets/d6-icon.svg" alt="d6"/></span>
<span class="item-name">{{item.name}}</span>
<span class="item-name centre">{{data.techLevel}}</span>
<span class="item-name centre">{{data.quantity}}</span>
Expand All @@ -44,11 +46,12 @@
<div><span class="pusher"></span>
<span class="item-title">{{localize "TWODSIX.Actor.Items.ARMOR"}}</span>
<div class="items-armor gear-header">
<span></span>
<span class="item-name">{{localize "TWODSIX.Actor.Items.Name"}}</span>
<span class="item-name centre">{{localize "TWODSIX.Actor.Items.TL"}}</span>
<span class="item-name centre">{{localize "TWODSIX.Actor.Items.Qty"}}</span>
<span class="item-name centre">{{localize "TWODSIX.Actor.Items.Weight"}}</span>
<span class="item-name centre">{{localize "TWODSIX.Actor.Items.ArmorNumber"}}</span>
<span class="item-name centre">{{localize "TWODSIX.Actor.Items.Armor"}}</span>
<span class="item-name centre"><a class="item-control item-create" title="Create item" data-type="armor"><i
class="fas fa-plus"></i></a></span>
</div>
Expand All @@ -59,6 +62,7 @@
<ol class="ol-no-indent">
<li class="item flexrow" data-item-id="{{item._id}}">
<span class="items-armor">
<span class="mini-dice rollable"><img class="rollable" data-label="{{item.name}}"src="./systems/twodsix/assets/d6-icon.svg" alt="d6"/></span>
<span class="item-name">{{item.name}}</span>
<span class="item-name centre">{{data.techLevel}}</span>
<span class="item-name centre">{{data.quantity}}</span>
Expand All @@ -79,6 +83,7 @@
<div><span class="pusher"></span>
<span class="item-title">{{localize "TWODSIX.Actor.Items.AUGMENTS"}}</span>
<div class="items-augments gear-header">
<span></span>
<span class="item-name">{{localize "TWODSIX.Actor.Items.Name"}}</span>
<span class="item-name centre">{{localize "TWODSIX.Actor.Items.TL"}}</span>
<span class="item-name centre">{{localize "TWODSIX.Actor.Items.Qty"}}</span>
Expand All @@ -93,6 +98,7 @@
<ol class="ol-no-indent">
<li class="item flexrow" data-item-id="{{item._id}}">
<span class="items-augments">
<span class="mini-dice rollable"><img class="rollable" data-label="{{item.name}}"src="./systems/twodsix/assets/d6-icon.svg" alt="d6"/></span>
<span class="item-name">{{item.name}}</span>
<span class="item-name centre">{{data.techLevel}}</span>
<span class="item-name centre">{{data.quantity}}</span>
Expand All @@ -113,6 +119,7 @@
<div><span class="pusher"></span>
<span class="item-title">{{localize "TWODSIX.Actor.Items.EQUIPMENT"}}</span>
<div class="items-equipment gear-header">
<span></span>
<span class="item-name">{{localize "TWODSIX.Actor.Items.Name"}}</span>
<span class="item-name centre">{{localize "TWODSIX.Actor.Items.TL"}}</span>
<span class="item-name centre">{{localize "TWODSIX.Actor.Items.Qty"}}</span>
Expand All @@ -126,6 +133,7 @@
<ol class="ol-no-indent">
<li class="item flexrow" data-item-id="{{item._id}}">
<span class="items-equipment">
<span class="mini-dice rollable"><img class="rollable" data-label="{{item.name}}"src="./systems/twodsix/assets/d6-icon.svg" alt="d6"/></span>
<span class="item-name">{{item.name}}</span>
<span class="item-name centre">{{data.techLevel}}</span>
<span class="item-name centre">{{data.quantity}}</span>
Expand Down

0 comments on commit c1d79d6

Please sign in to comment.