ENH: Weapon quality icons
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 189 KiB |
|
@ -188,9 +188,6 @@
|
||||||
"OSE.items.RollTarget": "Target",
|
"OSE.items.RollTarget": "Target",
|
||||||
"OSE.items.RollType": "Type",
|
"OSE.items.RollType": "Type",
|
||||||
"OSE.items.Damage": "Damage",
|
"OSE.items.Damage": "Damage",
|
||||||
"OSE.items.Melee": "Melee",
|
|
||||||
"OSE.items.Missile": "Missile",
|
|
||||||
"OSE.items.Slow": "Slow",
|
|
||||||
"OSE.items.ArmorAC": "AC",
|
"OSE.items.ArmorAC": "AC",
|
||||||
"OSE.items.ArmorAAC": "AAC",
|
"OSE.items.ArmorAAC": "AAC",
|
||||||
"OSE.items.Bonus": "Bonus",
|
"OSE.items.Bonus": "Bonus",
|
||||||
|
@ -201,6 +198,16 @@
|
||||||
"OSE.items.typeTag": "Type a comma separated list of tag e.g 'Melee,Missile (5’–10’ / 11’–20’ / 21’–30’)'",
|
"OSE.items.typeTag": "Type a comma separated list of tag e.g 'Melee,Missile (5’–10’ / 11’–20’ / 21’–30’)'",
|
||||||
"OSE.items.pattern": "Attack pattern marker",
|
"OSE.items.pattern": "Attack pattern marker",
|
||||||
|
|
||||||
|
"OSE.items.Melee": "Melee",
|
||||||
|
"OSE.items.Missile": "Missile",
|
||||||
|
"OSE.items.Slow": "Slow",
|
||||||
|
"OSE.items.TwoHanded": "Two-handed",
|
||||||
|
"OSE.items.Blunt": "Blunt",
|
||||||
|
"OSE.items.Brace": "Brace",
|
||||||
|
"OSE.items.Splash": "Splash weapon",
|
||||||
|
"OSE.items.Reload": "Reload",
|
||||||
|
"OSE.items.Charge": "Charge",
|
||||||
|
|
||||||
"OSE.armor.type": "Armor Type",
|
"OSE.armor.type": "Armor Type",
|
||||||
"OSE.armor.unarmored": "Unarmored",
|
"OSE.armor.unarmored": "Unarmored",
|
||||||
"OSE.armor.light": "Light",
|
"OSE.armor.light": "Light",
|
||||||
|
|
|
@ -70,17 +70,22 @@ export const OSE = {
|
||||||
melee: "OSE.items.Melee",
|
melee: "OSE.items.Melee",
|
||||||
missile: "OSE.items.Missile",
|
missile: "OSE.items.Missile",
|
||||||
slow: "OSE.items.Slow",
|
slow: "OSE.items.Slow",
|
||||||
blunt: "OSE.items.Blunt",
|
|
||||||
reload: "OSE.items.Reload",
|
|
||||||
splash: "OSE.items.Splash",
|
|
||||||
brace: "OSE.items.Brace",
|
|
||||||
twohanded: "OSE.items.TwoHanded",
|
twohanded: "OSE.items.TwoHanded",
|
||||||
|
blunt: "OSE.items.Blunt",
|
||||||
|
brace: "OSE.items.Brace",
|
||||||
|
splash: "OSE.items.Splash",
|
||||||
|
reload: "OSE.items.Reload",
|
||||||
|
charge: "OSE.items.Charge",
|
||||||
},
|
},
|
||||||
tag_images: {
|
tag_images: {
|
||||||
melee: "/systems/ose/assets/melee.png",
|
melee: "/systems/ose/assets/melee.png",
|
||||||
missile: "/systems/ose/assets/missile.png",
|
missile: "/systems/ose/assets/missile.png",
|
||||||
slow: "<i class='fas fa-snail'></i>",
|
slow: "/systems/ose/assets/slow.png",
|
||||||
twohanded: "/systems/ose/assets/twohanded.png",
|
twohanded: "/systems/ose/assets/twohanded.png",
|
||||||
|
blunt: "/systems/ose/assets/blunt.png",
|
||||||
|
brace: "/systems/ose/assets/brace.png",
|
||||||
|
splash: "/systems/ose/assets/splash.png",
|
||||||
|
reload: "/systems/ose/assets/reload.png",
|
||||||
|
charge: "/systems/ose/assets/charge.png",
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// fa-sign-language
|
|
|
@ -38,6 +38,11 @@ export const registerHelpers = async function () {
|
||||||
return Math.round(parseFloat(weight) / 100) / 10;
|
return Math.round(parseFloat(weight) / 100) / 10;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper("getTagIcon", function (tag) {
|
||||||
|
let idx = Object.keys(CONFIG.OSE.tags).find(k => (CONFIG.OSE.tags[k] == tag));
|
||||||
|
return CONFIG.OSE.tag_images[idx];
|
||||||
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper("counter", function (status, value, max) {
|
Handlebars.registerHelper("counter", function (status, value, max) {
|
||||||
return status
|
return status
|
||||||
? Math.clamped((100.0 * value) / max, 0, 100)
|
? Math.clamped((100.0 * value) / max, 0, 100)
|
||||||
|
|
|
@ -190,8 +190,9 @@ export class OseItem extends Item {
|
||||||
let title = "";
|
let title = "";
|
||||||
if (matches) {
|
if (matches) {
|
||||||
title = matches[1];
|
title = matches[1];
|
||||||
val = val.substring(0, matches.index);
|
val = val.substring(0, matches.index).trim();
|
||||||
} else {
|
} else {
|
||||||
|
val = val.trim();
|
||||||
title = val;
|
title = val;
|
||||||
}
|
}
|
||||||
// Auto fill checkboxes
|
// Auto fill checkboxes
|
||||||
|
|
|
@ -290,6 +290,11 @@
|
||||||
img {
|
img {
|
||||||
border: none;
|
border: none;
|
||||||
margin: 3px 1px;
|
margin: 3px 1px;
|
||||||
|
flex: 0 0 24px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
font-size: 12px;
|
||||||
|
flex-grow: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.field-flex {
|
.field-flex {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<li class="item-titles flexrow">
|
<li class="item-titles flexrow">
|
||||||
<div class="item-caret"><i class="fas fa-caret-down"></i></div>
|
<div class="item-caret"><i class="fas fa-caret-down"></i></div>
|
||||||
<div class="item-name">{{localize "OSE.items.Weapons"}}</div>
|
<div class="item-name">{{localize "OSE.items.Weapons"}}</div>
|
||||||
<div class="field-longer">{{localize "OSE.items.Qualities"}}</div>
|
<div class="icon-row">{{localize "OSE.items.Qualities"}}</div>
|
||||||
<div class="field-short"><i class="fas fa-weight-hanging"></i></div>
|
<div class="field-short"><i class="fas fa-weight-hanging"></i></div>
|
||||||
<div class="item-controls">
|
<div class="item-controls">
|
||||||
<a class="item-control item-create" data-type="weapon" title="{{localize 'OSE.Add'}}"><i
|
<a class="item-control item-create" data-type="weapon" title="{{localize 'OSE.Add'}}"><i
|
||||||
|
@ -22,14 +22,18 @@
|
||||||
</h4>
|
</h4>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon-row field-longer">
|
<div class="icon-row flexrow">
|
||||||
{{#each item.data.tags as |tag|}}
|
{{#each item.data.tags as |tag|}}
|
||||||
{{#if (lookup @root.config.tag_images tag.value)}}
|
{{#if (getTagIcon tag.value)}}
|
||||||
<img title="{{tag.title}}" src="{{lookup @root.config.tag_images tag.value}}" width="24" height="24"/>
|
<img title="{{tag.title}}" src="{{getTagIcon tag.value}}" width="24" height="24"/>
|
||||||
{{else}}
|
|
||||||
<span title="{{tag.title}}">{{tag.value}}</span>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
{{#each item.data.tags as |tag|}}
|
||||||
|
{{#unless (getTagIcon tag.value)}}
|
||||||
|
<span title="{{tag.title}}">{{tag.value}}{{#unless @last}},{{/unless}}</span>
|
||||||
|
|
||||||
|
{{/unless}}
|
||||||
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
<div class="field-short">
|
<div class="field-short">
|
||||||
{{#if @root.config.encumbranceBasic}}_{{else}}{{item.data.weight}}{{/if}}
|
{{#if @root.config.encumbranceBasic}}_{{else}}{{item.data.weight}}{{/if}}
|
||||||
|
|