Gegenstände
This commit is contained in:
1 parent
4351e5bd1f
commit
14e70d422c
13 files changed
+234
-57
No files matched your search
@@ -12,7 +12,6 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ["M6", "actor"],
|
||||
window: {
|
||||
icon: "fa-solid fa-dice-d10",
|
||||
resizable: true
|
||||
},
|
||||
position: {
|
||||
@@ -130,6 +129,7 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
|
||||
break;
|
||||
case "items":
|
||||
context.itemTypes = this._getItems();
|
||||
context.gewicht = this._clacWeight();
|
||||
context.tab = context.tabs[partId];
|
||||
break;
|
||||
}
|
||||
@@ -284,6 +284,20 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
|
||||
return types;
|
||||
}
|
||||
|
||||
_clacWeight() {
|
||||
const items = this._getItems();
|
||||
let gewicht = items.item.items.reduce(
|
||||
(accumulator, item) => accumulator + item.system.gewicht,
|
||||
0
|
||||
);
|
||||
|
||||
let traglast = Math.max(this.actor.system.skills.körper.athletik.value, 10);
|
||||
return {
|
||||
traglast,
|
||||
gewicht
|
||||
};
|
||||
}
|
||||
|
||||
/* -------------------------------------------------- */
|
||||
|
||||
/**
|
||||
@@ -425,8 +439,6 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
|
||||
await roll.evaluate();
|
||||
|
||||
roll.toMessage();
|
||||
|
||||
roll.toAnchor();
|
||||
}
|
||||
|
||||
async rollDialog(rollDialogRequest) {
|
||||
|
||||
Reference in new issue
Block a user