Hintergründe
This commit is contained in:
1 parent
b02d9c2313
commit
920c68a7da
23 files changed
+712
-39
No files matched your search
@@ -1,12 +1,37 @@
|
||||
function defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return {
|
||||
biography: new fields.SchemaField({
|
||||
biographie: new fields.SchemaField({
|
||||
mondgestalt: new fields.StringField({ initial: "" }),
|
||||
abenteuertyp: new fields.StringField({ initial: "" }),
|
||||
glaube: 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({
|
||||
base: new fields.NumberField({
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -55,6 +55,10 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
|
||||
id: "zauber",
|
||||
icon: "fa-hand-sparkles"
|
||||
},
|
||||
{
|
||||
id: "hintergrund",
|
||||
icon: "fa-feather-pointed"
|
||||
},
|
||||
{
|
||||
id: "effects",
|
||||
icon: "fa-bolt"
|
||||
@@ -87,16 +91,40 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
|
||||
template: systemPath("templates/actor/items.hbs"),
|
||||
scrollable: [""]
|
||||
},
|
||||
// biographie: {
|
||||
// template: systemPath("templates/items/description.hbs"),
|
||||
// scrollable: [""]
|
||||
// },
|
||||
hintergrund: {
|
||||
template: systemPath("templates/actor/hintergrund.hbs"),
|
||||
scrollable: [""]
|
||||
},
|
||||
effects: {
|
||||
template: systemPath("templates/shared/effects.hbs"),
|
||||
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 */
|
||||
@@ -153,6 +181,21 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
|
||||
context.zauber = await this._getZauber();
|
||||
context.tab = context.tabs[partId];
|
||||
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;
|
||||
}
|
||||
@@ -701,7 +744,7 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
|
||||
* @returns {Item|ActiveEffect} The embedded Item or ActiveEffect.
|
||||
*/
|
||||
_getEmbeddedDocument(target) {
|
||||
const docRow = target.closest("li[data-document-class]");
|
||||
const docRow = target.closest("[data-document-class]");
|
||||
if (docRow.dataset.documentClass === "Item") {
|
||||
return this.actor.items.get(docRow.dataset.itemId);
|
||||
} 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);
|
||||
if (allowed === false) return;
|
||||
|
||||
// Handle different data types
|
||||
switch (data.type) {
|
||||
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.
|
||||
* @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) {
|
||||
if (!this.actor.isOwner) return false;
|
||||
|
||||
// Prüfen, ob das Item von diesem Actor stammt und Shift NICHT gedrückt ist
|
||||
// Sortieren, nicht kopieren/verschieben
|
||||
return this._onSortItem(event, data);
|
||||
if (this.actor.items.get(data.itemId)) 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;
|
||||
if (siblingId && siblingId !== source.id) siblings.push(items.get(siblingId));
|
||||
}
|
||||
// item = items.get(item.itemId);
|
||||
|
||||
// Perform the sort
|
||||
const sortUpdates = foundry.utils.performIntegerSort(source, {
|
||||
|
||||
@@ -75,7 +75,10 @@ export async function prepSpells(actor) {
|
||||
|
||||
export async function prepWeight(actor) {
|
||||
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);
|
||||
return {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -120,6 +120,7 @@ export class M6ItemSheet extends api.HandlebarsApplicationMixin(sheets.ItemSheet
|
||||
itemFields: this.item.schema.fields,
|
||||
config: CONFIG
|
||||
});
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,8 +60,9 @@ export class M6WeaponSheet extends M6ItemSheet {
|
||||
}
|
||||
};
|
||||
|
||||
_addSpecifics(context) {
|
||||
context.bonuses = foundry.utils.getProperty(this.actor, this.item.system.fertigkeit).bonuses;
|
||||
async _addSpecifics(context) {
|
||||
context.bonuses =
|
||||
foundry.utils.getProperty(this.actor, this.item.system.fertigkeit)?.bonuses || [];
|
||||
}
|
||||
|
||||
static #cycleEquip() {
|
||||
|
||||
@@ -54,7 +54,8 @@ export class M6ZauberSheet extends M6ItemSheet {
|
||||
|
||||
async _addSpecifics(context) {
|
||||
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() {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
@import url("./resistenzen.scss");
|
||||
@import url("./dialog.scss");
|
||||
@import url("./items-page.scss");
|
||||
@import url("./hintergrund.scss");
|
||||
@import url("./icons.scss");
|
||||
|
||||
:root {
|
||||
@@ -38,6 +39,10 @@
|
||||
i:hover {
|
||||
text-shadow: 0 0 10px var(--M6-background-brown);
|
||||
}
|
||||
|
||||
prose-mirror.active {
|
||||
background-color: var(--M6-background-white);
|
||||
}
|
||||
}
|
||||
|
||||
.application {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,11 +3,13 @@ import { WeaponData } from "./data/weapon-data.mjs";
|
||||
import { ItemData } from "./data/item-data.mjs";
|
||||
import { ArmorData } from "./data/armor-data.mjs";
|
||||
import { ZauberData } from "./data/zauber-data.mjs";
|
||||
import { HintergrundData } from "./data/hintergrund-data.mjs";
|
||||
import { M6ActorSheet } from "./sheets/character-sheet.mjs";
|
||||
import { M6ItemSheet } from "./sheets/item-sheet.mjs";
|
||||
import { M6WeaponSheet } from "./sheets/weapon-sheet.mjs";
|
||||
import { M6ArmorSheet } from "./sheets/armor-sheet.mjs";
|
||||
import { M6ZauberSheet } from "./sheets/zauber-sheet.mjs";
|
||||
import { M6HintergrundSheet } from "./sheets/hintergrund-sheet.mjs";
|
||||
import { loadHelpers } from "./helpers/handlebar-helpers.mjs";
|
||||
import "./styles/M6.scss";
|
||||
|
||||
@@ -27,6 +29,7 @@ Hooks.once("init", () => {
|
||||
CONFIG.Item.dataModels.weapon = WeaponData;
|
||||
CONFIG.Item.dataModels.armor = ArmorData;
|
||||
CONFIG.Item.dataModels.zauber = ZauberData;
|
||||
CONFIG.Item.dataModels.hintergrund = HintergrundData;
|
||||
|
||||
foundry.applications.apps.DocumentSheetConfig.registerSheet(Actor, "midgard6-lvd", M6ActorSheet, {
|
||||
types: ["character"],
|
||||
@@ -45,6 +48,38 @@ Hooks.once("init", () => {
|
||||
foundry.applications.apps.DocumentSheetConfig.registerSheet(Item, "midgard6-lvd", M6ZauberSheet, {
|
||||
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();
|
||||
});
|
||||
@@ -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>
|
||||
@@ -1,7 +1,7 @@
|
||||
<section
|
||||
class="standard-form tab scrollable {{tab.cssClass}}"
|
||||
data-group="primary"
|
||||
data-tab="eigenschaften"
|
||||
data-tab="{{tab.id}}"
|
||||
data-group="{{tab.group}}"
|
||||
>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@@ -147,6 +147,28 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
</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>
|
||||
<fieldset class="highlight">
|
||||
<legend>{{localize "Midgard6.Item.type.weapon.plural" }}</legend>
|
||||
@@ -191,15 +213,17 @@
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
{{/each}}
|
||||
<p class="resistenzenHeader">{{localize "Midgard6.Item.einschränkung"}}</p>
|
||||
<p>{{splitArray armor.einschränkungen}}</p>
|
||||
{{#if armor.einschränkungen}}
|
||||
<p class="resistenzenHeader">{{localize "Midgard6.Item.einschränkung"}}</p>
|
||||
<p>{{splitArray armor.einschränkungen}}</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<div class="row">
|
||||
<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.Biography.spezies"}}" name="system.biography.spezies" value="{{system.biography.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.spezies"}}" name="system.biographie.spezies" value="{{system.biographie.spezies}}" />
|
||||
<input class="text" type="text" placeholder="{{localize "Midgard6.Biographie.kultur"}}" name="system.biographie.kultur" value="{{system.biographie.kultur}}" />
|
||||
</div>
|
||||
<img
|
||||
class="profile-img"
|
||||
@@ -19,9 +19,9 @@
|
||||
height="100" width="100"
|
||||
>
|
||||
<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.Biography.glaube"}}" name="system.biography.glaube" value="{{system.biography.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.abenteuertyp"}}" name="system.biographie.abenteuertyp" value="{{system.biographie.abenteuertyp}}" />
|
||||
<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.Biographie.mondgestalt"}}" name="system.biographie.mondgestalt" value="{{system.biographie.mondgestalt}}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -1,6 +1,6 @@
|
||||
{{! Beschreibung Allgemein Tab }}
|
||||
<section
|
||||
class="standard-form tab {{tab.cssClass}}"
|
||||
class="standard-form tab scrollable {{tab.cssClass}}"
|
||||
data-tab="{{tab.id}}"
|
||||
data-group="{{tab.group}}"
|
||||
style="overflow: hidden"
|
||||
@@ -12,9 +12,8 @@
|
||||
<prose-mirror
|
||||
style="height:100%"
|
||||
name="system.beschreibung"
|
||||
data-document-u-u-i-d="{{actor.uuid}}"
|
||||
data-document-u-u-i-d="{{item.uuid}}"
|
||||
value="{{system.beschreibung}}"
|
||||
collaborate="true"
|
||||
toggled="true"
|
||||
>
|
||||
{{{enrichedBeschreibung}}}
|
||||
|
||||
@@ -47,15 +47,16 @@
|
||||
<select
|
||||
type="text"
|
||||
style="margin-left: 8px; max-width:10rem"
|
||||
name="system.spezialisierung"
|
||||
id="system.spezialisierung"
|
||||
placeholder=""
|
||||
/>
|
||||
<option {{#ifeq system.spezialisierung ""}}selected{{/ifeq}} value=""></option>
|
||||
{{#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}}
|
||||
</option>
|
||||
{{/each}}
|
||||
<option {{#ifeq system.spezialisierung ""}}selected{{/ifeq}} value=""></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
placeholder="Kleiner Zauber/ Zaubersalz"
|
||||
/>
|
||||
{{#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}}
|
||||
</option>
|
||||
{{/each}}
|
||||
|
||||
@@ -2,11 +2,17 @@ import { CharacterData } from "../data/character-data";
|
||||
import { ItemData } from "../data/item-data";
|
||||
import { WeaponData } from "../data/weapon-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" {
|
||||
interface DataModelConfig {
|
||||
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 };
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user