Hintergründe

This commit is contained in:
Byroks committed 2026-10-23 17:54:17 +02:00
1 parent b02d9c2313
commit 920c68a7da
23 files changed
+712 -39

No files matched your search

+49 -3
View File
@@ -5,7 +5,15 @@
"Schaden": "Schaden", "Schaden": "Schaden",
"Fertigkeit": "Fertigkeit", "Fertigkeit": "Fertigkeit",
"Stufe": "Stufe", "Stufe": "Stufe",
"Biography": { "Schicksalsmünzen": "Schicksalsmünzen",
"Grad": {
"grad": "Grad",
"frei": "frei",
"eingesetzt": "eingesetzt",
"gesamt": "gesamt",
"erfahrung": "Erfahrung"
},
"Biographie": {
"spezies": "Spezies", "spezies": "Spezies",
"kultur": "Kultur", "kultur": "Kultur",
"abenteuertyp": "Abenteuertyp", "abenteuertyp": "Abenteuertyp",
@@ -83,7 +91,8 @@
"eigenschaften": "Fertigkeiten", "eigenschaften": "Fertigkeiten",
"items": "Gegenstände", "items": "Gegenstände",
"effects": "Effekte", "effects": "Effekte",
"zauber": "Zauber" "zauber": "Zauber",
"description": "Beschreibung"
}, },
"spezialisierung": "Spezialisierung" "spezialisierung": "Spezialisierung"
}, },
@@ -115,6 +124,39 @@
"zauber": { "zauber": {
"singular": "Zauber", "singular": "Zauber",
"plural": "Zauber" "plural": "Zauber"
},
"gunst": {
"singular": "Gunst",
"plural": "Günste"
},
"makel": {
"singular": "Makel",
"plural": "Makel"
},
"schicksalsgabe": {
"singular": "Schicksalsgabe",
"plural": "Schicksalsgaben"
}
}
},
"Hintergrund": {
"gruppe": "Kategorie",
"type": {
"gunst": {
"singular": "Gunst",
"plural": "Günste"
},
"makel": {
"singular": "Makel",
"plural": "Makel"
},
"legende": {
"singular": "Legende",
"plural": "Legenden"
},
"schicksalsgabe": {
"singular": "Schicksalsgabe",
"plural": "Schicksalsgaben"
} }
} }
} }
@@ -127,7 +169,11 @@
"item": "Gegenstand", "item": "Gegenstand",
"weapon": "Waffe", "weapon": "Waffe",
"armor": "Rüstung", "armor": "Rüstung",
"zauber": "Zauber" "zauber": "Zauber",
"gunst": "Gunst",
"makel": "Makel",
"schicksalsgabe": "Schicksalsgabe",
"legende": "Legende"
} }
} }
} }
+27 -2
View File
@@ -1,12 +1,37 @@
function defineSchema() { function defineSchema() {
const fields = foundry.data.fields; const fields = foundry.data.fields;
return { return {
biography: new fields.SchemaField({ biographie: new fields.SchemaField({
mondgestalt: new fields.StringField({ initial: "" }), mondgestalt: new fields.StringField({ initial: "" }),
abenteuertyp: new fields.StringField({ initial: "" }), abenteuertyp: new fields.StringField({ initial: "" }),
glaube: new fields.StringField({ initial: "" }), glaube: new fields.StringField({ initial: "" }),
spezies: new fields.StringField({ initial: "" }), spezies: new fields.StringField({ initial: "" }),
kultur: new fields.StringField({ initial: "" }) kultur: new fields.StringField({ initial: "" }),
beschreibung: new fields.HTMLField({ initial: "" })
}),
legende: new fields.HTMLField({ initial: "" }),
schicksalsmünzen: new fields.NumberField({ initital: 3, min: 0, required: true }),
grad: new fields.SchemaField({
erfahrungspunkteFrei: new fields.NumberField({
required: true,
min: 0,
initial: 0
}),
erfahrungspunkteEingesetzt: new fields.NumberField({
required: true,
min: 0,
initial: 0
}),
erfahrungsschatz: new fields.NumberField({
required: true,
min: 0,
initial: 0
}),
grad: new fields.NumberField({
required: true,
min: 1,
initial: 1
})
}), }),
rüstwert: new fields.SchemaField({ rüstwert: new fields.SchemaField({
base: new fields.NumberField({ base: new fields.NumberField({
+12
View File
@@ -0,0 +1,12 @@
function defineSchema() {
const fields = foundry.data.fields;
return {
beschreibung: new fields.HTMLField({ initial: "" }),
gruppe: new fields.StringField({ initial: "" }),
linkId: new fields.StringField({ initial: "" })
};
}
export class HintergrundData extends foundry.abstract.TypeDataModel {
static defineSchema = defineSchema;
}
+59 -10
View File
@@ -55,6 +55,10 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
id: "zauber", id: "zauber",
icon: "fa-hand-sparkles" icon: "fa-hand-sparkles"
}, },
{
id: "hintergrund",
icon: "fa-feather-pointed"
},
{ {
id: "effects", id: "effects",
icon: "fa-bolt" icon: "fa-bolt"
@@ -87,16 +91,40 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
template: systemPath("templates/actor/items.hbs"), template: systemPath("templates/actor/items.hbs"),
scrollable: [""] scrollable: [""]
}, },
// biographie: { hintergrund: {
// template: systemPath("templates/items/description.hbs"), template: systemPath("templates/actor/hintergrund.hbs"),
// scrollable: [""] scrollable: [""]
// }, },
effects: { effects: {
template: systemPath("templates/shared/effects.hbs"), template: systemPath("templates/shared/effects.hbs"),
scrollable: [""] scrollable: [""]
} }
}; };
_attachPartListeners(partId, html, bubble) {
super._attachPartListeners(partId, html, bubble);
switch (partId) {
case "hintergrund":
const collapsible = html.querySelectorAll("div[data-action=collapsible]");
if (collapsible) {
collapsible.forEach((node) => {
node.addEventListener(
"click",
function () {
node.classList.toggle("active");
var content = node.nextElementSibling;
content.classList.toggle("active");
node.getElementsByTagName("i")[0].classList.toggle("fa-compress");
},
{ capture: true }
);
});
}
break;
}
}
/* -------------------------------------------------- */ /* -------------------------------------------------- */
/** @inheritdoc */ /** @inheritdoc */
@@ -153,6 +181,21 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
context.zauber = await this._getZauber(); context.zauber = await this._getZauber();
context.tab = context.tabs[partId]; context.tab = context.tabs[partId];
break; break;
case "hintergrund":
context.fields = await this._getFields();
context.enrichedBeschreibung =
await foundry.applications.ux.TextEditor.implementation.enrichHTML(
this.actor.system.biographie.beschreibung,
{
// Whether to show secret blocks in the finished html
secrets: this.document.isOwner,
// Data to fill in for inline rolls
rollData: this.actor.getRollData(),
// Relative UUID resolution
relativeTo: this.actor
}
);
context.tab = context.tabs[partId];
} }
return context; return context;
} }
@@ -701,7 +744,7 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
* @returns {Item|ActiveEffect} The embedded Item or ActiveEffect. * @returns {Item|ActiveEffect} The embedded Item or ActiveEffect.
*/ */
_getEmbeddedDocument(target) { _getEmbeddedDocument(target) {
const docRow = target.closest("li[data-document-class]"); const docRow = target.closest("[data-document-class]");
if (docRow.dataset.documentClass === "Item") { if (docRow.dataset.documentClass === "Item") {
return this.actor.items.get(docRow.dataset.itemId); return this.actor.items.get(docRow.dataset.itemId);
} else if (docRow.dataset.documentClass === "ActiveEffect") { } else if (docRow.dataset.documentClass === "ActiveEffect") {
@@ -825,7 +868,6 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
const allowed = Hooks.call("dropItemSheetData", item, this, data); const allowed = Hooks.call("dropItemSheetData", item, this, data);
if (allowed === false) return; if (allowed === false) return;
// Handle different data types // Handle different data types
switch (data.type) { switch (data.type) {
case "ActiveEffect": case "ActiveEffect":
@@ -912,6 +954,11 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
/* -------------------------------------------------- */ /* -------------------------------------------------- */
async _onDropItemCreate(actor, itemData) {
itemData = itemData instanceof Array ? itemData : [itemData];
return actor.createEmbeddedDocuments("Item", itemData);
}
/** /**
* Handle dropping of an item reference or item data onto an Actor Sheet. * Handle dropping of an item reference or item data onto an Actor Sheet.
* @param {DragEvent} event The concluding DragEvent which contains drop data. * @param {DragEvent} event The concluding DragEvent which contains drop data.
@@ -922,9 +969,12 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
async _onDropItem(event, data) { async _onDropItem(event, data) {
if (!this.actor.isOwner) return false; if (!this.actor.isOwner) return false;
// Prüfen, ob das Item von diesem Actor stammt und Shift NICHT gedrückt ist if (this.actor.items.get(data.itemId)) return this._onSortItem(event, data);
// Sortieren, nicht kopieren/verschieben
return this._onSortItem(event, data); const item = await Item.implementation.fromDropData(data);
const itemData = item.toObject();
return this._onDropItemCreate(this.actor, itemData);
} }
/** /**
@@ -948,7 +998,6 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
const siblingId = el.dataset.itemId; const siblingId = el.dataset.itemId;
if (siblingId && siblingId !== source.id) siblings.push(items.get(siblingId)); if (siblingId && siblingId !== source.id) siblings.push(items.get(siblingId));
} }
// item = items.get(item.itemId);
// Perform the sort // Perform the sort
const sortUpdates = foundry.utils.performIntegerSort(source, { const sortUpdates = foundry.utils.performIntegerSort(source, {
+4 -1
View File
@@ -75,7 +75,10 @@ export async function prepSpells(actor) {
export async function prepWeight(actor) { export async function prepWeight(actor) {
const items = actor.items.filter((x) => x.system.gewicht && !x.system.equipped); const items = actor.items.filter((x) => x.system.gewicht && !x.system.equipped);
let gewicht = items.reduce((accumulator, item) => accumulator + item.system.gewicht, 0); let gewicht = items.reduce(
(accumulator, item) => accumulator + item.system.gewicht * item.system.anzahl,
0
);
let traglast = Math.max(actor.system.skills.körper.athletik.value, 10); let traglast = Math.max(actor.system.skills.körper.athletik.value, 10);
return { return {
+60
View File
@@ -0,0 +1,60 @@
import { prepareActiveEffectCategories } from "../helpers/utils.mjs";
import { systemPath } from "../constants.mjs";
import { M6ItemSheet } from "./item-sheet.mjs";
const { api, sheets } = foundry.applications;
/**
* Extend the basic ItemSheet with some very simple modifications.
*/
export class M6HintergrundSheet extends M6ItemSheet {
static get DEFAULT_OPTIONS() {
return {
...super.DEFAULT_OPTIONS, // Kopiert alle bestehenden Actions aus M6ItemSheet
actions: {
...super.DEFAULT_OPTIONS.actions
}
};
}
static TABS = {
primary: {
tabs: [
{
id: "beschreibung",
icon: "fa-feather-pointed"
},
{
id: "effects",
icon: "fa-bolt"
}
],
initial: "beschreibung",
labelPrefix: "Midgard6.Sheets.Tabs"
}
};
/** @inheritdoc */
static PARTS = {
header: {
template: systemPath("templates/hintergrund/header.hbs")
},
tabs: {
template: systemPath("templates/shared/tabs.hbs")
},
beschreibung: {
template: systemPath("templates/hintergrund/description.hbs"),
scrollable: [""]
},
effects: {
template: systemPath("templates/shared/effects.hbs"),
scrollable: [""]
}
};
_addSpecifics(context) {
if (context.source.type === "legende") {
const schicksalsgaben = context.actor.items.filter((x) => x.type === "schicksalsgabe");
context.schicksalsgaben = schicksalsgaben;
}
}
}
+1
View File
@@ -120,6 +120,7 @@ export class M6ItemSheet extends api.HandlebarsApplicationMixin(sheets.ItemSheet
itemFields: this.item.schema.fields, itemFields: this.item.schema.fields,
config: CONFIG config: CONFIG
}); });
return context; return context;
} }
+3 -2
View File
@@ -60,8 +60,9 @@ export class M6WeaponSheet extends M6ItemSheet {
} }
}; };
_addSpecifics(context) { async _addSpecifics(context) {
context.bonuses = foundry.utils.getProperty(this.actor, this.item.system.fertigkeit).bonuses; context.bonuses =
foundry.utils.getProperty(this.actor, this.item.system.fertigkeit)?.bonuses || [];
} }
static #cycleEquip() { static #cycleEquip() {
+2 -1
View File
@@ -54,7 +54,8 @@ export class M6ZauberSheet extends M6ItemSheet {
async _addSpecifics(context) { async _addSpecifics(context) {
context.zauberFields = await this._getFields(); context.zauberFields = await this._getFields();
context.bonuses = foundry.utils.getProperty(this.actor, "system.skills.magie.zaubern").bonuses; context.bonuses =
foundry.utils.getProperty(this.actor, "system.skills.magie.zaubern")?.bonuses || [];
} }
static #cycleEquip() { static #cycleEquip() {
+5
View File
@@ -4,6 +4,7 @@
@import url("./resistenzen.scss"); @import url("./resistenzen.scss");
@import url("./dialog.scss"); @import url("./dialog.scss");
@import url("./items-page.scss"); @import url("./items-page.scss");
@import url("./hintergrund.scss");
@import url("./icons.scss"); @import url("./icons.scss");
:root { :root {
@@ -38,6 +39,10 @@
i:hover { i:hover {
text-shadow: 0 0 10px var(--M6-background-brown); text-shadow: 0 0 10px var(--M6-background-brown);
} }
prose-mirror.active {
background-color: var(--M6-background-white);
}
} }
.application { .application {
+33
View File
@@ -0,0 +1,33 @@
.application.sheet.M6 {
.collapsible {
background-color: var(--M6-background-white);
cursor: pointer;
padding: 12px;
font-size: 15px;
margin-bottom: 4px;
display: flex;
justify-content: space-between;
&.active {
background-color: var(--M6-background-brown);
box-shadow: none;
margin-bottom: 0px;
}
}
/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
/* Style the collapsible content. Note: hidden by default */
.content {
padding: 0 18px;
display: none;
width: 100%;
overflow: hidden;
background-color: var(--M6-background-white);
&.active {
display: block;
width: 100%;
margin-bottom: 4px;
}
}
}
+35
View File
@@ -3,11 +3,13 @@ import { WeaponData } from "./data/weapon-data.mjs";
import { ItemData } from "./data/item-data.mjs"; import { ItemData } from "./data/item-data.mjs";
import { ArmorData } from "./data/armor-data.mjs"; import { ArmorData } from "./data/armor-data.mjs";
import { ZauberData } from "./data/zauber-data.mjs"; import { ZauberData } from "./data/zauber-data.mjs";
import { HintergrundData } from "./data/hintergrund-data.mjs";
import { M6ActorSheet } from "./sheets/character-sheet.mjs"; import { M6ActorSheet } from "./sheets/character-sheet.mjs";
import { M6ItemSheet } from "./sheets/item-sheet.mjs"; import { M6ItemSheet } from "./sheets/item-sheet.mjs";
import { M6WeaponSheet } from "./sheets/weapon-sheet.mjs"; import { M6WeaponSheet } from "./sheets/weapon-sheet.mjs";
import { M6ArmorSheet } from "./sheets/armor-sheet.mjs"; import { M6ArmorSheet } from "./sheets/armor-sheet.mjs";
import { M6ZauberSheet } from "./sheets/zauber-sheet.mjs"; import { M6ZauberSheet } from "./sheets/zauber-sheet.mjs";
import { M6HintergrundSheet } from "./sheets/hintergrund-sheet.mjs";
import { loadHelpers } from "./helpers/handlebar-helpers.mjs"; import { loadHelpers } from "./helpers/handlebar-helpers.mjs";
import "./styles/M6.scss"; import "./styles/M6.scss";
@@ -27,6 +29,7 @@ Hooks.once("init", () => {
CONFIG.Item.dataModels.weapon = WeaponData; CONFIG.Item.dataModels.weapon = WeaponData;
CONFIG.Item.dataModels.armor = ArmorData; CONFIG.Item.dataModels.armor = ArmorData;
CONFIG.Item.dataModels.zauber = ZauberData; CONFIG.Item.dataModels.zauber = ZauberData;
CONFIG.Item.dataModels.hintergrund = HintergrundData;
foundry.applications.apps.DocumentSheetConfig.registerSheet(Actor, "midgard6-lvd", M6ActorSheet, { foundry.applications.apps.DocumentSheetConfig.registerSheet(Actor, "midgard6-lvd", M6ActorSheet, {
types: ["character"], types: ["character"],
@@ -45,6 +48,38 @@ Hooks.once("init", () => {
foundry.applications.apps.DocumentSheetConfig.registerSheet(Item, "midgard6-lvd", M6ZauberSheet, { foundry.applications.apps.DocumentSheetConfig.registerSheet(Item, "midgard6-lvd", M6ZauberSheet, {
types: ["zauber"] types: ["zauber"]
}); });
foundry.applications.apps.DocumentSheetConfig.registerSheet(
Item,
"midgard6-lvd",
M6HintergrundSheet,
{
types: ["gunst"]
}
);
foundry.applications.apps.DocumentSheetConfig.registerSheet(
Item,
"midgard6-lvd",
M6HintergrundSheet,
{
types: ["makel"]
}
);
foundry.applications.apps.DocumentSheetConfig.registerSheet(
Item,
"midgard6-lvd",
M6HintergrundSheet,
{
types: ["schicksalsgabe"]
}
);
foundry.applications.apps.DocumentSheetConfig.registerSheet(
Item,
"midgard6-lvd",
M6HintergrundSheet,
{
types: ["legende"]
}
);
loadHelpers(); loadHelpers();
}); });
+31
View File
@@ -0,0 +1,31 @@
{{! Beschreibung Allgemein Tab }}
<section
class="standard-form tab scrollable {{tab.cssClass}}"
data-tab="{{tab.id}}"
data-group="{{tab.group}}"
>
<div class="container">
<div class="row">
{{! Editors must receive enriched text data from getData to properly handle rolls, UUID links, etc. }}
<div class="col-12">
<fieldset style="height:100%">
<legend>{{localize "Midgard6.Item.Description"}}</legend>
{{#if editable}}
<prose-mirror
style="height:100%"
name="system.biographie.beschreibung"
data-document-u-u-i-d="{{actor.uuid}}"
value="{{system.biographie.beschreibung}}"
collaborate="true"
toggled="true"
>
{{{enrichedBeschreibung}}}
</prose-mirror>
{{else}}
{{{enrichedBeschreibung}}}
{{/if}}
</fieldset>
</div>
</div>
</div>
</section>
+30 -6
View File
@@ -1,7 +1,7 @@
<section <section
class="standard-form tab scrollable {{tab.cssClass}}" class="standard-form tab scrollable {{tab.cssClass}}"
data-group="primary" data-tab="{{tab.id}}"
data-tab="eigenschaften" data-group="{{tab.group}}"
> >
<div class="container"> <div class="container">
<div class="row"> <div class="row">
@@ -147,6 +147,28 @@
</div> </div>
</fieldset> </fieldset>
</div> </div>
<div>
<fieldset class="col highlight">
<legend>{{localize "Midgard6.Schicksalsmünzen"}}</legend>
<div class="d-flex justify-content-between align-items-center">
<input
style="max-width: 3rem"
class="attribut"
type="number"
name="system.schicksalsmünzen"
value="{{system.schicksalsmünzen}}"
/>
<div>
<ul style="margin: 0px; list-style-type: disclosure-closed;">
<li style="font-weight:bold">Misserfolg <i class="fas fa-arrow-right" style="font-size:12px"></i> geringer Erfolg</li>
<li style="font-weight:bold">Würfelwurf wiederholen</li>
<li style="font-weight:bold">Geistesblitz</li>
<li style="font-weight:bold">Mitspielende belohnen</li>
</ul>
</div>
</div>
</fieldset>
</div>
<div> <div>
<fieldset class="highlight"> <fieldset class="highlight">
<legend>{{localize "Midgard6.Item.type.weapon.plural" }}</legend> <legend>{{localize "Midgard6.Item.type.weapon.plural" }}</legend>
@@ -191,15 +213,17 @@
</div> </div>
</div> </div>
<div class="col-2"> <div class="col-2">
<div class="armor-box" style="position: relative"> <div class="armor-box" style="position: relative; margin-left: 0px; top: 12px">
<i class="fa-solid fa-shield"></i> <i class="fa-solid fa-shield"></i>
<span class="armor-value" style="right:10px">{{armor.rüstwert}}</span> <span class="armor-value" style="position: relative; right:-8px; top: -22px">{{armor.rüstwert}}</span>
</div> </div>
</div> </div>
</div> </div>
{{/each}} {{/each}}
<p class="resistenzenHeader">{{localize "Midgard6.Item.einschränkung"}}</p> {{#if armor.einschränkungen}}
<p>{{splitArray armor.einschränkungen}}</p> <p class="resistenzenHeader">{{localize "Midgard6.Item.einschränkung"}}</p>
<p>{{splitArray armor.einschränkungen}}</p>
{{/if}}
</div> </div>
</fieldset> </fieldset>
</div> </div>
+5 -5
View File
@@ -3,8 +3,8 @@
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<input class="text" type="text" placeholder="{{localize "Midgard6.name"}}" name="name" value="{{actor.name}}" /> <input class="text" type="text" placeholder="{{localize "Midgard6.name"}}" name="name" value="{{actor.name}}" />
<input class="text" type="text" placeholder="{{localize "Midgard6.Biography.spezies"}}" name="system.biography.spezies" value="{{system.biography.spezies}}" /> <input class="text" type="text" placeholder="{{localize "Midgard6.Biographie.spezies"}}" name="system.biographie.spezies" value="{{system.biographie.spezies}}" />
<input class="text" type="text" placeholder="{{localize "Midgard6.Biography.kultur"}}" name="system.biography.kultur" value="{{system.biography.kultur}}" /> <input class="text" type="text" placeholder="{{localize "Midgard6.Biographie.kultur"}}" name="system.biographie.kultur" value="{{system.biographie.kultur}}" />
</div> </div>
<img <img
class="profile-img" class="profile-img"
@@ -19,9 +19,9 @@
height="100" width="100" height="100" width="100"
> >
<div class="col-6"> <div class="col-6">
<input class="text right" type="text" placeholder="{{localize "Midgard6.Biography.abenteuertyp"}}" name="system.biography.abenteuertyp" value="{{system.biography.abenteuertyp}}" /> <input class="text right" type="text" placeholder="{{localize "Midgard6.Biographie.abenteuertyp"}}" name="system.biographie.abenteuertyp" value="{{system.biographie.abenteuertyp}}" />
<input class="text right" type="text" placeholder="{{localize "Midgard6.Biography.glaube"}}" name="system.biography.glaube" value="{{system.biography.glaube}}" /> <input class="text right" type="text" placeholder="{{localize "Midgard6.Biographie.glaube"}}" name="system.biographie.glaube" value="{{system.biographie.glaube}}" />
<input class="text right" type="text" placeholder="{{localize "Midgard6.Biography.mondgestalt"}}" name="system.biography.mondgestalt" value="{{system.biography.mondgestalt}}" /> <input class="text right" type="text" placeholder="{{localize "Midgard6.Biographie.mondgestalt"}}" name="system.biographie.mondgestalt" value="{{system.biographie.mondgestalt}}" />
</div> </div>
</div> </div>
</div> </div>
+266
View File
@@ -0,0 +1,266 @@
{{! Beschreibung Allgemein Tab }}
<section
class="standard-form tab scrollable {{tab.cssClass}}"
data-tab="{{tab.id}}"
data-group="{{tab.group}}"
>
<div class="container">
<div class="row">
<div class="col-12">
<fieldset>
<legend>{{localize "Midgard6.Grad.grad"}}</legend>
<div class="d-flex justify-content-center align-items-center">
<input
type="number"
class="text center"
style="max-width:3rem;"
name="system.grad.grad"
value="{{system.grad.grad}}"
/>
<p style="font-size:18px; font-weight: bold; padding: 0 8px">{{localize
"Midgard6.Grad.erfahrung"
}}</p>
<div
class="d-flex align-items-center justify-content-center flex-column"
style="position: relative;"
>
<label style="position: absolute; bottom: 100%; font-size: 12px;">{{localize
"Midgard6.Grad.frei"
}}</label>
<input
type="number"
class="text center"
style="max-width:3rem;"
name="system.grad.erfahrungspunkteFrei"
value="{{system.grad.erfahrungspunkteFrei}}"
/>
</div>
<p style=" font-size:32px; padding: 0 8px">+</p>
<div
class="d-flex align-items-center justify-content-center flex-column"
style="position: relative;"
>
<label style="position: absolute; bottom: 100%; font-size: 12px;">{{localize
"Midgard6.Grad.eingesetzt"
}}</label>
<input
type="number"
class="text center"
style="max-width:3rem;"
name="system.grad.erfahrungspunkteEingesetzt"
value="{{system.grad.erfahrungspunkteEingesetzt}}"
/>
</div>
<p style=" font-size:32px; padding: 0 8px">=</p>
<div
class="d-flex align-items-center justify-content-center flex-column"
style="position: relative;"
>
<label style="position: absolute; bottom: 100%; font-size: 12px;">{{localize
"Midgard6.Grad.gesamt"
}}</label>
<input
type="number"
class="text center"
style="max-width:3rem;"
name="system.grad.erfahrungsschatz"
value="{{system.grad.erfahrungsschatz}}"
/>
</div>
</div>
</fieldset>
</div>
<div class="col-12">
<fieldset>
<legend>{{localize "Midgard6.Hintergrund.type.gunst.singular"}}
&
{{localize "Midgard6.Hintergrund.type.makel.singular"}}</legend>
<div class="row">
<div class="col-6">
{{#with itemTypes.gunst}}
{{#each this.items as |gunst|}}
<div
class="collapsible"
data-action="collapsible"
data-item-id="{{gunst._id}}"
data-type="Item"
data-document-class="Item"
>{{gunst.name}}
<div>
<i class="fas fa-expand"></i>
{{#if @root.editable}}
<a
class="item-control item-delete"
title="{{localize 'DOCUMENT.Delete' type=gunst.name}}"
style="z-index:9999"
data-action="deleteDoc"
>
<i class="fas fa-trash"></i>
</a>
{{/if}}
</div>
</div>
<div class="content">
{{{gunst.system.beschreibung}}}
</div>
{{/each}}
{{/with}}
</div>
<div class="col-6">
{{#with itemTypes.makel}}
{{#each this.items as |makel|}}
<div
type="button"
class="collapsible"
data-action="collapsible"
data-item-id="{{makel._id}}"
data-type="Item"
data-document-class="Item"
>{{makel.name}}
<div>
<i class="fas fa-expand"></i>
{{#if @root.editable}}
<a
class="item-control item-delete"
title="{{localize 'DOCUMENT.Delete' type=gunst.name}}"
style="z-index:9999"
data-action="deleteDoc"
>
<i class="fas fa-trash"></i>
</a>
{{/if}}
</div>
</div>
<div class="content">
{{{makel.system.beschreibung}}}
</div>
{{/each}}
{{/with}}
</div>
</div>
</fieldset>
</div>
<div class="col-6" style="height: 100%">
<fieldset>
<legend>{{localize "Midgard6.Hintergrund.type.legende.plural"}}</legend>
<div class="row">
<div class="col">
{{#with itemTypes.legende}}
<div class="itemHeader" style="margin-bottom: 8px">
<div class="document-controls">
{{#if @root.editable}}
<a
class="item-control item-create"
title="{{localize 'DOCUMENT.Create' type=this.label}}"
data-action="createDoc"
data-document-class="Item"
data-type="legende"
>
<i class="fas fa-plus"></i>
{{localize "DOCUMENT.Create" type=this.label}}
</a>
{{/if}}
</div>
</div>
{{#each this.items as |legende|}}
<div
class="collapsible"
data-action="collapsible"
data-item-id="{{legende._id}}"
data-type="Item"
data-document-class="Item"
>{{legende.name}}
<div>
<i class="fas fa-expand"></i>
<a
class="item-control item-edit"
title="{{localize 'DOCUMENT.Update' type=item.name}}"
data-action="viewDoc"
>
<i class="fas fa-edit"></i>
</a>
{{#if @root.editable}}
<a
class="item-control item-delete"
title="{{localize 'DOCUMENT.Delete' type=legende.name}}"
style="z-index:9999"
data-action="deleteDoc"
>
<i class="fas fa-trash"></i>
</a>
{{/if}}
</div>
</div>
<div class="content">
{{{legende.system.beschreibung}}}
</div>
{{/each}}
{{/with}}
</div>
</div>
</fieldset>
</div>
<div class="col-6">
<fieldset>
<legend>{{localize "Midgard6.Hintergrund.type.schicksalsgabe.plural"}}</legend>
<div class="row">
<div class="col">
{{#with itemTypes.schicksalsgabe}}
<div class="itemHeader" style="margin-bottom: 8px">
<div class="document-controls">
{{#if @root.editable}}
<a
class="item-control item-create"
title="{{localize 'DOCUMENT.Create' type=this.label}}"
data-action="createDoc"
data-document-class="Item"
data-type="schicksalsgabe"
>
<i class="fas fa-plus"></i>
{{localize "DOCUMENT.Create" type=this.label}}
</a>
{{/if}}
</div>
</div>
{{#each this.items as |schicksalsgabe|}}
<div
class="collapsible"
data-action="collapsible"
data-item-id="{{schicksalsgabe._id}}"
data-type="Item"
data-document-class="Item"
>{{schicksalsgabe.name}}
<div>
<i class="fas fa-expand"></i>
{{#if @root.editable}}
<a
class="item-control item-delete"
title="{{localize 'DOCUMENT.Delete' type=schicksalsgabe.name}}"
style="z-index:9999"
data-action="deleteDoc"
>
<i class="fas fa-trash"></i>
</a>
{{/if}}
</div>
</div>
<div class="content">
{{{gunst.system.beschreibung}}}
</div>
{{/each}}
{{/with}}
</div>
</div>
</fieldset>
</div>
</div>
</div>
</section>
+25
View File
@@ -0,0 +1,25 @@
{{! Beschreibung Allgemein Tab }}
<section
class="standard-form tab scrollable {{tab.cssClass}}"
data-tab="{{tab.id}}"
data-group="{{tab.group}}"
style="overflow: hidden"
>
{{! Editors must receive enriched text data from getData to properly handle rolls, UUID links, etc. }}
<fieldset style="height:100%">
<legend>{{localize "Midgard6.Item.Description"}}</legend>
{{#if editable}}
<prose-mirror
style="height:100%"
name="system.beschreibung"
data-document-u-u-i-d="{{item.uuid}}"
value="{{system.beschreibung}}"
toggled="true"
>
{{{enrichedBeschreibung}}}
</prose-mirror>
{{else}}
{{{enrichedBeschreibung}}}
{{/if}}
</fieldset>
</section>
+46
View File
@@ -0,0 +1,46 @@
<header class="sheet-header">
<div class="container">
<div class="row align-items-end" style="height: 108px" >
<img
class="profile-img"
style="z-index:1"
src="{{item.img}}"
alt="{{item.name}}"
{{#if editable}}
data-action="editImage"
data-edit="img"
{{/if}}
data-tooltip="{{item.name}}"
height="100" width="100"
>
<div class="col-12">
<input class="text" type="text" style="color: var(--M6-text-brown); font-weight: bold; font-size:24px; background-color: var(--Midgard6-background-grey)" placeholder="{{localize "Midgard6.name"}}" name="name" value="{{item.name}}" />
</div>
<div class="col-6">
</div>
<div class="col-6">
</div>
<div class="col-6">
<input class="right" type="text" placeholder="{{localize "Midgard6.Hintergrund.gruppe"}}" name="system.gruppe" value="{{system.gruppe}}" />
</div>
<div class="col-6">
<select
class="text right"
style="text-align: right"
name="system.linkId"
value="{{system.linkId}}"
id="linkId"
placeholder="{{system.linkId}}"
>
<option {{#unless system.linkId}}selected{{/unless}}value=""></option>
{{#each schicksalsgaben as |schicksalsgabe|}}
<option {{#ifeq schicksalsgabe.id ../system.linkId}}selected{{/ifeq}} value="{{schicksalsgabe.id}}">
{{schicksalsgabe.name}}
</option>
{{/each}}
</select>
</div>
</div>
</div>
</header>
+2 -3
View File
@@ -1,6 +1,6 @@
{{! Beschreibung Allgemein Tab }} {{! Beschreibung Allgemein Tab }}
<section <section
class="standard-form tab {{tab.cssClass}}" class="standard-form tab scrollable {{tab.cssClass}}"
data-tab="{{tab.id}}" data-tab="{{tab.id}}"
data-group="{{tab.group}}" data-group="{{tab.group}}"
style="overflow: hidden" style="overflow: hidden"
@@ -12,9 +12,8 @@
<prose-mirror <prose-mirror
style="height:100%" style="height:100%"
name="system.beschreibung" name="system.beschreibung"
data-document-u-u-i-d="{{actor.uuid}}" data-document-u-u-i-d="{{item.uuid}}"
value="{{system.beschreibung}}" value="{{system.beschreibung}}"
collaborate="true"
toggled="true" toggled="true"
> >
{{{enrichedBeschreibung}}} {{{enrichedBeschreibung}}}
+3 -2
View File
@@ -47,15 +47,16 @@
<select <select
type="text" type="text"
style="margin-left: 8px; max-width:10rem" style="margin-left: 8px; max-width:10rem"
name="system.spezialisierung"
id="system.spezialisierung" id="system.spezialisierung"
placeholder="" placeholder=""
/> />
<option {{#ifeq system.spezialisierung ""}}selected{{/ifeq}} value=""></option>
{{#each bonuses as |bonus|}} {{#each bonuses as |bonus|}}
<option {{#ifeq system.spezialisierung bonus.name}}selected{{/ifeq}} value="{{bonus.name}}"> <option {{#ifeq bonus.name ../system.spezialisierung}}selected{{/ifeq}} value="{{bonus.name}}">
{{bonus.name}} {{bonus.name}}
</option> </option>
{{/each}} {{/each}}
<option {{#ifeq system.spezialisierung ""}}selected{{/ifeq}} value=""></option>
</select> </select>
</div> </div>
</div> </div>
+1 -1
View File
@@ -20,7 +20,7 @@
placeholder="Kleiner Zauber/ Zaubersalz" placeholder="Kleiner Zauber/ Zaubersalz"
/> />
{{#each bonuses as |bonus|}} {{#each bonuses as |bonus|}}
<option {{#ifeq bonus.name system.eigenschaften.ursprung}}selected{{/ifeq}} value="{{bonus.name}}"> <option {{#ifeq bonus.name ../system.eigenschaften.ursprung}}selected{{/ifeq}} value="{{bonus.name}}">
{{bonus.name}} {{bonus.name}}
</option> </option>
{{/each}} {{/each}}
+8 -2
View File
@@ -2,11 +2,17 @@ import { CharacterData } from "../data/character-data";
import { ItemData } from "../data/item-data"; import { ItemData } from "../data/item-data";
import { WeaponData } from "../data/weapon-data"; import { WeaponData } from "../data/weapon-data";
import { ArmorData } from "../data/armor-data"; import { ArmorData } from "../data/armor-data";
import {ZauberrData } from "../data/zauber-data"; import {ZauberData } from "../data/zauber-data";
import {HintergrundData } from "../data/hintergrund-data";
declare module "fvtt-types/configuration" { declare module "fvtt-types/configuration" {
interface DataModelConfig { interface DataModelConfig {
Actor: { character: typeof CharacterData }; Actor: { character: typeof CharacterData };
Item: { item: typeof ItemData, weapon: typeof WeaponData, armor: typeof ArmorData, zauber: typeof ZauberData }; Item: {
item: typeof ItemData,
weapon: typeof WeaponData,
armor: typeof ArmorData,
zauber: typeof ZauberData
hintergrund: typeof HintergrundData };
} }
} }
+5 -1
View File
@@ -36,7 +36,11 @@
"item": {}, "item": {},
"weapon": {}, "weapon": {},
"armor": {}, "armor": {},
"zauber": {} "zauber": {},
"gunst": {},
"makel": {},
"schicksalsgabe": {},
"legende": {}
} }
}, },
"compatibility": { "compatibility": {