Fixing Branch Update
+ Merged develop and solved merge conflicts + Added missing weight after update + Cleaned up not neaded parseFloat
This commit is contained in:
parent
1888e201e5
commit
17936bcd83
|
|
@ -204,7 +204,7 @@ export class M5Character extends Actor {
|
||||||
ret.stats.heavyLoad = M5Character.heavyLoadValue(data.attributes.st);
|
ret.stats.heavyLoad = M5Character.heavyLoadValue(data.attributes.st);
|
||||||
ret.stats.loadMax = M5Character.maxLoadValue(data.attributes.st);
|
ret.stats.loadMax = M5Character.maxLoadValue(data.attributes.st);
|
||||||
ret.stats.thrustLoad = M5Character.thrustLoadValue(data.attributes.st);
|
ret.stats.thrustLoad = M5Character.thrustLoadValue(data.attributes.st);
|
||||||
ret.stats.encumbrance = parseFloat((0).toPrecision(4));
|
ret.stats.encumbrance = 0;
|
||||||
|
|
||||||
if (!skip?.mods) {
|
if (!skip?.mods) {
|
||||||
const aggregate = new M5ModAggregate(data, ret);
|
const aggregate = new M5ModAggregate(data, ret);
|
||||||
|
|
@ -472,9 +472,9 @@ export class M5Character extends Actor {
|
||||||
const item = context.items.filter((x) => x.name === "Höchstlast");
|
const item = context.items.filter((x) => x.name === "Höchstlast");
|
||||||
if (ret.stats.encumbrance > ret.stats.loadMax) {
|
if (ret.stats.encumbrance > ret.stats.loadMax) {
|
||||||
if (item.length === 0) {
|
if (item.length === 0) {
|
||||||
let messageContent = `Höchstlast von ${M5Character.name} überschritten: 1 AP Schaden durch Belastung alle 10 Minuten abziehen!`;
|
let messageContent = `Höchstlast wurde überschritten: 1 AP Schaden durch Belastung alle 10 Minuten abziehen!`;
|
||||||
let chatData = {
|
let chatData = {
|
||||||
speaker: ChatMessage.getSpeaker({actor: M5Character.name}),
|
speaker: ChatMessage.getSpeaker({actor: Actor.name}),
|
||||||
content: messageContent,
|
content: messageContent,
|
||||||
};
|
};
|
||||||
ChatMessage.create(chatData, {});
|
ChatMessage.create(chatData, {});
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th class="title">{{localize "TYPES.Item.container"}}</th>
|
<th class="title">{{localize "TYPES.Item.container"}}</th>
|
||||||
<th class="title center">{{localize "midgard5.item-value"}}</th>
|
<th class="title center">{{localize "midgard5.item-value"}}</th>
|
||||||
|
<th class="title center">{{localize "midgard5.item-weight"}}</th>
|
||||||
<th class="title center"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></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"><img src="/icons/svg/d20.svg" class="table-icon"></th>
|
||||||
<td><a class="title add-container"><i class="fa-regular fa-plus"></i></a></th>
|
<td><a class="title add-container"><i class="fa-regular fa-plus"></i></a></th>
|
||||||
|
|
@ -54,6 +55,11 @@
|
||||||
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</td>
|
</td>
|
||||||
|
<td style="text-align: start">
|
||||||
|
{{#unless (or (eq item.weight "") (eq item.equipped?))}}
|
||||||
|
<span class="spell-process">{{item.weight}} kg</span>
|
||||||
|
{{/unless}}
|
||||||
|
</td>
|
||||||
<td class="change-equipped">
|
<td class="change-equipped">
|
||||||
{{#if item.equipped}}
|
{{#if item.equipped}}
|
||||||
<i class="fa-solid fa-circle-check"></i>
|
<i class="fa-solid fa-circle-check"></i>
|
||||||
|
|
@ -83,6 +89,7 @@
|
||||||
<th class="title">{{localize "TYPES.Item.item"}}</th>
|
<th class="title">{{localize "TYPES.Item.item"}}</th>
|
||||||
<th class="title center">{{localize "midgard5.item-quantity"}}</th>
|
<th class="title center">{{localize "midgard5.item-quantity"}}</th>
|
||||||
<th class="title center">{{localize "midgard5.item-value"}}</th>
|
<th class="title center">{{localize "midgard5.item-value"}}</th>
|
||||||
|
<th class="title center">{{localize "midgard5.item-weight"}}</th>
|
||||||
<th class="title center"><img src="/systems/midgard5/assets/icons/icon/battle-gear.svg" class="table-icon"></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"><img src="/icons/svg/d20.svg" class="table-icon"></th>
|
||||||
<th class="title"> </th>
|
<th class="title"> </th>
|
||||||
|
|
@ -106,6 +113,11 @@
|
||||||
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</td>
|
</td>
|
||||||
|
<td style="text-align: start">
|
||||||
|
{{#unless (or (eq item.weight "") (eq item.equipped?))}}
|
||||||
|
<span class="spell-process">{{item.weight}} kg</span>
|
||||||
|
{{/unless}}
|
||||||
|
</td>
|
||||||
<td class="change-equipped">
|
<td class="change-equipped">
|
||||||
{{#if item.equipped}}
|
{{#if item.equipped}}
|
||||||
<i class="fa-solid fa-circle-check"></i>
|
<i class="fa-solid fa-circle-check"></i>
|
||||||
|
|
@ -130,6 +142,11 @@
|
||||||
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</td>
|
</td>
|
||||||
|
<td style="text-align: start">
|
||||||
|
{{#unless (or (eq item.weight "") (eq item.equipped?))}}
|
||||||
|
<span class="spell-process">{{item.weight}} kg</span>
|
||||||
|
{{/unless}}
|
||||||
|
</td>
|
||||||
<td class="change-equipped">
|
<td class="change-equipped">
|
||||||
{{#if item.equipped}}
|
{{#if item.equipped}}
|
||||||
<i class="fa-solid fa-circle-check"></i>
|
<i class="fa-solid fa-circle-check"></i>
|
||||||
|
|
@ -154,6 +171,11 @@
|
||||||
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</td>
|
</td>
|
||||||
|
<td style="text-align: start">
|
||||||
|
{{#unless (or (eq item.weight "") (eq item.equipped?))}}
|
||||||
|
<span class="spell-process">{{item.weight}} kg</span>
|
||||||
|
{{/unless}}
|
||||||
|
</td>
|
||||||
<td class="change-equipped">
|
<td class="change-equipped">
|
||||||
{{#if item.equipped}}
|
{{#if item.equipped}}
|
||||||
<i class="fa-solid fa-circle-check"></i>
|
<i class="fa-solid fa-circle-check"></i>
|
||||||
|
|
@ -178,6 +200,11 @@
|
||||||
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</td>
|
</td>
|
||||||
|
<td style="text-align: start">
|
||||||
|
{{#unless (or (eq item.weight "") (eq item.equipped?))}}
|
||||||
|
<span class="spell-process">{{item.weight}} kg</span>
|
||||||
|
{{/unless}}
|
||||||
|
</td>
|
||||||
<td class="change-equipped">
|
<td class="change-equipped">
|
||||||
{{#if item.equipped}}
|
{{#if item.equipped}}
|
||||||
<i class="fa-solid fa-circle-check"></i>
|
<i class="fa-solid fa-circle-check"></i>
|
||||||
|
|
@ -388,7 +415,7 @@
|
||||||
|
|
||||||
<div class="flexcolumn-2">
|
<div class="flexcolumn-2">
|
||||||
<div class="flexpart">
|
<div class="flexpart">
|
||||||
<div class="flexpart-header"><img src="icons/tools/hand/scale-balances-merchant-brown.webp" class="flexpart-icon">Lasten in Kilogramm</div>
|
<div class="flexpart-header"><img src="icons/containers/bags/pack-leather-strapped-tan.webp" class="flexpart-icon">Lasten in Kilogramm</div>
|
||||||
<table>
|
<table>
|
||||||
<thead class="theader">
|
<thead class="theader">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -411,105 +438,5 @@
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flexpart">
|
|
||||||
<div class="flexpart-header"><img src="icons/containers/chest/chest-simple-box-brown.webp" class="flexpart-icon">{{localize "TYPES.Item.container"}}</div>
|
|
||||||
<table>
|
|
||||||
<thead class="theader">
|
|
||||||
<tr>
|
|
||||||
<th class="title">{{localize "TYPES.Item.container"}}</th>
|
|
||||||
<th class="title center">{{localize "midgard5.item-value"}}</th>
|
|
||||||
<th class="title center">{{localize "midgard5.item-weight"}}</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 style="text-align: start">
|
|
||||||
{{#unless (or (eq item.weight "") (eq item.equipped?))}}
|
|
||||||
<span class="spell-process">{{item.weight}} kg</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>
|
|
||||||
|
|
||||||
{{#each data.calc.gear.containers as |container containerId|}}
|
|
||||||
<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">{{localize "midgard5.item-weight"}}</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"> </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 style="text-align: start">
|
|
||||||
{{#unless (or (eq item.weight "") (eq item.equipped?))}}
|
|
||||||
<span class="spell-process">{{item.weight}} kg</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>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Loading…
Reference in New Issue