Compare commits

..

No commits in common. "b6b0411473315abc09e83bfeaea4f8e8d0c24009" and "f1fff6b6ba92dfa0fbbc00038f4a17e46713ab94" have entirely different histories.

5 changed files with 7 additions and 34 deletions

View File

@ -357,7 +357,6 @@
<div>{{localize "DSA41.inventar.bewaffnung"}}</div>
<div></div>
<div></div>
<div></div>
<div class="center">{{localize "DSA41.weight.label"}}</div>
<div></div>
</div>
@ -381,7 +380,6 @@
</div>
</div>
<div></div>
<div></div>
<div class="center fas fa-sword" data-action="toggle_equipped" data-equipped="{{system.angelegt}}"></div>
<div class="center">{{this.system.gewicht.value}} {{localize (concat "DSA41.weight." this.system.gewicht.unit)}}</div>
<div class="center fas fa-trash" data-action="item-delete"></div>
@ -394,9 +392,7 @@
<div class="row">{{localize "DSA41.inventar.ruestungen"}}</div>
<div></div>
<div></div>
<div></div>
<div class="center">{{localize "DSA41.weight.label"}}</div>
<div></div>
</div>
{{#unless (ne actor.itemTypes.Ruestung.length 0)}}
@ -410,7 +406,6 @@
<span class="center">{{this.name}}</span>
</div>
<div></div>
<div></div>
<div class="center fas fa-shield-halved" data-action="toggle_equipped" data-equipped="{{system.angelegt}}"></div>
<div class="center">{{this.system.gewicht.value}} {{localize (concat "DSA41.weight." this.system.gewicht.unit)}}</div>
<div class="center fas fa-trash" data-action="item-delete"></div>
@ -422,10 +417,8 @@
<div class="list-header">
<div>{{localize "DSA41.inventar.gegenstaende"}}</div>
<div></div>
<div class="center">{{localize "DSA41.inventar.anzahl"}}</div>
<div></div>
<div class="center">{{localize "DSA41.weight.label"}}</div>
<div></div>
</div>
{{#unless (ne actor.itemTypes.Gegenstand.length 0)}}
@ -439,9 +432,8 @@
<span class="center">{{this.name}}</span>
</div>
<div></div>
<div class="center anzahl">{{>editable-input type="number" size=(string-length system.anzahl) data-name="system.anzahl" value=system.anzahl}}</div>
<div></div>
<div class="center">{{mul this.system.gewicht.value this.system.anzahl}} {{localize (concat "DSA41.weight." this.system.gewicht.unit)}}</div>
<div class="center">{{this.system.gewicht.value}} {{localize (concat "DSA41.weight." this.system.gewicht.unit)}}</div>
<div class="center fas fa-trash" data-action="item-delete"></div>
</div>
{{/each}}

View File

@ -2,7 +2,7 @@
{{#if (eq type "checkbox")}}
<input type="checkbox" name="{{name}}" {{#if data-name}}data-name="{{data-name}}"{{/if}} {{checked value}}>
{{else}}
<input type="{{type}}" name="{{name}}" {{#if data-name}}data-name="{{data-name}}"{{/if}} {{#if size}}size="{{size}}"{{/if}} value="{{value}}" placeholder="{{placeholder}}">
<input type="{{type}}" name="{{name}}" {{#if data-name}}data-name="{{data-name}}"{{/if}} value="{{value}}" placeholder="{{placeholder}}">
{{/if}}
{{#if placeholder}}

View File

@ -479,8 +479,7 @@
"inventar": {
"bewaffnung": "Bewaffnung",
"ruestungen": "Rüstungen",
"gegenstaende": "Gegenstände",
"anzahl": "Anzahl"
"gegenstaende": "Gegenstände"
},
"kampf": {

View File

@ -588,7 +588,7 @@ html {
}
&[data-tab="inventar"] {
grid-template-columns: minmax(min-content, max-content) auto max-content min-content minmax(min-content, max-content) min-content;
grid-template-columns: minmax(min-content, max-content) auto min-content minmax(min-content, max-content) min-content;
& > * {
grid-column: 1 / -1;
@ -597,11 +597,6 @@ html {
& [data-equipped="false"] {
color: #464c5f;
}
& .anzahl input {
background: transparent;
field-sizing: content;
}
}
&[data-tab="kampf"] {

View File

@ -80,18 +80,6 @@ Hooks.once("init", async function() {
]
});
Handlebars.registerHelper({
"string-length": (value, options) => {
return value.toString().length;
}
});
Handlebars.registerHelper({
"mul": (a, b, options) => {
return a * b;
}
});
Handlebars.registerHelper({
maybeLocalize: (value, options) => {
const prefix = options.hash.prefix ? options.hash.prefix.string : null;
@ -939,7 +927,6 @@ class DSA41_GegenstandData extends TypeDataModel {
return {
gewicht: new GewichtField(),
preis: new PreisField(),
anzahl: new NumberField({ integer: true, initial: 1, min: 0 }),
beschreibung: new StringField({ initial: "" }),
};
@ -1398,9 +1385,9 @@ class DSA41_ActorSheet extends DSA41_ApplicationMixin(ActorSheetV2) {
const data = await DSA41_Dialog.wait("Talent", { window: {title: title}, item: item });
const eBE = (await new Roll(item.system.behinderung || "0", { BE: this.document.system.computed.kampf.ruestungen_gesamt.gesamt_behinderung }).evaluate()).total;
data.modifikator -= eBE;
data.modifikator += eBE;
const talentwert = item.system.talentwert + data.modifikator;
const talentwert = item.system.talentwert - data.modifikator;
const roll_modifier = talentwert < 0 ? -talentwert: 0;
if (hp_roll_modifier !== 0)
@ -1422,7 +1409,7 @@ class DSA41_ActorSheet extends DSA41_ApplicationMixin(ActorSheetV2) {
const context = {
talent: item,
modifikator: data.modifikator,
modifikator: -data.modifikator,
attribute1: { type: item.system.attribute1, value: attribute1 },
attribute2: { type: item.system.attribute2, value: attribute2 },