#6 Lasten und Gewichte #52

Merged
Byroks merged 16 commits from lasten into develop 2024-02-24 11:23:39 +01:00
10 changed files with 334 additions and 69 deletions
Showing only changes of commit 365f06575e - Show all commits

View File

@ -17,6 +17,7 @@
"midgard5.phase-movement": "Bewegungsphase", "midgard5.phase-movement": "Bewegungsphase",
"midgard5.no-encounter": "Kein Kampf", "midgard5.no-encounter": "Kein Kampf",
"midgard5.encounter-not-started": "Kein aktiver Kampf", "midgard5.encounter-not-started": "Kein aktiver Kampf",
"midgard5.initiative": "Initiative",
"midgard5.time-duration": "Dauer", "midgard5.time-duration": "Dauer",
"midgard5.time-round": "Runde(n)", "midgard5.time-round": "Runde(n)",
@ -36,7 +37,7 @@
"midgard5.attributes": "Eigenschaften", "midgard5.attributes": "Eigenschaften",
"midgard5.points": "Punkte", "midgard5.points": "Punkte",
"midgard5.calculated-value": "Berechneter Wert", "midgard5.calculated-value": "Berechneter Wert",
"midgard5.calculated-values": "Sonstige Werte", "midgard5.calculated-values": "Werte und Boni",
"midgard5.skill": "Fertigkeit", "midgard5.skill": "Fertigkeit",
"midgard5.skill-value": "Fertigkeitswert", "midgard5.skill-value": "Fertigkeitswert",
@ -247,8 +248,8 @@
"midgard5.weapon-skills": "Waffenfertigkeiten", "midgard5.weapon-skills": "Waffenfertigkeiten",
"midgard5.unlearned-skill": "Ungelernte Fertigkeit", "midgard5.unlearned-skill": "Ungelernte Fertigkeit",
"midgard5.unlearned-skills": "Ungelernte Fertigkeiten", "midgard5.unlearned-skills": "Ungelernte Fertigkeiten",
"midgard5.innate-ability": "Angeborene/Besondere Fertigkeit", "midgard5.innate-ability": "Angeborene/Besondere Fähigkeit",
"midgard5.innate-abilities": "Angeborene/Besondere Fertigkeit", "midgard5.innate-abilities": "Angeborene und besondere Fähigkeiten",
"midgard5.base-damage": "Grundschaden", "midgard5.base-damage": "Grundschaden",
"midgard5.weapon": "Waffe", "midgard5.weapon": "Waffe",
@ -262,6 +263,11 @@
"midgard5.active": "Aktiv", "midgard5.active": "Aktiv",
"midgard5.rangedWeapon": "Schusswaffe", "midgard5.rangedWeapon": "Schusswaffe",
"midgard5.assignItemToCharacter": "Füge Gegenstand einem Charakter hinzu, um hier etwas auswählen zu können", "midgard5.assignItemToCharacter": "Füge Gegenstand einem Charakter hinzu, um hier etwas auswählen zu können",
"midgard5.showAll": "Alle anzeigen",
"midgard5.wealthAndContainers": "Vermögen und Aufbewahrung",
"midgard5.itemsInContainers": "Gegenstände in Aufbewahrung",
"midgard5.allItems": "Alle Gegenstände",
"midgard5.pw": "Prüfwurf", "midgard5.pw": "Prüfwurf",
"midgard5.attack": "Angriff", "midgard5.attack": "Angriff",

View File

@ -1,6 +1,6 @@
{ {
"name": "foundry-system-midgard5", "name": "foundry-system-midgard5",
"version": "2.4.0", "version": "2.4.2",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -90,6 +90,16 @@ Hooks.once("init", async () => {
return label.toLowerCase().includes(contains.toLowerCase()); return label.toLowerCase().includes(contains.toLowerCase());
}); });
Handlebars.registerHelper("count", (object: any) => {
var length = 0;
for( var key in object ) {
if( object.hasOwnProperty(key) ) {
++length;
}
}
return length;
});
// Default Sheet für Items definieren und das Standardsheet deaktivieren // Default Sheet für Items definieren und das Standardsheet deaktivieren
Items.unregisterSheet("core", ItemSheet); Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("midgard5", M5ItemSheet, { makeDefault: true }); Items.registerSheet("midgard5", M5ItemSheet, { makeDefault: true });

View File

@ -240,6 +240,51 @@ export class M5Character extends Actor {
ret.skillMods = aggregate.calculate(); ret.skillMods = aggregate.calculate();
} }
if (!skip?.items) {
context.items
?.filter((item) => item.type === "item")
.forEach((item) => {
item.prepareDerivedData();
let label = item.name;
if (item.system.magic) {
label += "*";
}
if (item.system.valuable) {
ret.stats.wealth += this.calculateValue(item.system.value * item.system.quantity, item.system.currency);
}
if (item.system.hoarded) {
ret.stats.hoard += this.calculateValue(item.system.value * item.system.quantity, item.system.currency);
}
let icon = item.img;
let rollable = false;
for (let key in item.system.rolls.formulas) {
rollable = item.system.rolls.formulas[key]?.enabled;
if (rollable) {
break;
}
}
ret.gear.items[item.id] = {
label: label,
icon: icon,
magic: item.system.magic,
calc: item.system.calc,
equipped: item.system?.equipped,
valuable: item.system?.valuable,
hoarded: item.system?.hoarded,
weight: item.system.weight || 0,
containerId: item.system.containerId || "",
value: item.system.value || 0,
currency: item.system.currency || "",
quantity: item.system.quantity || 0,
rollExist: rollable,
};
});
}
if (!skip?.containers) { if (!skip?.containers) {
context.items context.items
?.filter((item) => item.type === "container") ?.filter((item) => item.type === "container")
@ -348,10 +393,10 @@ export class M5Character extends Actor {
")"; ")";
} }
if (item.system.valuable) { if (item.system.valuable) {
ret.stats.wealth += this.calculateValue(item.system.value, item.system.currency); ret.stats.wealth += this.calculateValue(item.system.value * item.system.quantity, item.system.currency);
} }
if (item.system.hoarded) { if (item.system.hoarded) {
ret.stats.hoard += item.system.value || 0; ret.stats.hoard += this.calculateValue(item.system.value * item.system.quantity, item.system.currency);
} }
if (!!item.system.containerId) { if (!!item.system.containerId) {
ret.gear.containers[item.system.containerId].weight += item.system.weight; ret.gear.containers[item.system.containerId].weight += item.system.weight;
@ -369,6 +414,7 @@ export class M5Character extends Actor {
valuable: item.system?.valuable, valuable: item.system?.valuable,
hoarded: item.system?.hoarded, hoarded: item.system?.hoarded,
value: item.system.value || 0, value: item.system.value || 0,
currency: item.system.currency || "",
calc: item.system.calc, calc: item.system.calc,
special: item.system.special, special: item.system.special,
damageBase: item.system.damageBase, damageBase: item.system.damageBase,
@ -387,18 +433,10 @@ export class M5Character extends Actor {
label += "*(" + (item.system.stats.defenseBonus < 0 ? "" : "+") + item.system.stats.defenseBonus + ")"; label += "*(" + (item.system.stats.defenseBonus < 0 ? "" : "+") + item.system.stats.defenseBonus + ")";
} }
if (item.system.valuable) { if (item.system.valuable) {
ret.stats.wealth += this.calculateValue(item.system.value, item.system.currency); ret.stats.wealth += this.calculateValue(item.system.value * item.system.quantity, item.system.currency);
} }
if (item.system.hoarded) { if (item.system.hoarded) {
ret.stats.hoard += item.system.value || 0; ret.stats.hoard += this.calculateValue(item.system.value * item.system.quantity, item.system.currency);
}
if (!!item.system.containerId) {
ret.gear.containers[item.system.containerId].weight += item.system.weight;
if (ret.gear.containers[item.system.containerId].equipped) {
ret.stats.encumbrance += item.system.weight;
}
} else if (item.system.equipped) {
ret.stats.encumbrance += item.system.weight || 0;
} }
ret.gear.defensiveWeapons[item.id] = { ret.gear.defensiveWeapons[item.id] = {
@ -408,6 +446,7 @@ export class M5Character extends Actor {
valuable: item.system?.valuable, valuable: item.system?.valuable,
hoarded: item.system?.hoarded, hoarded: item.system?.hoarded,
value: item.system.value || 0, value: item.system.value || 0,
currency: item.system.currency || "",
defenseBonus: item.system.stats.defenseBonus, defenseBonus: item.system.stats.defenseBonus,
calc: item.system.calc, calc: item.system.calc,
equipped: item.system?.equipped, equipped: item.system?.equipped,
@ -425,10 +464,10 @@ export class M5Character extends Actor {
label += "*"; label += "*";
} }
if (item.system.valuable) { if (item.system.valuable) {
ret.stats.wealth += this.calculateValue(item.system.value, item.system.currency); ret.stats.wealth += this.calculateValue(item.system.value * item.system.quantity, item.system.currency);
} }
if (item.system.hoarded) { if (item.system.hoarded) {
ret.stats.hoard += item.system.value || 0; ret.stats.hoard += this.calculateValue(item.system.value * item.system.quantity, item.system.currency);
} }
if (!!item.system.containerId) { if (!!item.system.containerId) {
ret.gear.containers[item.system.containerId].weight += item.system.weight; ret.gear.containers[item.system.containerId].weight += item.system.weight;
@ -447,6 +486,7 @@ export class M5Character extends Actor {
valuable: item.system?.valuable, valuable: item.system?.valuable,
hoarded: item.system?.hoarded, hoarded: item.system?.hoarded,
value: item.system.value || 0, value: item.system.value || 0,
currency: item.system.currency || "",
lpProtection: item.system.lpProtection, lpProtection: item.system.lpProtection,
calc: item.system.calc, calc: item.system.calc,
equipped: item.system?.equipped, equipped: item.system?.equipped,

View File

@ -11,38 +11,41 @@
.flexcolumn { .flexcolumn {
flex-wrap: wrap; flex-wrap: wrap;
flex-direction: column;
} }
.flexcolumn-1 { .flexcolumn-1 {
flex: 100%; flex-basis: 100%;
flex-wrap: wrap; flex-wrap: wrap;
} }
.flexcolumn-2 { .flexcolumn-2 {
flex: 50%; flex-basis: 50%;
flex-wrap: wrap; flex-wrap: wrap;
} }
.flexcolumn-3 { .flexcolumn-3 {
flex: 33%; flex-basis: 33%;
flex-wrap: wrap; flex-wrap: wrap;
} }
.flexcolumn-4 { .flexcolumn-4 {
flex: 25%; flex-basis: 25%;
flex-wrap: wrap; flex-wrap: wrap;
} }
.flexcolumn-5 { .flexcolumn-5 {
flex: 20%; flex-basis: 20%;
flex-wrap: wrap; flex-wrap: wrap;
} }
.flexpart { .flexpart {
gap: 0; gap: 0;
padding: 0; padding: 0;
margin: 5px; margin: 2px;
background-color: beige; background-color: beige;
border-collapse: separate;
border-radius: 10px;
border: 2px solid black; border: 2px solid black;
} }
@ -65,10 +68,15 @@
h3 { h3 {
padding: 0.5rem 0.5rem 0.5rem 0.5rem; padding: 0.5rem 0.5rem 0.5rem 0.5rem;
margin-top: 0.5rem;
margin-bottom: 0;
text-align: left; text-align: left;
font-weight: bold; font-weight: bold;
background-color: dimgray; background-color: #eeede0;
color: white; color: black;
border-collapse: separate;
border: 2px solid black;
border-radius: 10px;
} }
.profile-img { .profile-img {
@ -246,7 +254,8 @@
padding: 1px; padding: 1px;
//align-items: stretch; //align-items: stretch;
input { input,
.max-value {
flex: 0 0 2rem; flex: 0 0 2rem;
text-align: center; text-align: center;
height: 100%; height: 100%;

View File

@ -3,7 +3,7 @@
"name": "midgard5", "name": "midgard5",
"title": "Midgard 5. Edition", "title": "Midgard 5. Edition",
"description": "The German RPG Midgard 5. Edition", "description": "The German RPG Midgard 5. Edition",
"version": "2.4.0", "version": "2.4.2",
"compatibility": { "compatibility": {
"minimum": "10", "minimum": "10",
"verified": "11", "verified": "11",
@ -158,8 +158,8 @@
"primaryTokenAttribute": "lp", "primaryTokenAttribute": "lp",
"secondaryTokenAttribute": "ap", "secondaryTokenAttribute": "ap",
"url": "https://git.byroks.de/MidgardVTT-Entwicklung/foundry-vtt-system-midgard5", "url": "https://git.byroks.de/MidgardVTT-Entwicklung/foundry-vtt-system-midgard5",
"manifest": "https://git.byroks.de/MidgardVTT-Entwicklung/foundry-vtt-system-midgard5/releases/download/v2.4.0/system.json", "manifest": "https://git.byroks.de/MidgardVTT-Entwicklung/foundry-vtt-system-midgard5/releases/download/v2.4.2/system.json",
"download": "https://git.byroks.de/MidgardVTT-Entwicklung/foundry-vtt-system-midgard5/releases/download/v2.4.0/midgard5-v2.4.0.zip", "download": "https://git.byroks.de/MidgardVTT-Entwicklung/foundry-vtt-system-midgard5/releases/download/v2.4.2/midgard5-v2.4.2.zip",
"initiative": "@c.calc.attributes.gw.value", "initiative": "@c.calc.attributes.gw.value",
"license": "LICENSE.txt" "license": "LICENSE.txt"
} }

View File

@ -67,6 +67,12 @@
<td>{{localize "midgard5.movementRange"}}</td> <td>{{localize "midgard5.movementRange"}}</td>
<td><input name="data.movement" type="text" value="{{data.movement}}" data-dtype="Number" /></td> <td><input name="data.movement" type="text" value="{{data.movement}}" data-dtype="Number" /></td>
</tr> </tr>
<tr>
<td>{{localize "midgard5.actor-lp-short"}}</td>
<td><input name="data.lp.max" type="text" value="{{data.lp.max}}" data-dtype="Number" /></td>
<td>{{localize "midgard5.actor-ap-short"}}</td>
<td><input name="data.ap.max" type="text" value="{{data.ap.max}}" data-dtype="Number" /></td>
</tr>
<tr> <tr>
<td>{{localize "midgard5.brawl"}}</td> <td>{{localize "midgard5.brawl"}}</td>
<td class="fixed-value">{{data.calc.stats.brawl.value}}</td> <td class="fixed-value">{{data.calc.stats.brawl.value}}</td>

View File

@ -1,5 +1,32 @@
<div class="flexbox"> <div class="flexbox">
<div class="flexcolumn-3">
<div class="flexcolumn-1">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/magic/time/arrows-circling-pink.webp" class="flexpart-icon">{{localize "midgard5.calculated-values"}}</div>
<table>
<tr height = 10px></tr>
<tr>
<td>{{localize "midgard5.movementRange"}}</td>
<td class="fixed-value">{{data.calc.stats.movement.value}}</td>
<td></td>
<td class="fixed-value"></td>
</tr>
<td>{{localize "midgard5.defense"}}</td>
<td class="fixed-value">{{data.calc.stats.defense.value}}</td>
<td>{{localize "midgard5.defenseBonus"}}</td>
<td class="fixed-value">{{data.calc.stats.defenseBonus.value}}</td>
</tr>
<tr>
<td>{{localize "midgard5.attackBonus"}}</td>
<td class="fixed-value">{{data.calc.stats.attackBonus.value}}</td>
<td>{{localize "midgard5.damageBonus"}}</td>
<td class="fixed-value">{{data.calc.stats.damageBonus.value}}</td>
</tr>
</table>
</div>
</div>
<div class="flexcolumn-2">
<div class="flexpart"> <div class="flexpart">
<div class="flexpart-header"><img src="icons/skills/melee/hand-grip-sword-white-brown.webp" class="flexpart-icon">{{localize "midgard5.attack"}}</div> <div class="flexpart-header"><img src="icons/skills/melee/hand-grip-sword-white-brown.webp" class="flexpart-icon">{{localize "midgard5.attack"}}</div>
<table> <table>
@ -78,33 +105,7 @@
</div> </div>
</div> </div>
<div class="flexcolumn-3"> <div class="flexcolumn-2">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/magic/time/arrows-circling-pink.webp" class="flexpart-icon">{{localize "midgard5.calculated-values"}}</div>
<table>
<tr height = 10px></tr>
<tr>
<td>{{localize "midgard5.movementRange"}}</td>
<td class="fixed-value">{{data.calc.stats.movement.value}}</td>
<td>&nbsp;</td>
<td class="fixed-value">&nbsp;</td>
</tr>
<td>{{localize "midgard5.defense"}}</td>
<td class="fixed-value">{{data.calc.stats.defense.value}}</td>
<td>{{localize "midgard5.defenseBonus"}}</td>
<td class="fixed-value">{{data.calc.stats.defenseBonus.value}}</td>
</tr>
<tr>
<td>{{localize "midgard5.damageBonus"}}</td>
<td class="fixed-value">{{data.calc.stats.damageBonus.value}}</td>
<td>{{localize "midgard5.attackBonus"}}</td>
<td class="fixed-value">{{data.calc.stats.attackBonus.value}}</td>
</tr>
</table>
</div>
</div>
<div class="flexcolumn-3">
<div class="flexpart"> <div class="flexpart">
<div class="flexpart-header"><img src="icons/skills/melee/shield-block-gray-orange.webp" class="flexpart-icon">{{localize "midgard5.defense"}}</div> <div class="flexpart-header"><img src="icons/skills/melee/shield-block-gray-orange.webp" class="flexpart-icon">{{localize "midgard5.defense"}}</div>
<table> <table>

View File

@ -1,6 +1,7 @@
<h3>{{localize "midgard5.wealthAndContainers"}}</h3>
<div class="flexbox"> <div class="flexbox">
<div class="flexcolumn-2">
<div class="flexcolumn-2">
<div class="flexpart"> <div class="flexpart">
<div class="flexpart-header"><img src="icons/commodities/currency/coins-assorted-mix-copper-silver-gold.webp" class="flexpart-icon">{{localize "midgard5.currency"}}</div> <div class="flexpart-header"><img src="icons/commodities/currency/coins-assorted-mix-copper-silver-gold.webp" class="flexpart-icon">{{localize "midgard5.currency"}}</div>
<table> <table>
@ -29,13 +30,186 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
<div class="flexcolumn-2">
<div class="flexpart"> <div class="flexpart">
<div class="flexpart-header"> <div class="flexpart-header"><img src="icons/containers/chest/chest-simple-box-brown.webp" class="flexpart-icon">{{localize "TYPES.Item.container"}}</div>
<img src="icons/tools/hand/scale-balances-merchant-brown.webp" class="flexpart-icon"> <table>
{{localize "midgard5.gear"}} <thead class="theader">
(alle <input id="data.info.showAllItems" class="checkbox" type="checkbox" name="data.info.showAllItems" {{checked data.info.showAllItems}}>) <tr>
</div> <th class="title">{{localize "TYPES.Item.container"}}</th>
<th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title center"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
<th class="title add-container"><i class="fa-regular fa-plus"></i></th>
</tr>
</thead>
<tbody>
<tr height = 10px></tr>
{{#each data.calc.gear.containers as |item itemId|}}
<tr data-item="{{itemId}}">
<td class="padding">
<span class="edit-item">{{item.label}}</span>
</td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
</div>
<h3>{{localize "midgard5.itemsInContainers"}}</h3>
<div class="flexbox">
{{#each data.calc.gear.containers as |container containerId|}}
<div class="flexcolumn-2">
<div class="flexpart">
<div class="flexpart-header"><img src="{{container.icon}}" class="flexpart-icon">{{container.label}}</div>
<table>
<thead class="theader">
<tr>
<th class="title">{{localize "TYPES.Item.item"}}</th>
<th class="title center">{{localize "midgard5.item-quantity"}}</th>
<th class="title center">{{localize "midgard5.item-value"}}</th>
<th class="title center"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></th>
<th class="title"><img src="/icons/svg/d20.svg" class="table-icon"></th>
<th class="title">&nbsp;</th>
</tr>
</thead>
<tbody>
<tr height = 10px></tr>
{{#each ../data.calc.gear.items as |item itemId|}}
{{#if (eq item.containerId containerId)}}
<tr data-item="{{itemId}}">
<td class="padding">
<span class="edit-item">{{item.label}}</span>
</td>
<td>
<i class="fa fa-minus-circle quantity-decrease" style="cursor: pointer"></i>
<span>{{item.quantity}}</span>
<i class="fa fa-plus-circle quantity-increase" style="cursor: pointer"></i>
</td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
{{#each ../data.calc.gear.weapons as |item itemId|}}
{{#if (eq item.containerId containerId)}}
<tr data-item="{{itemId}}">
<td class="padding">
<span class="edit-item">{{item.label}}</span>
</td>
<td></td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
{{#each ../data.calc.gear.defensiveWeapons as |item itemId|}}
{{#if (eq item.containerId containerId)}}
<tr data-item="{{itemId}}">
<td class="padding">
<span class="edit-item">{{item.label}}</span>
</td>
<td></td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
{{#each ../data.calc.gear.armor as |item itemId|}}
{{#if (eq item.containerId containerId)}}
<tr data-item="{{itemId}}">
<td class="padding">
<span class="edit-item">{{item.label}}</span>
</td>
<td></td>
<td style="text-align: start">
{{#unless (or (eq item.value 0) (eq item.currency ""))}}
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
{{/unless}}
</td>
<td class="change-equipped">
{{#if item.equipped}}
<i class="fa-solid fa-circle-check"></i>
{{else}}
<i class="fa-regular fa-circle"></i>
{{/if}}
</td>
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/if}}
{{/each}}
</tbody>
</table>
</div>
</div>
{{/each}}
</div>
<h3>
{{localize "midgard5.allItems"}}
<input id="data.info.showAllItems" class="checkbox" type="checkbox" name="data.info.showAllItems" {{checked data.info.showAllItems}} style="float: right;">
<label for="data.info.showAllItems" style="font-size: normal; font-weight: normal; font-style: italic; float: right;">{{localize "midgard5.showAll"}}&nbsp;</label>
</h3>
<div class="flexbox">
{{#unless (eq (count data.calc.gear.items) 0)}}
<div class="flexcolumn-2">
<div class="flexpart">
<div class="flexpart-header"><img src="icons/tools/hand/scale-balances-merchant-brown.webp" class="flexpart-icon">{{localize "midgard5.gear"}}</div>
<table> <table>
<thead class="theader"> <thead class="theader">
<tr> <tr>
@ -82,14 +256,19 @@
<td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td> <td>{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td> <td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr> </tr>
{{/if}} {{/if}}
{{/each}} {{/each}}
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
{{/unless}}
{{#unless (eq (count data.calc.gear.weapons) 0)}}
<div class="flexcolumn-2">
<div class="flexpart"> <div class="flexpart">
<div class="flexpart-header"><img src="icons/weapons/swords/sword-guard-engraved-worn.webp" class="flexpart-icon">{{localize "midgard5.weapons"}}</div> <div class="flexpart-header">
<img src="icons/weapons/swords/sword-guard-engraved-worn.webp" class="flexpart-icon">{{localize "midgard5.weapons"}}</div>
<table> <table>
<thead> <thead>
<tr> <tr>
@ -102,6 +281,7 @@
</thead> </thead>
<tbody> <tbody>
{{#each data.calc.gear.weapons as |item itemId|}} {{#each data.calc.gear.weapons as |item itemId|}}
{{#if (or ../data.info.showAllItems (eq item.containerId ""))}}
<tr data-item="{{itemId}}"> <tr data-item="{{itemId}}">
<td class="padding edit-item">{{item.label}}</td> <td class="padding edit-item">{{item.label}}</td>
<td style="text-align: start"> <td style="text-align: start">
@ -118,11 +298,16 @@
</td> </td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td> <td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr> </tr>
{{/if}}
{{/each}} {{/each}}
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
{{/unless}}
{{#unless (eq (count data.calc.gear.defensiveWeapons) 0)}}
<div class="flexcolumn-2">
<div class="flexpart"> <div class="flexpart">
<div class="flexpart-header"><img src="icons/equipment/shield/heater-wooden-brown-axe.webp" class="flexpart-icon">{{localize "midgard5.defensive-weapons"}}</div> <div class="flexpart-header"><img src="icons/equipment/shield/heater-wooden-brown-axe.webp" class="flexpart-icon">{{localize "midgard5.defensive-weapons"}}</div>
<table> <table>
@ -136,6 +321,7 @@
</thead> </thead>
<tbody> <tbody>
{{#each data.calc.gear.defensiveWeapons as |item itemId|}} {{#each data.calc.gear.defensiveWeapons as |item itemId|}}
{{#if (or ../data.info.showAllItems (eq item.containerId ""))}}
<tr data-item="{{itemId}}"> <tr data-item="{{itemId}}">
<td class="padding edit-item">{{item.label}}</td> <td class="padding edit-item">{{item.label}}</td>
<td style="text-align: start"> <td style="text-align: start">
@ -152,11 +338,16 @@
</td> </td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td> <td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr> </tr>
{{/if}}
{{/each}} {{/each}}
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
{{/unless}}
{{#unless (eq (count data.calc.gear.armor) 0)}}
<div class="flexcolumn-2">
<div class="flexpart"> <div class="flexpart">
<div class="flexpart-header"><img src="icons/equipment/hand/gauntlet-armored-steel-grey.webp" class="flexpart-icon">{{localize "midgard5.armor"}}</div> <div class="flexpart-header"><img src="icons/equipment/hand/gauntlet-armored-steel-grey.webp" class="flexpart-icon">{{localize "midgard5.armor"}}</div>
<table> <table>
@ -170,6 +361,7 @@
</thead> </thead>
<tbody> <tbody>
{{#each data.calc.gear.armor as |item itemId|}} {{#each data.calc.gear.armor as |item itemId|}}
{{#if (or ../data.info.showAllItems (eq item.containerId ""))}}
<tr data-item="{{itemId}}"> <tr data-item="{{itemId}}">
<td class="padding edit-item">{{item.label}}</td> <td class="padding edit-item">{{item.label}}</td>
<td style="text-align: start"> <td style="text-align: start">
@ -186,6 +378,7 @@
</td> </td>
<td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td> <td><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr> </tr>
{{/if}}
{{/each}} {{/each}}
</tbody> </tbody>
</table> </table>

View File

@ -89,7 +89,7 @@
<div class="lp-bar-item-empty update-lp" data-value="{{this}}"></div> <div class="lp-bar-item-empty update-lp" data-value="{{this}}"></div>
{{/if}} {{/if}}
{{/times}} {{/times}}
<input name="data.lp.max" type="text" value="{{data.lp.max}}" data-dtype="Number" /> <div class="max-value">{{data.lp.max}}</div>
</div> </div>
</td> </td>
</tr> </tr>
@ -105,7 +105,7 @@
<div class="ap-bar-item-empty update-ap" data-value="{{this}}"></div> <div class="ap-bar-item-empty update-ap" data-value="{{this}}"></div>
{{/if}} {{/if}}
{{/times}} {{/times}}
<input name="data.ap.max" type="text" value="{{data.ap.max}}" data-dtype="Number" /> <div class="max-value">{{data.ap.max}}</div>
</div> </div>
</td> </td>
</tr> </tr>